All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Mario Limonciello <mario.limonciello@amd.com>
Cc: bhelgaas@google.com, lukas@wunner.de,
	linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org
Subject: Re: [PATCH] PCI: Make d3cold_allowed sysfs attribute read only
Date: Tue, 3 Oct 2023 12:44:07 +0300	[thread overview]
Message-ID: <20231003094407.GG3208943@black.fi.intel.com> (raw)
In-Reply-To: <20231002181025.82746-1-mario.limonciello@amd.com>

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.

  reply	other threads:[~2023-10-03  9:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-02 18:10 [PATCH] PCI: Make d3cold_allowed sysfs attribute read only Mario Limonciello
2023-10-03  9:44 ` Mika Westerberg [this message]
2023-10-03 16:30   ` Mario Limonciello
2023-10-03 20:07     ` Lukas Wunner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231003094407.GG3208943@black.fi.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=bhelgaas@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=mario.limonciello@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.