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:   Thu, 2 Feb 2017 16:52:52 +0100
From:   Petr Mladek <pmladek@...e.com>
To:     Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
Cc:     Steven Rostedt <rostedt@...dmis.org>,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Jan Kara <jack@...e.cz>, Tejun Heo <tj@...nel.org>,
        Calvin Owens <calvinowens@...com>,
        Ingo Molnar <mingo@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Andy Lutomirski <luto@...nel.org>,
        Peter Hurley <peter@...leysoftware.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCHv7 4/8] printk: always use deferred printk when flush
 printk_safe lines

On Thu 2017-02-02 16:37:53, Petr Mladek wrote:
> On Thu 2017-02-02 15:05:38, Sergey Senozhatsky wrote:
> > On (02/01/17 11:06), Steven Rostedt wrote:
> > [..]
> > > >  static void printk_safe_flush_line(const char *text, int len)
> > > >  {
> > > >  	/*
> > > > -	 * The buffers are flushed in NMI only on panic.  The messages must
> > > > -	 * go only into the ring buffer at this stage.  Consoles will get
> > > > -	 * explicitly called later when a crashdump is not generated.
> > > > +	 * Avoid any console drivers calls from here, because we may be
> > > > +	 * in NMI or printk_safe context (when in panic). The messages
> > > > +	 * must go only into the ring buffer at this stage.  Consoles will
> > > > +	 * get explicitly called later when a crashdump is not generated.
> > > >  	 */
> > > > -	if (in_nmi())
> > > > -		printk_deferred("%.*s", len, text);
> > > > -	else
> > > > -		printk("%.*s", len, text);
> > > > +	printk_deferred("%.*s", len, text);
> > > >  }
> > > 
> > > The helper function was there because of the if statement. Just nuke
> > > this function and call printk_deferred() directly. You can move the
> > > comment to the caller.
> > 
> > indeed. thanks.
> > 
> > Petr, how would you prefer to handle this?
> 
> I am still learning how to manage the patches in the printk.git tree.
> 
> I would like to add Steven's Reviewed-by tags, links to the mails,
> and list of CC-ed people. IMHO, the only way is to rebase the for-4.11
> and for-next branches. Then I could do the above suggested change during
> the rebase.

Alternatively you could send this other solution as a replay to this
thread. Then we could comment, add reviewed tags. And I could use
the new approved variant during the rebase.

This is probably better approach for non-oneliner changes.

> Any other solutions are welcome. I will wait with the rebase at least
> until Monday. We are discussing the lockdep in the 6th patch anyway.

Best Regards,
Petr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ