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:	Fri, 31 Jul 2015 12:02:36 -0400
From:	Len Brown <lenb@...nel.org>
To:	Oliver Neukum <oneukum@...e.com>
Cc:	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	Pavel Machek <pavel@....cz>,
	"Rafael J. Wysocki" <rafael@...nel.org>,
	"Brown, Len" <len.brown@...el.com>,
	Austin S Hemmelgarn <ahferroin7@...il.com>,
	"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/1] suspend: make sync() on suspend-to-RAM optional

On Wed, Jul 22, 2015 at 4:55 AM, Oliver Neukum <oneukum@...e.com> wrote:
> On Wed, 2015-07-22 at 03:25 +0200, Rafael J. Wysocki wrote:
>> And it is more pain for me to change the user space on each of them to
>> write to the new sysfs file on every boot than to set a kernel Kconfig
>> option once.
>
> So why at all? If you really need this in sysfs, why not write
> something like "memfast" into /sys/power/state ?

We fought this battle, and lost.

When we came out with "freeze", which is faster than "mem",
no user-space changed to take advantage of it.
"mem" is what they use on all platforms, and they simply want it to be fast.

I don't like the run-time sysfs attribute in this patch.
There are only 4 use-cases, and we can handle the 3 that matter
without a sysfs attribute:

1. OS wants sync, run-time never changes mind
    compile kernel with sync
    this is default, and what everybody is accustomed to.

2. OS does not want sync, run-time never changes mind
    compile kernel without sync
    This gives OS' that care about suspend/resume latency what they want.
    I'm fine with Austin's suggestion "depends on EXPERT"

3. OS  wants sync, run-time wants to opt-OUT
    Sorry, we'll not support his case.
    If your run a distro kernel that builds in the sync, you are stuck with it.
    If you care, then build a kernel from scratch, or run a different distro.

4. OS does not want sync, run-time sometimes wants to opt-IN
    As it turns out, Linux kernel has always invoked sync before freezing
    user-threads.  Sorry, invoking sync in kernel suspend path does not close
    a race that isn't also currently present by invoking sync from user-space.

   (yes, as discussed, the proper long term fix involves notifying file systems)

    As this user will not have a sysfs attribute to tweak to tell the
kernel to sync,
    they can simply invoke sync from user-space.

thanks,
Len Brown, Intel Open Source Technology Center
--
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