public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Kees Cook <keescook@chromium.org>,
	Josh Poimboeuf <jpoimboe@redhat.com>,
	kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	kernel test robot <lkp@intel.com>
Subject: Re: vmlinux.o: warning: objtool: stackleak_erase()+0x35: call to ftrace_likely_update() leaves .noinstr.text section
Date: Tue, 5 Apr 2022 10:03:35 +0200	[thread overview]
Message-ID: <20220405080335.GC30877@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <20220404152502.0621caf9@gandalf.local.home>

On Mon, Apr 04, 2022 at 03:25:02PM -0400, Steven Rostedt wrote:
> On Mon, 4 Apr 2022 11:27:47 -0700
> Kees Cook <keescook@chromium.org> wrote:
> 
> > I got CCed on this because of stackleak_erase() triggering, this, but it
> > appears to be an existing issue for other callers too. It looks like
> > __branch_check__() shouldn't be emitting ftrace_likely_update() calls
> > for noinstr functions...
> > 
> > I have no idea how a macro is meant to check for function attributes,
> > though... :(
> 
> Ignore it. It's the branch tracer enabled (that is, every "if ()" is being
> traced).
> 
> Although I still use the branch profiler, I do not believe anyone uses the
> branch tracer. The branch profiler updates an array of counters that tells
> when the branch was true or false, the branch tracer actually traces
> (records an event) for every branch in the system!

\o/

> I think I'll just send a patch to nuke the tracer. I'm sure Peter Zijlstra
> will be happy when I do that. But I still want the profiler, as I find that
> useful.

It'll explode the moment Lai's entry rework goes through. That'll make
us run C code before we switch to the kernel address space, so your
counters will not exist/be-mapped and *BOOM*.



  reply	other threads:[~2022-04-05 12:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-04 12:22 vmlinux.o: warning: objtool: stackleak_erase()+0x35: call to ftrace_likely_update() leaves .noinstr.text section kernel test robot
2022-04-04 18:27 ` Kees Cook
2022-04-04 19:25   ` Steven Rostedt
2022-04-05  8:03     ` Peter Zijlstra [this message]
2022-04-05 13:38       ` Steven Rostedt

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=20220405080335.GC30877@worktop.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=jpoimboe@redhat.com \
    --cc=kbuild-all@lists.01.org \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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