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:   Wed, 16 Aug 2017 14:59:16 +0200
From:   "Rafael J. Wysocki" <rjw@...ysocki.net>
To:     Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
Cc:     Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        Petr Mladek <pmladek@...e.com>,
        Steven Rostedt <rostedt@...dmis.org>, Jan Kara <jack@...e.cz>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Eric Biederman <ebiederm@...ssion.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Slaby <jslaby@...e.com>, Pavel Machek <pavel@....cz>,
        Andreas Mohr <andi@...as.de>,
        Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>,
        linux-kernel@...r.kernel.org
Subject: Re: [RFC][PATCHv5 07/13] printk: register syscore notifier

On Wednesday, August 16, 2017 8:55:45 AM CEST Sergey Senozhatsky wrote:
> On (08/15/17 13:56), Rafael J. Wysocki wrote:
> [..]
> > > +static int printk_syscore_suspend(void)
> > > +{
> > > +	printk_emergency_begin();
> > > +	return 0;
> > > +}
> > 
> > Somebody looking at suspend/resume code paths only will be wondering why
> > you need this, because we should be in the emergency mode already when
> > it is called.
> > 
> > It would be good to add a comment about the kexec context here.
> 
> ok, will add.
> 
> > > +static void printk_syscore_resume(void)
> > > +{
> > > +	printk_emergency_end();
> > > +}
> > 
> > This will turn the emergency mode off during resume before the notifier
> > added by the previous patch AFAICS.  Is this intentional?
> 
> emergency modes can nest. so it's OK to have
> 
> 	printk_emergency_begin()   +1   // on
> 	  printk_emergency_begin()   +1
> 	  printk_emergency_end()     -1
> 	printk_emergency_end()     -1   // off
> 

OK then.

Thanks,
Rafel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ