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: <20120214172340.GA22645@redhat.com>
Date:	Tue, 14 Feb 2012 18:23:40 +0100
From:	Oleg Nesterov <oleg@...hat.com>
To:	David Howells <dhowells@...hat.com>
Cc:	Matt Fleming <matt@...sole-pimps.org>, linux-arch@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org,
	Matt Fleming <matt.fleming@...el.com>,
	Koichi Yasutake <yasutake.koichi@...panasonic.com>,
	Al Viro <viro@...iv.linux.org.uk>, linux-am33-list@...hat.com
Subject: Re: [PATCH 20/40] mn10300: Use set_current_blocked() and
	block_sigmask()

On 02/14, David Howells wrote:
>
> Matt Fleming <matt@...sole-pimps.org> wrote:
>
> >  asmlinkage long sys_sigsuspend(int history0, int history1, old_sigset_t mask)
> >  {
> > -	mask &= _BLOCKABLE;
> > -	spin_lock_irq(&current->sighand->siglock);
> > +	sigset_t blocked;
> > +
> >  	current->saved_sigmask = current->blocked;
>
> Can this line create a race, now that it's not protected by a lock?  It is
> possible for current->blocked to get altered by another thread.

No, only current can change ->blocked. This is even documented in
sigprocmask(). And more, the only correct way to change ->blocked
is set_current_blocked(). OK, with a couple of "I know what I am
doing" exceptions in kernel/signal.c.

Oleg.

--
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