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, 07 Apr 2007 19:47:45 +1000
From:	Nigel Cunningham <nigel@...el.suspend2.net>
To:	"Rafael J. Wysocki" <rjw@...k.pl>
Cc:	Pavel Machek <pavel@....cz>, Gautham R Shenoy <ego@...ibm.com>,
	akpm@...ux-foundation.org, paulmck@...ibm.com,
	torvalds@...ux-foundation.org, linux-kernel@...r.kernel.org,
	vatsa@...ibm.com, Oleg Nesterov <oleg@...sign.ru>, mingo@...e.hu,
	dipankar@...ibm.com, dino@...ibm.com,
	masami.hiramatsu.pt@...achi.com
Subject: Re: [PATCH 1/8] Enhance process freezer interface for usage beyond
	software suspend

Hi.

On Sat, 2007-04-07 at 11:33 +0200, Rafael J. Wysocki wrote:
> On Saturday, 7 April 2007 00:20, Nigel Cunningham wrote:
> > > > > > > -	current->flags |= PF_NOFREEZE;
> > > > > > > +	freezer_exempt(FE_ALL);
> > > > > > >  	pid = kernel_thread(do_linuxrc, "/linuxrc", SIGCHLD);
> > > > > > >  	if (pid > 0) {
> > > > > > >  		while (pid != sys_wait4(-1, NULL, 0, NULL))
> > > > > > 
> > > > > > Does this mean we have userland /linuxrc running with PF_NOFREEZE?
> > > > > > That would be very bad...
> > > > > 
> > > > > No, actually it is _required_ for the userland resume to work.  Well, perhaps
> > > > > I should place a comment in there so that I don't have to explain this again
> > > > > and again. :-)
> > > > 
> > > > Can you put big bold comment there?
> > > >
> > > > Why is it needed? Freezer never freezes _current_ task.
> > > 
> > > No, it doesn't, but this task spawns linuxrc and then calls sys_wait4() in a
> > > loop.
> > > 
> > > Well, actually, I'll try to plant try_to_freeze() in this loop and see if that
> > > works.  If it doesn't, I'll add a comment.
> > 
> > It works. I've had:
> > 
> >                 while (pid != sys_wait4(-1, NULL, 0, NULL)) {
> >                         yield();
> >                         try_to_freeze();
> >                 }
> > 
> > there for ages for Suspend2.
> 
> OK, thanks.  Is there any particular reason to place try_to_freeze() after
> yield()?

Not that I remember. I haven't touched that for years :)

Nigel

-
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