Linux PCI subsystem development
 help / color / mirror / Atom feed
From: "Krzysztof Wilczy´nski" <kw@linux.com>
To: Keith Busch <kbusch@kernel.org>
Cc: Keith Busch <kbusch@meta.com>,
	linux-pci@vger.kernel.org, bhelgaas@google.com,
	alex.williamson@redhat.com, ameynarkhede03@gmail.com,
	raphael.norwitz@nutanix.com
Subject: Re: [PATCHv2 1/2] pci: provide bus reset attribute
Date: Tue, 5 Nov 2024 07:42:16 +0900	[thread overview]
Message-ID: <20241104224216.GB1446835@rocinante> (raw)
In-Reply-To: <ZylDjhRsIeslNc5E@kbusch-mbp.dhcp.thefacebook.com>

On 24-11-04 14:58:38, Keith Busch wrote:
> On Tue, Nov 05, 2024 at 06:53:32AM +0900, Krzysztof Wilczy´nski wrote:
> > Would you have anything against if we put this new bus reset sysfs object
> > access behind the following test?
> > 
> >   if (!capable(CAP_SYS_ADMIN))
> >   	return -EPERM;
> > 
> > This is irregardless of what the permissions on the sysfs objects from the
> > DAC point of view are set to.
> > 
> > Checking CAP_SYS_ADMIN capability, to improve our default security stance,
> > on a number of important sysfs objects (e.g., reset, remove, etc.) we have
> > was something I discussed in the past with Bjorn, but never got around to
> > sending a patch to add this check.
> > 
> > Thoughts?
> 
> Sure, I'm okay that. We are using DEVICE_ATTR_WO file attribute which
> says should make it writable only by an admin, but totally fine with
> adding this explicit check here too.

Thank you!

Depending on whether Bjorn will have any feedback to might prompt a new
version of the patches to be sent, if there won't be one, then I will add
this extra check directly on the branch.

	Krzysztof


  reply	other threads:[~2024-11-04 22:42 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-25 22:27 [PATCHv2 1/2] pci: provide bus reset attribute Keith Busch
2024-10-25 22:27 ` [PATCHv2 2/2] pci: warn if a running device is unaware of reset Keith Busch
2024-10-28 19:35   ` Alex Williamson
2024-10-29 11:27   ` Niklas Schnelle
2024-11-01 19:21     ` Keith Busch
2024-11-04  9:44       ` Niklas Schnelle
2024-11-04 17:01         ` Keith Busch
2024-11-05 12:28           ` Niklas Schnelle
2024-11-05 15:46             ` Keith Busch
2024-10-29 15:06   ` ameynarkhede03
2024-10-28 19:35 ` [PATCHv2 1/2] pci: provide bus reset attribute Alex Williamson
2024-10-29 15:05 ` ameynarkhede03
2024-11-04 21:28 ` Keith Busch
2024-11-04 21:53   ` Krzysztof Wilczyński
2024-11-04 21:58     ` Keith Busch
2024-11-04 22:42       ` Krzysztof Wilczy´nski [this message]
2024-11-12 19:12 ` Keith Busch
2024-11-12 23:16 ` Bjorn Helgaas
2024-11-13 17:38   ` Keith Busch

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=20241104224216.GB1446835@rocinante \
    --to=kw@linux.com \
    --cc=alex.williamson@redhat.com \
    --cc=ameynarkhede03@gmail.com \
    --cc=bhelgaas@google.com \
    --cc=kbusch@kernel.org \
    --cc=kbusch@meta.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=raphael.norwitz@nutanix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox