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: <20070227044246.GA20419@in.ibm.com>
Date:	Tue, 27 Feb 2007 10:12:46 +0530
From:	Srivatsa Vaddagiri <vatsa@...ibm.com>
To:	"Aneesh Kumar" <aneesh.kumar@...il.com>
Cc:	"Rafael J. Wysocki" <rjw@...k.pl>,
	"Oleg Nesterov" <oleg@...sign.ru>,
	LKML <linux-kernel@...r.kernel.org>,
	"Andrew Morton" <akpm@...l.org>, "Pavel Machek" <pavel@....cz>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	"Gautham R Shenoy" <ego@...ibm.com>
Subject: Re: [RFC][PATCH 1/3] Freezer: Fix vfork problem

On Tue, Feb 27, 2007 at 10:03:53AM +0530, Aneesh Kumar wrote:
> This means that we are not going to wait for the kernel thread
> (Parent) to freeze. I guess what vatsa suggested in previous mail is
> better.
> 
> freeezer_do_not_count(void)
> {
>   if (current->mm) {
> 
>       current->flags |= PF_FREEZER_SKIP;
>   }
> 
> }
> 
> 
> freezer_count(void)
> {
> if (current->mm) {
> current->flags &= ~PF_FREEZER_SKIP;
> try_to_freeze();
>   }
> 
> }
> 
> 
> Now if do_fork is called from kernel_thread with CLONE_VFORK we make
> the freezer wait till that kernel thread is also frozen. I think this
> is important.  with khelper thread it is okey because it is a single
> threaded workqueue.

Yes, this assumes that vfork called by a kernel thread will usually wait
only until the vfork child exec's (and not until the child exit's).
That wait should be very short and hence we can wait for vfork parent as
well.

The advanatge of this is we let kernel threads get to freeze at a place of 
their choice (rather than in some common code like do_fork).

> If do_fork is called via a user process we can skip the Parent if the
> child got frozen before calling execve.

Yes, agreed.

-- 
Regards,
vatsa
-
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