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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 19 May 2017 15:02:23 +0200
From:   Petr Mladek <pmladek@...e.com>
To:     Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
Cc:     Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Russell King <rmk+kernel@....linux.org.uk>,
        Daniel Thompson <daniel.thompson@...aro.org>,
        Ingo Molnar <mingo@...hat.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Chris Metcalf <cmetcalf@...hip.com>, x86@...nel.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] printk: Use the main logbuf in NMI when logbuf_lock
 is available

On Fri 2017-05-19 13:38:15, Sergey Senozhatsky wrote:
> On (05/19/17 11:58), Sergey Senozhatsky wrote:
> > >  void printk_nmi_exit(void)
> > >  {
> > > -	this_cpu_and(printk_context, ~PRINTK_NMI_CONTEXT_MASK);
> > > +	this_cpu_and(printk_context,
> > > +		     ~(PRINTK_NMI_CONTEXT_MASK ||
> > > +		       PRINTK_NMI_DEFERRED_CONTEXT_MASK));
> > >  }
> 
> [..]
> 
> > the problem is that
> > 
> > 	`PRINTK_NMI_CONTEXT_MASK || PRINTK_NMI_DEFERRED_CONTEXT_MASK' is 0x01
> 
> d'oh... forgot to copy-paste this...

Grrr, thanks a lot for chasing this down and I am sorry for the troubles.

> ---
> 
> diff --git a/kernel/printk/printk_safe.c b/kernel/printk/printk_safe.c
> index 6fec9cfb9a69..b6ff3fe4370a 100644
> --- a/kernel/printk/printk_safe.c
> +++ b/kernel/printk/printk_safe.c
> @@ -324,7 +324,7 @@ void printk_nmi_enter(void)
>  void printk_nmi_exit(void)
>  {
>         this_cpu_and(printk_context,
> -                    ~(PRINTK_NMI_CONTEXT_MASK ||
> +                    ~(PRINTK_NMI_CONTEXT_MASK |
>                        PRINTK_NMI_DEFERRED_CONTEXT_MASK));
>  }

I have rebased both for-4.13 and for-next branches in printk.git
with this fix. I wanted to get rid of this bug in linux-next
ASAP. Please, let me know if you would prefer to handle
this another way in the future.

Best Regards,
Petr

Powered by blists - more mailing lists