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] [day] [month] [year] [list]
Date:	Fri, 22 Apr 2016 22:12:18 +0900
From:	Sergey Senozhatsky <sergey.senozhatsky@...il.com>
To:	Petr Mladek <pmladek@...e.com>
Cc:	Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
	Pan Xinhui <xinhui@...ux.vnet.ibm.com>,
	Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Jan Kara <jack@...e.com>, Tejun Heo <tj@...nel.org>,
	Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>,
	linux-kernel@...r.kernel.org,
	Byungchul Park <byungchul.park@....com>
Subject: Re: [PATCH v11 3/3] printk: make printk.synchronous param rw

Hello,

On (04/22/16 10:41), Petr Mladek wrote:
> Ah, I see and feel shame. It is actually explained in the comment
> above printk_initcall_done declaration. Well, the explanation confused
> me a bit ;-) I suggest to change it sligtly:
> 
> /*
>  * printk_sync_set() can be called from two places:
>  *
>  * - early from start_kernel()->parse_args().  But we can't kthread_run()
>  *   at this stage, so we just set the param value.  The actual
>  *   initalization happens later, from the late_initcall().
>  *
>  * - even later from user space via sysfs knob.  We can kthread_run()
>  *   there if needed.
>  */
> 
> Or we could write this even more explicitely:
> 
> /*
>  * Prevent starting kthreads from start_kernel()->parse_args().  It is not
>  * possible at this stage.  Instead do so via the inticall.
>  */
> static bool printk_initcall_done;

will take a look, thanks!

> In each case, I would move the comment and the declaration right above the
> printk_sync_set().

I'm also thinking about renaming it to `printk_kthread_can_run', feels
like this name gives better description.

will resend shortly.

	-ss

Powered by blists - more mailing lists