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:	Fri, 13 May 2011 15:19:58 +0200
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	Frederic Weisbecker <fweisbec@...il.com>
Cc:	Steven Rostedt <rostedt@...dmis.org>, Ingo Molnar <mingo@...e.hu>,
	LKML <linux-kernel@...r.kernel.org>,
	"H. Peter Anvin" <hpa@...or.com>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH 2/2] x86: Make the x86-64 stacktrace code safely
 callable from scheduler

On Fri, 2011-05-13 at 14:48 +0200, Frederic Weisbecker wrote:
> I haven't observed any deadlock. trace events disable preemption and
> other tracers do too (my changelog was buggy).
> 
> I just worried about potential other users, like a WARN_ON in the
> scheduler or so.
> 
> My worry is the following scenario:
> 
> schedule() {
>         acquire(rq)
>                                                         set_tsk_need_resched
>         WARN_ON() {
>                 stack_trace() {
>                         preempt_enable() {
>                                 preempt_schedule() {

Would never happen, because rq->lock is a spinlock which holds another
preempt count so preempt_enable() would never schedule.

>                                         acquire(rq)
>                                 }
>                         }
>                 }
>         }
> }



> I don't know if it happens that one set TIF_NEED_RESCHED remotely,

Yes

> or if TIF_NEED_RESCHED can be set when we hold the rq,

Yes

>  and then we
> can be followed by a WARN_ON, ...

Not quite sure, but possible.

> So I preferred to be careful. 

Still not quite seeing how all things could go bang.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ