From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Jason Baron <jbaron@akamai.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
x86@kernel.org, linux-kernel@vger.kernel.org,
Ingo Molnar <mingo@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Linus Torvalds <torvalds@linux-foundation.org>,
Peter Zijlstra <peterz@infradead.org>,
Borislav Petkov <bp@suse.de>, Juergen Gross <jgross@suse.com>,
Tejun Heo <tj@kernel.org>
Subject: Re: [PATCH 1/3] jump_label: Warn on failed jump_label patch
Date: Wed, 14 Feb 2018 11:34:07 -0600 [thread overview]
Message-ID: <20180214173407.guhytdurv4pmhzvk@treble> (raw)
In-Reply-To: <a4ad6f69-8836-779b-f7e7-0e303885c7f5@akamai.com>
On Wed, Feb 14, 2018 at 12:18:20PM -0500, Jason Baron wrote:
>
>
> On 02/14/2018 12:01 PM, Steven Rostedt wrote:
> > On Wed, 14 Feb 2018 10:40:41 -0600
> > Josh Poimboeuf <jpoimboe@redhat.com> wrote:
> >
> >> When the jump label code encounters an address which isn't recognized by
> >> kernel_text_address(), it just silently fails.
> >>
> >> This can be dangerous because jump labels are used in a variety of
> >> places, and are generally expected to work. Convert the silent failure
> >> to a warning.
> >
> > I made ftrace function tracing work on init code, can we do the same
> > with tracepoints (aka jump labels)?
> >
>
> jump labels do work on init code, except they don't work on it after it
> has been freed :)
>
> It uses 'kernel_text_address()', which will return true for init code if
> system_state < SYSTEM_RUNNING. See: core_kernel_text().
>
> So I'm guessing that the warnings here are coming from init code that
> has already been freed. Are we sure that these warnings are coming from
> init code that hasn't already been freed?
Ah, I see. I missed that 'system_state < SYSTEM_RUNNING' check. It was
nicely hidden. :-)
So I guess patches 2 & 3 can be dropped, as those tracepoints can still
be used during boot.
And in patch 1 the warning conditions need to be tweaked a bit to
exclude the __init case.
--
Josh
next prev parent reply other threads:[~2018-02-14 17:34 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-14 16:40 [PATCH 0/3] jump_label: Robustify jump label patching Josh Poimboeuf
2018-02-14 16:40 ` [PATCH 1/3] jump_label: Warn on failed jump_label patch Josh Poimboeuf
2018-02-14 17:01 ` Steven Rostedt
2018-02-14 17:18 ` Jason Baron
2018-02-14 17:34 ` Josh Poimboeuf [this message]
2018-02-14 17:40 ` Steven Rostedt
2018-02-14 21:17 ` Josh Poimboeuf
2018-02-15 22:35 ` Josh Poimboeuf
2018-02-16 17:31 ` Steven Rostedt
2018-02-14 17:01 ` Borislav Petkov
2018-02-14 16:40 ` [PATCH 2/3] x86/xen: Remove inert tracepoint in __init code Josh Poimboeuf
2018-02-14 16:49 ` Juergen Gross
2018-02-14 16:40 ` [PATCH 3/3] percpu: " Josh Poimboeuf
2018-02-15 15:22 ` Tejun Heo
2018-02-15 15:33 ` Josh Poimboeuf
2018-02-16 9:02 ` Ingo Molnar
2018-02-16 12:52 ` Josh Poimboeuf
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=20180214173407.guhytdurv4pmhzvk@treble \
--to=jpoimboe@redhat.com \
--cc=bp@suse.de \
--cc=jbaron@akamai.com \
--cc=jgross@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=tj@kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=x86@kernel.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
all inboxes | Powered by JetHome®