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: <20160127210754.GA1593@redhat.com>
Date:	Wed, 27 Jan 2016 22:07:54 +0100
From:	Oleg Nesterov <oleg@...hat.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Peter Zijlstra <peterz@...radead.org>,
	Sasha Levin <sasha.levin@...cle.com>,
	linux-kernel@...r.kernel.org, mingo@...nel.org
Subject: Re: [PATCH] signals: work around random wakeups in sigsuspend()

On 01/27, Andrew Morton wrote:
>
> On Wed, 27 Jan 2016 17:41:54 +0100 Oleg Nesterov <oleg@...hat.com> wrote:
>
> > IOW, signal_pending() is the "special" condition, you do not need to serialize
> > this check with task->state setting, exactly because schedule() knows about the
> > signals.
>
> So it's non-buggy because signal_pending() is special.  But it *looks*
> buggy!  And there's no comment there explaining why it looks buggy but
> isn't, so someone may later come along and "fix" it for us.

perhaps we can add a comment somewhere in sched.h to explain that a task can
never sleep with task->state == STATE if signal_pending_state(STATE) is true.

Every user of signal_pending() in the wait-event-like loop relies on this well-
known fact. Say, wait_event_interruptible() or __mutex_lock_common().

This is actually more about task->state, not about TIF_SIGPENDING imo.

Oleg.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ