lkml.org 
[lkml]   [2023]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] PCI: Make d3cold_allowed sysfs attribute read only
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.

\
 
 \ /
  Last update: 2023-10-03 11:45    [W:0.138 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site