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, 28 Aug 2020 11:26:40 -0500
From:   Bjorn Helgaas <helgaas@...nel.org>
To:     Jean Delvare <jdelvare@...e.de>
Cc:     Jarkko Nikula <jarkko.nikula@...ux.intel.com>,
        linux-i2c@...r.kernel.org, Wolfram Sang <wsa@...-dreams.de>,
        Mika Westerberg <mika.westerberg@...ux.intel.com>,
        stable@...r.kernel.org, Bjorn Helgaas <bhelgaas@...gle.com>,
        linux-pci@...r.kernel.org, "Rafael J. Wysocki" <rjw@...ysocki.net>,
        linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
        Vaibhav Gupta <vaibhavgupta40@...il.com>
Subject: Re: [PATCH 1/2] i2c: i801: Fix runtime PM

[+cc Vaibhav]

On Wed, Jun 27, 2018 at 04:23:40PM -0500, Bjorn Helgaas wrote:
> [+cc Rafael, linux-pm, linux-kernel]
> 
> On Wed, Jun 27, 2018 at 10:15:50PM +0200, Jean Delvare wrote:
> > Hi Jarkko,
> > 
> > On Tue, 26 Jun 2018 17:39:12 +0300, Jarkko Nikula wrote:
> > > Commit 9c8088c7988 ("i2c: i801: Don't restore config registers on
> > > runtime PM") nullified the runtime PM suspend/resume callback pointers
> > > while keeping the runtime PM enabled. This causes that device stays in
> > > D0 power state and sysfs /sys/bus/pci/devices/.../power/runtime_status
> > > shows "error" when runtime PM framework attempts to autosuspend the
> > > device.
> > > 
> > > This is due PCI bus runtime PM which checks for driver runtime PM
> > > callbacks and returns with -ENOSYS if they are not set. Fix this by
> > > having a shared dummy runtime PM callback that returns with success.
> > > 
> > > Fixes: a9c8088c7988 ("i2c: i801: Don't restore config registers on runtime PM")
> > 
> > I don't want to sound like I'm trying to decline all responsibility for
> > a regression I caused, but frankly, if just using SIMPLE_DEV_PM_OPS()
> > breaks runtime PM, then it's the PM model which is broken, not the
> > i2c-i801 driver.
> > 
> > I will boldly claim that the PCI bus runtime code is simply wrong in
> > returning -ENOSYS in the absence of runtime PM callbacks, and it should
> > be changed to return 0 instead. Or whoever receives that -ENOSYS should
> > not treat it as an error - whatever makes more sense.
> > 
> > Having to add dummy functions in every PCI driver that doesn't need to
> > do anything special for runtime PM sounds plain stupid. It should be
> > pretty obvious that a whole lot of drivers are going to use
> > SIMPLE_DEV_PM_OPS() because it exists and seems to do what they want,
> > and all of them will be bugged because the PCI core is doing something
> > silly and unexpected.
> > 
> > So please let's fix it at the PCI subsystem core level. Adding Bjorn
> > and the linux-pci list to Cc.
> 
> Thanks Jean.  What you describe does sound broken.  I think the PM
> guys (cc'd) will have a better idea of how to deal with this.

Did we ever get anywhere with this?  It seems like the thread petered
out.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ