Re: malicious filesystems (was Re: [linux-pm] Re: [PATCH] Remove process freezer from suspend to RAM

2007-07-21 Thread Pavel Machek
On Sun 2007-07-15 15:06:59, Miklos Szeredi wrote: > > > SIGKILL won't work on a stopped task. Neither on a traced task. > > > > Why do you think so? It works in both cases (ptracer can use > > PT_TRACE_EXIT, but the task is killed anyway). > > Just from experience with tasks stuck in "T" state.

Re: malicious filesystems (was Re: [linux-pm] Re: [PATCH] Remove process freezer from suspend to RAM

2007-07-15 Thread Miklos Szeredi
> > SIGKILL won't work on a stopped task. Neither on a traced task. > > Why do you think so? It works in both cases (ptracer can use > PT_TRACE_EXIT, but the task is killed anyway). Just from experience with tasks stuck in "T" state. After for example an UML dies, some of the processes only rea

Re: malicious filesystems (was Re: [linux-pm] Re: [PATCH] Remove process freezer from suspend to RAM

2007-07-14 Thread Oleg Nesterov
I am sorry for being completely off-topic, but Miklos Szeredi wrote: > > SIGKILL won't work on a stopped task. Neither on a traced task. Why do you think so? It works in both cases (ptracer can use PT_TRACE_EXIT, but the task is killed anyway). > Neither on a zombie (how many newbies are thorou

Re: malicious filesystems (was Re: [linux-pm] Re: [PATCH] Remove process freezer from suspend to RAM pathway)

2007-07-12 Thread Miklos Szeredi
> > Ok, I'll just blame fuse here. 'You have to write to /sys > > files for SIGKILL to work' is not funny. > > SIGKILL won't work on a stopped task. Neither on a traced task. > Neither on a zombie (how many newbies are thoroughly confused about > that ;) > > And it won't work on a task that is h

Re: malicious filesystems (was Re: [linux-pm] Re: [PATCH] Remove process freezer from suspend to RAM pathway)

2007-07-12 Thread Miklos Szeredi
> > Actually there's also a non-malicious case in which waiting for > > requests to finish won't work: when one fuse filesystem is accessing > > another. > > > > Since we are blocking new fuse requests, that might block a fuse > > daemon, which in turn makes it impossible to finish the pending > >

Re: malicious filesystems (was Re: [linux-pm] Re: [PATCH] Remove process freezer from suspend to RAM pathway)

2007-07-12 Thread Pavel Machek
Hi! > > So you want me to handle _malicious_ filesystems now? > > > > That should be easy... :-). You already have nasty deadlocks in FUSE, > > and you solve them by "root can echo 1 > abort"... so allow me the > > same possibility. > > > > We can tell fused we are freezing, and if all the reque

Re: malicious filesystems (was Re: [linux-pm] Re: [PATCH] Remove process freezer from suspend to RAM pathway)

2007-07-09 Thread Miklos Szeredi
> > > We can just wait for all fuse requests to be serviced before > > > proceeding further with freeze, right? > > > > Right. Nice way to slow down or stop the suspend with an unprivileged > > process. Avoiding that sort of DoS is one of the design goals of > > fuse. > > So you want me to hand

Re: malicious filesystems (was Re: [linux-pm] Re: [PATCH] Remove process freezer from suspend to RAM pathway)

2007-07-09 Thread Miklos Szeredi
> > In that case the "we need suspend to be invisible to userspace" as a > > reason to use the freezer would also be moot, since if you don't > > schedule userspace after offlining the CPUs, it can't notice this. > > After? Can you do the offlining atomically? Don't know. Wait for all CPUs to re

Re: malicious filesystems (was Re: [linux-pm] Re: [PATCH] Remove process freezer from suspend to RAM pathway)

2007-07-09 Thread Oliver Neukum
Am Montag, 9. Juli 2007 schrieb Miklos Szeredi: > In that case the "we need suspend to be invisible to userspace" as a > reason to use the freezer would also be moot, since if you don't > schedule userspace after offlining the CPUs, it can't notice this. After? Can you do the offlining atomically?

Re: malicious filesystems (was Re: [linux-pm] Re: [PATCH] Remove process freezer from suspend to RAM pathway)

2007-07-09 Thread Miklos Szeredi
> Please have a look at the documentation update at the bottom of this patch: > > http://www.sisk.pl/kernel/hibernation_and_suspend/2.6.22-rc7/patches/15-freezer-make-kernel-threads-nonfreezable-by-default.patch > > It says what the freezer is for in the first place. :-) Thanks, good description

Re: malicious filesystems (was Re: [linux-pm] Re: [PATCH] Remove process freezer from suspend to RAM pathway)

2007-07-08 Thread Rafael J. Wysocki
On Sunday, 8 July 2007 21:50, Miklos Szeredi wrote: > > > > Well, fix userspace filesystems and maybe NFS. If they react to > > > > sigstop in timely manner, they will work with suspend properly, too. > > > > > > Which is pretty much impossible, given the unix filesystem API. To be > > > able to

Re: malicious filesystems (was Re: [linux-pm] Re: [PATCH] Remove process freezer from suspend to RAM pathway)

2007-07-08 Thread Miklos Szeredi
> > > Well, fix userspace filesystems and maybe NFS. If they react to > > > sigstop in timely manner, they will work with suspend properly, too. > > > > Which is pretty much impossible, given the unix filesystem API. To be > > able to react to sigstop, the operations in question need to be > > re

Re: malicious filesystems (was Re: [linux-pm] Re: [PATCH] Remove process freezer from suspend to RAM pathway)

2007-07-08 Thread Al Viro
On Sun, Jul 08, 2007 at 08:08:56PM +0200, Rafael J. Wysocki wrote: > Well, the system that cannot access its filesystems is not in a consistent > state, so it generally is not reasonable to suspend or hibernate it. > > In fact, NFS and similar filesystems should always be unmounted before the > su

Re: malicious filesystems (was Re: [linux-pm] Re: [PATCH] Remove process freezer from suspend to RAM pathway)

2007-07-08 Thread Rafael J. Wysocki
On Sunday, 8 July 2007 16:23, Miklos Szeredi wrote: > > > > > > We can just wait for all fuse requests to be serviced before > > > > > > proceeding further with freeze, right? > > > > > > > > > > Right. Nice way to slow down or stop the suspend with an unprivileged > > > > > process. Avoiding th

Re: malicious filesystems (was Re: [linux-pm] Re: [PATCH] Remove process freezer from suspend to RAM pathway)

2007-07-08 Thread David Brownell
On Sunday 08 July 2007, Al Viro wrote: > On Sun, Jul 08, 2007 at 12:37:48PM +, Pavel Machek wrote: > > I'm talking malicious _filesystems_ here, and yes, fuse is first of > > this kind. We want to handle unresponding NFS, but I believe handling > > malicious NFS server nicely is slightly out of

Hibernation Redesign (was: malicious filesystems (was Re: [linux-pm] Re: [PATCH] Remove process freezer from suspend to RAM)

2007-07-08 Thread Al Boldi
Pavel Machek wrote: > We are stuck with refrigerator for now, and at least for hibernation, > I don't see any feasible alternative. Feasible alternative? Freezing is the only way to successfully suspend, in kernel space that is. The problem here is: Why do we freeze in kernel space? APM didn'

Re: malicious filesystems (was Re: [linux-pm] Re: [PATCH] Remove process freezer from suspend to RAM pathway)

2007-07-08 Thread Miklos Szeredi
> > > > > We can just wait for all fuse requests to be serviced before > > > > > proceeding further with freeze, right? > > > > > > > > Right. Nice way to slow down or stop the suspend with an unprivileged > > > > process. Avoiding that sort of DoS is one of the design goals of > > > > fuse. > >

Re: malicious filesystems (was Re: [linux-pm] Re: [PATCH] Remove process freezer from suspend to RAM pathway)

2007-07-08 Thread Al Viro
On Sun, Jul 08, 2007 at 12:37:48PM +, Pavel Machek wrote: > I'm talking malicious _filesystems_ here, and yes, fuse is first of > this kind. We want to handle unresponding NFS, but I believe handling > malicious NFS server nicely is slightly out of scope. If your variant doesn't handle comprom

Re: malicious filesystems (was Re: [linux-pm] Re: [PATCH] Remove process freezer from suspend to RAM pathway)

2007-07-08 Thread Rafael J. Wysocki
On Sunday, 8 July 2007 09:21, Miklos Szeredi wrote: > > > > We can just wait for all fuse requests to be serviced before > > > > proceeding further with freeze, right? > > > > > > Right. Nice way to slow down or stop the suspend with an unprivileged > > > process. Avoiding that sort of DoS is on

Re: malicious filesystems (was Re: [linux-pm] Re: [PATCH] Remove process freezer from suspend to RAM pathway)

2007-07-08 Thread Pavel Machek
Hi! > > > > We can just wait for all fuse requests to be serviced before > > > > proceeding further with freeze, right? > > > > > > Right. Nice way to slow down or stop the suspend with an unprivileged > > > process. Avoiding that sort of DoS is one of the design goals of > > > fuse. > > > > S

Re: malicious filesystems (was Re: [linux-pm] Re: [PATCH] Remove process freezer from suspend to RAM pathway)

2007-07-08 Thread Miklos Szeredi
> > > We can just wait for all fuse requests to be serviced before > > > proceeding further with freeze, right? > > > > Right. Nice way to slow down or stop the suspend with an unprivileged > > process. Avoiding that sort of DoS is one of the design goals of > > fuse. > > So you want me to hand

malicious filesystems (was Re: [linux-pm] Re: [PATCH] Remove process freezer from suspend to RAM pathway)

2007-07-07 Thread Pavel Machek
Hi! > > We can just wait for all fuse requests to be serviced before > > proceeding further with freeze, right? > > Right. Nice way to slow down or stop the suspend with an unprivileged > process. Avoiding that sort of DoS is one of the design goals of > fuse. So you want me to handle _malicio