From: Niklas Cassel <cassel@kernel.org>
To: sashiko-reviews@lists.linux.dev
Cc: linux-pci@vger.kernel.org
Subject: Re: [PATCH v2 2/2] PCI: dwc: ep: Fix unmap potentially unmapping the wrong iATU
Date: Thu, 30 Jul 2026 16:16:24 +0200 [thread overview]
Message-ID: <amtcuIHhH5-f1cqd@ryzen> (raw)
In-Reply-To: <20260730135116.950031F000E9@smtp.kernel.org>
On Thu, Jul 30, 2026 at 01:51:16PM +0000, sashiko-bot@kernel.org wrote:
> New issues:
> - [High] Using `readl()` on the host's MSI target address to flush posted writes generates a dangerous PCIe Memory Read Request, causing kernel panics.
(snip)
> [Severity: High]
> Does using readl() on the host's MSI target address generate a dangerous
> non-posted PCIe Memory Read Request?
>
> Most host interrupt controllers (like GIC ITS or APIC) do not support reads
> to their doorbell addresses and will reply with an Unsupported Request (UR).
>
> The DWC controller translates the UR completion into an AXI Slave Error,
> which can trigger a synchronous external abort and kernel panic on the
> endpoint CPU.
>
> This concern applies to flushing posted writes in both
> dw_pcie_ep_raise_msix_irq() and dw_pcie_ep_raise_msi_irq().
>
> > + dw_pcie_ep_unmap_addr(epc, func_no, 0, ep->msi_mem_phys);
> > + ep->msi_iatu_mapped = false;
> > + }
> > +
> > msg_addr = dw_pcie_ep_align_addr(epc, msg_addr, &map_size, &offset);
>
I don't see how this comment is valid.
I tested this patch with two Rock 5Bs, one in EP mode and one in RC mode.
The PCIe controller on the host:
https://github.com/torvalds/linux/blob/v7.2-rc5/arch/arm64/boot/dts/rockchip/rk3588-extra.dtsi#L370
is indeed using GIC ITS, and I saw no issues at all.
Additionally, we have already been doing a readl() on the MSI-X target
address, for every single MSI-X, since commit c22533c66cca ("PCI: dwc: ep:
Flush MSI-X write before unmapping its ATU entry"), first included in
v7.0-rc2, and not a single soul has complained since then.
So personally I am not too concerned.
Kind regards,
Niklas
prev parent reply other threads:[~2026-07-30 14:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-30 13:31 [PATCH v2 0/2] PCI: dwc: ep: Fix unmap potentially unmapping the wrong iATU Niklas Cassel
2026-07-30 13:31 ` [PATCH v2 1/2] PCI: dwc: ep: Flush the cached MSI address before unmap Niklas Cassel
2026-07-30 13:48 ` sashiko-bot
2026-07-30 13:31 ` [PATCH v2 2/2] PCI: dwc: ep: Fix unmap potentially unmapping the wrong iATU Niklas Cassel
2026-07-30 13:51 ` sashiko-bot
2026-07-30 14:16 ` Niklas Cassel [this message]
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=amtcuIHhH5-f1cqd@ryzen \
--to=cassel@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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