Re: [PATCH v2 4/4] nvme: code command_id with a genctr for use-after-free validation
From: Chaitanya Kulkarni <hidden>
Date: 2021-05-26 01:47:59
On 5/25/21 17:45, Keith Busch wrote:
quoted
The bad controller should be fixed. In the past, I've sent patches that check that sqid match in nvme cqe to protect faulty drives that might send the completion on a wrong msix. My patch wasn't accepted since it added an additional "if" in the fast path. Now we're adding much more operation in the fast path because of buggy ctrl ?I shared the same performance concern on v1 on this series. I haven't been able to test this one yet (only have emulation for two more weeks). Hannes says the bug this catches happens frequently enough on TCP. If we don't catch it, we get kernel panic or corruption, so we defintely need to do something. Sagi correctly noted this type of bug is not unique to TCP (or even NVMe, for that matter), but if there is a performance impact on PCI, and no one so far reports such an issue, I would still recommend this type of mitigation be isolated to transports that actually observe invalid CQEs.
Please do that if possible. _______________________________________________ Linux-nvme mailing list Linux-nvme@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-nvme