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:	Mon, 5 Feb 2007 16:56:11 +0000
From:	Christoph Hellwig <hch@...radead.org>
To:	akuster <akuster@...sta.com>
Cc:	linux-kernel@...r.kernel.org, akpm@...l.org
Subject: Re: [patch 1/1] PM: Adds remount fs ro at suspend

On Sat, Feb 03, 2007 at 03:34:57PM -1000, akuster wrote:
> >Can you please explain why this can't be done in userspace?  
> 
> I am sure it can.  The idea came from customer inputs, speed is my 
> guess. echo mem > /sys/../state seems a whole lot simpler and cleaner 
> than having userspace figure out what it mounted and then doing echo mem.

I don't think we really want people to use the kernel interface directly.
Currently the distros seem to use the s2ram and s2disk helpers IIRC.

In any case there should be a userland abstraction doing all helper work
and finally calling into the kernel.

It would be nice if the embedded folk could work together with the desktop
people on the userland bits for power managment.

> In fact
> >all existing suspend solutions seem to be doing fine doing things like
> >this in userspace.
> 
> I guess I missed that boat. If you don't mind, could you point at one 
> solution.

> >NACK.  emergency_remount is exactly what it sais and should never ever
> >be used for a system that you want to keep on using later on.  
> 
> The code "emergency_remount" is almost identical to what we have been 
> using. I wanted to reuse existing code rather than dup it.

The problem with emergency_remount is that it calls do_remount_sb with
the force argument, which then calls into mark_files_ro.  This isn't
very useful because it doesn't actually stop existing writers and seems
to have a racy f_mode access.  Then again it doesn't really help either
that we want to get rid of file_list_lock the sb->s_files :)

If you really want to stop all current writes you need to call freeze_bdev,
and I'd rather expose that through a separate user interface instead of
hooking it into the suspend process at the kernel side.  For XFS you
could use the private ioctls already today, but I'd prefer a more general
solution.

-
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