Re: [PATCH v4 04/18] PCI/P2PDMA: Safely terminate ACS redirect lists
Jason Gunthorpe <[email protected]>
| Newsgroups | org.kernel.vger.linux-doc,dev.linux.lists.iommu,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pci |
|---|---|
| Message-ID | <178761377054.3197084.2344294728647079321.b4-review@b4> |
On Fri, 21 Aug 2026 22:38:35 +0300, Leon Romanovsky <[email protected]> wrote: > seq_buf marks an overflow by setting len to size + 1. The ACS diagnostic > path unconditionally writes a terminator to buffer[len - 1], so a path > with enough ACS ports to fill the 128-byte buffer writes one byte beyond > the buffer when verbose diagnostics are requested. > > Use seq_buf_str() to terminate truncated output safely and remove the final > semicolon only when the buffer did not overflow. > > [...] Reviewed-by: Jason Gunthorpe <[email protected]> -- Jason