ACK: [SRU][R][PATCH 0/1] scsi: megaraid_sas: Limit NVMe request size to the PRP chain frame
Andrei Gherzan
andrei.gherzan at canonical.com
Mon Sep 7 11:02:53 UTC 2026
On 26/09/07 04:53PM, Alex Shi via kernel-team wrote:
> BugLink: https://bugs.launchpad.net/bugs/2148534
>
> SRU Justification:
>
> [Impact]
>
> NVMe JBOD devices behind MegaRAID controllers can receive block-layer
> requests larger than the driver's fixed PRP chain frame can describe.
> When that happens, megasas_make_prp_nvme() writes beyond cmd->sg_frame,
> which can fault immediately or silently corrupt a neighbouring in-flight
> command's PRP list.
>
> [Fix]
>
> Cherry-pick upstream commit:
> af8c27375733 ("scsi: megaraid_sas: Limit NVMe request size to the PRP chain frame")
>
> The fix caps max_hw_sectors at the transfer size that fits in the
> per-command PRP chain frame instead of trusting only the firmware MDTS.
>
> [Test Plan]
>
> Boot a kernel with the patch on a system with an NVMe JBOD drive behind a
> MegaRAID controller and run large sequential write I/O that previously
> triggered the PRP chain-frame overrun. Confirm the I/O completes without
> the megaraid_sas page fault or neighbouring command corruption.
>
> [Where problems could occur]
>
> The change reduces the maximum request size advertised for affected NVMe
> devices. Regressions would most likely appear as reduced throughput for
> large sequential I/O on MegaRAID-attached NVMe devices, but the cap is
> derived from the driver's actual PRP-list capacity and prevents memory
> corruption.
>
> Thomas Lamprecht (1):
> scsi: megaraid_sas: Limit NVMe request size to the PRP chain frame
>
> drivers/scsi/megaraid/megaraid_sas_base.c | 13 ++++++++++++-
> 1 file changed, 12 insertions(+), 1 deletion(-)
Acked-by: Andrei Gherzan <andrei.gherzan at canonical.com>
--
Andrei Gherzan
gpg: rsa4096/D4D94F67AD0E9640
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20260907/40f3b874/attachment.sig>
More information about the kernel-team
mailing list