Re: [ 00/10] [Suspend2] Modules support.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Pá 03-02-06 15:29:15, Olivier Galibert wrote:
> On Fri, Feb 03, 2006 at 11:41:29AM +0100, Pavel Machek wrote:
> > > I don't even want to think about the interactions
> > > between freezing the userspace memory pages and running some processes
> > > which may malloc/mmap at the same time.
> > 
> > There are none. userspace helper is mlocked, and rest of userspace is
> > stopped.
> 
> Unless the userspace code is as tight as mission-critical RT code, I
> don't see how that can work reliably.  Some problems I see:

It needs to be tight. Helper may not do anything below after it frozen
rest of userland.

> - What happens if the helper faults in new pages, changes its brk or
> mmaps things?  Can we actually swap at that point?  mlocking takes
> care of the fault in, not of the rest.
> 
> - What happens if the helper reads files?  Where will the pages with
> the file data be put?  Are we saving the dcache in the image, and if
> yes which state of the dcache?
> 
> - What happens if the helper writes files?  What state are we saving,
> before starting the helper or after?  Will the fs be in a coherent
> state after resume?
> 
> - What about IPC?  What if for instance the helper tries to contact
> HAL to get some system information?
> 
> And if you decide on rules on what the userspace can and can't do, how
> do you plan to enforce them?  We have filesystems on the line there,

We don't "enforce" rules in kernel, too, still it seems to
work. Helper needs similar level of auditing to kernel code. It is not
your average GUI application.

> The idea of trying to save a state that can be modified dynamically
> while you're saving in unpredictable ways makes me very, very afraid.
> At least when you're in the kernel you can have complete control over
> the machine when needed.

Take a look at code. State is still atomically snapshoted with
interrupts disabled, in kernel.
							Pavel
-- 
Thanks, Sharp!
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux