From: Pavel Machek <pavel@suse.cz>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Nigel Cunningham <ncunningham@cyclades.com>,
Linux-pm mailing list <linux-pm@lists.osdl.org>
Subject: Re: Re: Hotplug events during sleep transition
Date: Sat, 24 Dec 2005 16:28:14 +0100 [thread overview]
Message-ID: <20051224152814.GK26351@elf.ucw.cz> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0512241001500.23067-100000@netrider.rowland.org>
[-- Attachment #1: Type: text/plain, Size: 2031 bytes --]
On So 24-12-05 10:11:13, Alan Stern wrote:
> On Fri, 23 Dec 2005, Greg KH wrote:
>
> > On Fri, Dec 23, 2005 at 04:22:44PM -0500, Alan Stern wrote:
> > > On Fri, 23 Dec 2005, Pavel Machek wrote:
> > >
> > > > Well, if you can find some elegant solution in the core, I think thats
> > > > the best way.
> > > >
> > > > You could set system_state to "suspending" or something like that, and
> > > > just if() out notifications in that case.
> > >
> > > How about simply adding a call to try_to_freeze() somewhere inside
> > > kernel/kmod.c:____call_usermodehelper()? That ought to do pretty much
> > > what I want, in theory. The hotplug processes would get frozen before
> > > /sbin/hotplug is exec'ed.
> >
> > On modern distros, /sbin/hotplug is set to NULL, so this isn't an issue.
> > We use netlink to send the data out, so this might not even be a problem
> > anymore...
>
> Indeed it might not. On my older FC3 system I end up with unwanted
> processes, but under FC4 that doesn't happen. (Note however that even on
> the FC4 system, /sbin/hotplug is not empty and /proc/sys/kernel/hotplug
> does point to /sbin/hotplug.)
>
> The ideal situation would be to have PF_FREEZE automatically set for every
> new process created while userspace was frozen. Kernel threads could
> remove the flag and set PF_NOFREEZE if they wanted, while user processes
> would automatically get frozen before returning to userspace. This
> approach would eliminate all the loopholes at once.
It would also prevent some clever stuff with u-swsusp. We'll want to
keep u-swsusp program controlling suspend. I don't see how it needs to
exec() today, but eventually it may want to run some properly-audited
helpers...
...okay, better not, because that would mean memory allocation while
suspended => bad.
Anyway, doing check in exec() or something like that would slow down
hot path. Just take fix userland exec's during suspend one-by-one. We
are doing something wrong if we attempt that, anyway.
Pavel
--
Thanks, Sharp!
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2005-12-24 15:28 UTC|newest]
Thread overview: 69+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-22 14:28 Hotplug events during sleep transition Alan Stern
2005-12-22 14:34 ` Pavel Machek
2005-12-22 18:20 ` Dmitry Torokhov
2005-12-22 20:52 ` Patrick Mochel
2005-12-22 20:56 ` Randy.Dunlap
2005-12-22 22:13 ` Alan Stern
2005-12-23 3:49 ` Patrick Mochel
2005-12-23 3:52 ` Dmitry Torokhov
2005-12-23 15:20 ` Alan Stern
2005-12-23 15:35 ` Patrick Mochel
2005-12-23 16:52 ` Alan Stern
2005-12-23 17:20 ` Pavel Machek
2005-12-23 21:22 ` Alan Stern
2005-12-23 21:28 ` Greg KH
2005-12-23 22:09 ` Nigel Cunningham
2005-12-23 22:31 ` Pavel Machek
2005-12-23 22:40 ` Nigel Cunningham
2005-12-23 22:48 ` Pavel Machek
2005-12-23 22:57 ` Nigel Cunningham
2005-12-24 0:29 ` Nigel Cunningham
2005-12-24 15:11 ` Alan Stern
2005-12-24 15:28 ` Pavel Machek [this message]
2005-12-24 17:02 ` Greg KH
2005-12-23 21:28 ` Pavel Machek
2005-12-23 19:40 ` Greg KH
2005-12-24 0:23 ` Patrick Mochel
2005-12-25 2:56 ` Alan Stern
2005-12-25 8:53 ` Pavel Machek
2005-12-25 16:43 ` Alan Stern
2005-12-25 16:52 ` Dmitry Torokhov
2005-12-25 19:54 ` Pavel Machek
2005-12-25 19:52 ` Pavel Machek
2005-12-26 3:53 ` Alan Stern
2005-12-26 21:20 ` Patrick Mochel
2005-12-26 22:50 ` Dmitry Torokhov
2005-12-26 23:01 ` Alan Stern
2005-12-27 21:45 ` Dmitry Torokhov
2005-12-27 22:08 ` Pavel Machek
2005-12-27 22:21 ` Dmitry Torokhov
2005-12-27 22:31 ` Pavel Machek
2005-12-27 22:39 ` Dmitry Torokhov
2005-12-27 22:44 ` Pavel Machek
2005-12-29 2:07 ` Alan Stern
2005-12-27 21:09 ` Patrick Mochel
2005-12-27 21:51 ` Dmitry Torokhov
2005-12-28 4:36 ` Patrick Mochel
2005-12-28 6:11 ` Dmitry Torokhov
2005-12-28 10:59 ` Rafael J. Wysocki
2005-12-29 2:18 ` Alan Stern
2005-12-29 2:55 ` Nigel Cunningham
2005-12-29 11:29 ` Rafael J. Wysocki
2005-12-30 17:46 ` Alan Stern
2006-01-04 23:31 ` Pavel Machek
2006-01-05 16:07 ` Alan Stern
2006-01-05 19:05 ` Pavel Machek
2005-12-29 2:13 ` Alan Stern
2005-12-29 2:10 ` Alan Stern
2005-12-29 5:20 ` Dmitry Torokhov
2005-12-30 18:26 ` Alan Stern
2005-12-30 19:18 ` Dmitry Torokhov
2005-12-30 19:26 ` Alan Stern
2005-12-30 19:42 ` Dmitry Torokhov
2005-12-30 20:13 ` Alan Stern
2005-12-29 2:02 ` Alan Stern
2005-12-30 18:34 ` Patrick Mochel
2005-12-30 19:21 ` Alan Stern
2006-01-02 23:49 ` Patrick Mochel
2005-12-26 23:25 ` Alan Stern
2005-12-23 18:32 ` Dmitry Torokhov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051224152814.GK26351@elf.ucw.cz \
--to=pavel@suse.cz \
--cc=linux-pm@lists.osdl.org \
--cc=ncunningham@cyclades.com \
--cc=stern@rowland.harvard.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox