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]
Message-ID: <20231003200739.GC16417@wunner.de>
Date:   Tue, 3 Oct 2023 22:07:39 +0200
From:   Lukas Wunner <lukas@...ner.de>
To:     Mario Limonciello <mario.limonciello@....com>
Cc:     Mika Westerberg <mika.westerberg@...ux.intel.com>,
        bhelgaas@...gle.com, linux-kernel@...r.kernel.org,
        linux-pci@...r.kernel.org
Subject: Re: [PATCH] PCI: Make d3cold_allowed sysfs attribute read only

On Tue, Oct 03, 2023 at 11:30:54AM -0500, Mario Limonciello wrote:
> On 10/3/2023 04:44, Mika Westerberg wrote:
> > On Mon, Oct 02, 2023 at 01:10:25PM -0500, Mario Limonciello wrote:
> > > Before d3cold was stable userspace was allowed to influence the kernel's
> > > decision of whether to enable d3cold for a device by a sysfs file
> > > `d3cold_allowed`.  This potentially allows userspace to break the suspend
> > > for the system.
> > > 
> > > For debugging purposes `pci_port_pm=` can be used to control whether
> > > a PCI port will go into D3cold and runtime PM can be turned off by
> > > sysfs on PCI end points.
> > > 
> > > Change the sysfs attribute to read-only and simplify the internal kernel
> > > logic to avoid needing to store the userspace request.
> > 
> > I wonder if this ends up breaking some userspace apps? Not objecting
> > though, just wanted to mention ;-)
> > 
> > One thing we could do is to taint the kernel or log a warning if
> > userspace touches this but allow it to do so.
> 
> If we collectively decide it needs to stay RW for userspace compatbility
> then I'll respin it to keep the store call but ignore whatever is written,
> return -EINVAL and emit a pr_warn_once() that it's a no-op.

I'd suggest to return 0 to avoid even the faintest ABI change whiff.

Just emit a warning once explaining that the feature is deprecated and
mark the attribute as such in ABI documentation.

Thanks,

Lukas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ