lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 14 Feb 2018 11:34:07 -0600
From:   Josh Poimboeuf <jpoimboe@...hat.com>
To:     Jason Baron <jbaron@...mai.com>
Cc:     Steven Rostedt <rostedt@...dmis.org>, x86@...nel.org,
        linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Borislav Petkov <bp@...e.de>, Juergen Gross <jgross@...e.com>,
        Tejun Heo <tj@...nel.org>
Subject: Re: [PATCH 1/3] jump_label: Warn on failed jump_label patch

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@...hat.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

Powered by blists - more mailing lists