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: <200705121334.17565.rjw@sisk.pl>
Date:	Sat, 12 May 2007 13:34:16 +0200
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	ego@...ibm.com, Andrew Morton <akpm@...ux-foundation.org>
Cc:	Oleg Nesterov <oleg@...sign.ru>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>, Pavel Machek <pavel@....cz>,
	"Eric W. Biederman" <ebiederm@...ssion.com>
Subject: Re: [PATCH 1/7] Freezer: Read PF_BORROWED_MM in a nonracy way

On Saturday, 12 May 2007 12:52, Gautham R Shenoy wrote:
> On Sat, May 12, 2007 at 12:41:54PM +0200, Rafael J. Wysocki wrote:
> > 
> > Still, the following scenario is possible while we're freezing users space
> > tasks:
> > 
> > (1) user space task calls daemonize()
> > (2) freezer checks if this is a user space task and the test returns 'true'
> > (3) task calls exit_mm() and clears its TIF_FREEZE
> > (4) freezer sets TIF_FREEZE for the task
> > (5) task calls try_to_freeze() and freezes itself (bad!)
> > 
> > To prevent this from happening, I think, we should acquire task_lock() around
> > the entire block in which the test is made and TIF_FREEZE is set for the task,
> > so something more sophisticated than
> > freezer-read-pf_borrowed_mm-in-a-nonracy-way.patch is needed.
> >
> 
> Hmmm, turns out Linus was right, after all! The caller needs to acquire
> the task_lock().
> 
> > Well, I think we should ask Andrew to drop this patch and try to address the
> > issue in the next series of patches.
> 
> I think it's a good idea. 
> 
> I would want to review the patches again. The more I look at them,
> the better I seem to understand the subtleties in the freezer code.

Okay, I'll put the entire series on the web later today and I'll let you know
when it's ready.

Andrew, could you please drop
freezer-read-pf_borrowed_mm-in-a-nonracy-way.patch?

I believe that the other six freezer patches currently in -mm are correct.

Greetings,
Rafael
-
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