archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <>
To: Kees Cook <>
Cc: Alexander Popov <>,
	Peter Zijlstra <>,
	Thomas Gleixner <>,
	Josh Poimboeuf <>,
	Borislav Petkov <>,
	Linux Kernel Mailing List <>,
Subject: Re: [PATCH v2] gcc-plugins/stackleak: Use noinstr in favor of notrace
Date: Thu, 3 Feb 2022 17:14:11 -0800	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Thu, Feb 3, 2022 at 12:18 PM Kees Cook <> wrote:
> While the stackleak plugin was already using notrace, objtool is now a
> bit more picky. Update the notrace uses to noinstr. Silences the
> following objtool warnings when building with:

Thanks, applied.

There are still a few objtool warnings about other issues, all look
somehow related to mce:

  mce_start()+0x5c: call to __kasan_check_write() leaves .noinstr.text section
  mce_gather_info()+0x5f: call to v8086_mode.constprop.0() leaves
.noinstr.text section
  mce_read_aux()+0x8a: call to mca_msr_reg() leaves .noinstr.text section
  do_machine_check()+0x197: call to mce_no_way_out() leaves
.noinstr.text section
  mce_severity_amd.constprop.0()+0xca: call to mce_severity_amd_smca()
leaves .noinstr.textp section

and from a quick look at least some of them look like real bugs.

For example, mce_read_aux() is marked 'noinstr', but it calls
mca_msr_reg() which is not. That's iffy.

The others might be compiler-generated (the 'constprop' thing has
caused section issues before so I didn't bother looking closer). Or
related to kasan. But at least one of them seems to be a valid warning
about bad behavior.


  reply	other threads:[~2022-02-04  1:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-03 20:17 [PATCH v2] gcc-plugins/stackleak: Use noinstr in favor of notrace Kees Cook
2022-02-04  1:14 ` Linus Torvalds [this message]
2022-02-04  8:03   ` Borislav Petkov
2022-02-06 12:35 ` Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='' \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).