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] [day] [month] [year] [list]
Date:   Wed, 28 Sep 2016 22:58:57 +0800
From:   Chen Yu <yu.c.chen@...el.com>
To:     "Rafael J. Wysocki" <rafael@...nel.org>
Cc:     Linux PM <linux-pm@...r.kernel.org>,
        "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Len Brown <len.brown@...el.com>, Pavel Machek <pavel@....cz>,
        Lee Jones <lee.jones@...aro.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] PM / sleep: Return RPM_SUSPENDED to keep devices in
 runtime-suspended

Hi,
On Wed, Sep 28, 2016 at 01:46:10PM +0200, Rafael J. Wysocki wrote:
> On Wed, Sep 28, 2016 at 5:26 AM, Chen Yu <yu.c.chen@...el.com> wrote:
> > Currently if the ->prepare() callback of a device returns a positive number,
> > the PM core will regard that as an indication that it may leave the
> > device runtime-suspended. However it would be more convenient to define
> > this positive number then makes it more maintainable. Consider there might be
> > already some device drivers using different positive values, this patch
> > prints a warning if the positive value is other than RPM_SUSPENDED, and hoping
> > driver developers would adjust their return values to RPM_SUSPENDED, then
> > at last we can modify the code to only enable this feature for values return
> > of RPM_SUSPENDED rather than arbitrary positive value.
> >
> > Suggested-by: Lee Jones <lee.jones@...aro.org>
> > Suggested-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> > Signed-off-by: Chen Yu <yu.c.chen@...el.com>
> > ---
> >  }
> 
> No.
> 
> (1) RPM_SUSPENDED has a specific meaning to the runtime PM framework,
> so please don't overload it.
> 
> (2) Define a new symbol (e.g. DPM_DIRECT_COMPLETE), but allow drivers
> to return positive numbers different from that.
> 
OK.
> That may be useful if someone wants to do "return a > b" or "return
> count", where "direct complete" is to be used for all values of count
> different from 0.
> 
> The issue here is that "1" in your previous patch looked arbitrary, so
> you're addressing this by defining a symbol to use instead.
> 
OK.
> And BTW, there are places that return "1" already from their
> ->prepare(), so this patch would have generated a bunch of
> false-positives.
> 
OK, will send a new version. Thanks!
> Thanks,
> Rafael
Yu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ