From: Jason Gunthorpe <jgg@nvidia.com>
To: Wei Wang <wei.w.wang@hotmail.com>
Cc: bhelgaas@google.com, jonathan.cameron@huawei.com,
dan.carpenter@linaro.org, akpm@linux-foundation.org,
bp@alien8.de, rdunlap@infradead.org, alex@shazbot.org,
kevin.tian@intel.com, linux-kernel@vger.kernel.org,
linux-pci@vger.kernel.org
Subject: Re: [PATCH v6 1/6] PCI: Validate ACS enable flags against device-specific ACS capabilities
Date: Mon, 30 Mar 2026 10:09:32 -0300 [thread overview]
Message-ID: <20260330130932.GO310919@nvidia.com> (raw)
In-Reply-To: <SEZPR01MB43991B1D3735DAFEB73DA37DDC44A@SEZPR01MB4399.apcprd01.prod.exchangelabs.com>
On Thu, Mar 12, 2026 at 05:06:32PM +0800, Wei Wang wrote:
> The ACS flag validation used the kernel's full set of ACS control bits,
> which allowed users to request ACS features that the device does not
> support. These unsupported bits would be silently ignored by hardware.
> Validate the requested enable flags against dev->acs_capabilities so
> that only device-supported ACS bits are accepted. Accordingly, move the
> check after the device is matched, since the enable bits apply only to
> the matched device.
>
> Also change the validation to apply only to bits being enabled, since
> attempting to disable unsupported features does not cause functional
> issues.
>
> Finally, improve the error message to report which invalid bits were
> requested.
>
> Signed-off-by: Wei Wang <wei.w.wang@hotmail.com>
> ---
> drivers/pci/pci.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Jason
next prev parent reply other threads:[~2026-03-30 13:09 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-12 9:06 [PATCH v6 0/6] PCI: Add support for ACS Enhanced Capability Wei Wang
2026-03-12 9:06 ` [PATCH v6 1/6] PCI: Validate ACS enable flags against device-specific ACS capabilities Wei Wang
2026-03-30 13:09 ` Jason Gunthorpe [this message]
2026-03-12 9:06 ` [PATCH v6 2/6] Documentation/kernel-parameters: Add multi-device config_acs example Wei Wang
2026-03-30 13:10 ` Jason Gunthorpe
2026-03-12 9:06 ` [PATCH v6 3/6] PCI: Consolidate delimiter handling into pci_dev_str_match() Wei Wang
2026-03-30 13:11 ` Jason Gunthorpe
2026-05-04 5:31 ` Krzysztof Wilczyński
2026-05-07 13:33 ` Wei Wang
2026-03-12 9:06 ` [PATCH v6 4/6] PCI: Refactor disable_acs_redir and config_acs param handling Wei Wang
2026-03-12 9:06 ` [PATCH v6 5/6] PCI: Enable the enhanced ACS controls introduced by PCI_ACS_ECAP Wei Wang
2026-03-12 9:06 ` [PATCH v6 6/6] PCI: Add the enhanced ACS controls check to pci_acs_flags_enabled() Wei Wang
2026-03-30 13:21 ` Jason Gunthorpe
2026-03-12 10:59 ` [PATCH v6 0/6] PCI: Add support for ACS Enhanced Capability Wei Wang
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=20260330130932.GO310919@nvidia.com \
--to=jgg@nvidia.com \
--cc=akpm@linux-foundation.org \
--cc=alex@shazbot.org \
--cc=bhelgaas@google.com \
--cc=bp@alien8.de \
--cc=dan.carpenter@linaro.org \
--cc=jonathan.cameron@huawei.com \
--cc=kevin.tian@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=rdunlap@infradead.org \
--cc=wei.w.wang@hotmail.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.