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:	Sat, 12 May 2007 16:22:47 +0530
From:	Gautham R Shenoy <ego@...ibm.com>
To:	"Rafael J. Wysocki" <rjw@...k.pl>
Cc:	Oleg Nesterov <oleg@...sign.ru>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...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 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.

> 
> Greetings,
> Rafael

Thanks and Regards
gautham.
-- 
Gautham R Shenoy
Linux Technology Center
IBM India.
"Freedom comes with a price tag of responsibility, which is still a bargain,
because Freedom is priceless!"
-
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