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]
Message-ID: <20160316075605.GE3217@swordfish>
Date:	Wed, 16 Mar 2016 16:56:05 +0900
From:	Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
To:	Byungchul Park <byungchul.park@....com>
Cc:	Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
	Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
	Jan Kara <jack@...e.cz>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Jan Kara <jack@...e.com>, Petr Mladek <pmladek@...e.com>,
	Tejun Heo <tj@...nel.org>,
	Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>,
	linux-kernel@...r.kernel.org
Subject: Re: [RFC][PATCH v4 1/2] printk: Make printk() completely async

On (03/16/16 16:30), Byungchul Park wrote:
>
> Do you mean the wake_up_process() in console_unlock?

no, I meant wake_up_process(printk_kthread), the newly added one.


-- if we are going to have wake_up_process() in wake_up_klogd_work_func(),
then we need `in_sched' message to potentially trigger a recursion chain

wake_up_klogd_work_func()->wake_up_process()->printk()->wake_up_process()->printk()...

to break this printk()->wake_up_process()->printk(), we need wake_up_process() to
be under the logbuf lock; so vprintk_emit()'s if (logbuf_cpu == this_cpu) will act.


-- if we are going to have wake_up_process() in console_unlock(), then

console_unlock()->{up(), wake_up_process()}->printk()->{console_lock(), console_unlock()}->{up(), wake_up_process()}->printk()...

is undetectable... by the time console_unlock() calls wake_up_process() there
are no printk() locks that this CPU owns.


> I said they should be kept *out of* the critical section. :-)
> Otherwise, it can recurse us forever.

can you explain?

	-ss

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ