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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 2 Sep 2011 16:19:05 +0200 (CEST)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Eric Dumazet <eric.dumazet@...il.com>
cc:	Andi Kleen <andi@...stfloor.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Andi Kleen <ak@...ux.intel.com>,
	Oleg Nesterov <oleg@...hat.com>
Subject: Re: [PATCH 4/4] posix-timers: turn it_signal into it_valid flag

On Fri, 2 Sep 2011, Eric Dumazet wrote:

> Le vendredi 02 septembre 2011 à 12:06 +0200, Thomas Gleixner a écrit :
> 
> > ------------------>
> > Subject: posix-timers: Simplify deletion protection
> > From: Thomas Gleixner <tglx@...utronix.de>
> > Date: Fri, 02 Sep 2011 11:59:14 +0200
> > 
> > k_itimer->it_signal is soleley used to protect a timer lookup against
> > a concurrent deletion. We can use k_itimer->list for the same purpose.
> > 
> 
> Well, this patch is wrong too, unless you base it after Andi patch 1/4
> (move global timer id management to signal_struct)

I know, it's not for the current code.
 
> The test is also present to make sure one process doesnt try to use a
> timer_id of another process.

Right, but after moving the idr into sig struct it's only purpose is
to protect against deletion, which is nicely covered by the list_head
check as well.

Thanks,

	tglx

> 
> > @@ -643,7 +643,7 @@ static struct k_itimer *__lock_timer(tim
> >  	timr = idr_find(&posix_timers_id, (int)timer_id);
> >  	if (timr) {
> >  		spin_lock_irqsave(&timr->it_lock, *flags);
> > -		if (timr->it_signal == current->signal) {
> > +		if (!list_empty(&timr->list)) {
> >  			rcu_read_unlock();
> >  			return timr;
> >  		}
> 
> 
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ