]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
RDMA/efa: Check stored completion CTX command ID with received one
authorYonatan Nachum <ynachum@amazon.com>
Wed, 10 Dec 2025 13:06:13 +0000 (13:06 +0000)
committerLeon Romanovsky <leon@kernel.org>
Thu, 18 Dec 2025 15:12:38 +0000 (10:12 -0500)
commit4b01ec0f133b3fe1038dc538d6bfcbd72462d2f0
tree0b559b5e40a609ba9feac0231df0ddc0ce8a9c15
parent80351761facb63d6fab1e42c77d7565047bc10ad
RDMA/efa: Check stored completion CTX command ID with received one

In admin command completion, we receive a CQE with the command ID which
is constructed from context index and entropy bits from the admin queue
producer counter. To try to detect memory corruptions in the received
CQE, validate the full command ID of the fetched context with the CQE
command ID. If there is a mismatch, complete the CQE with error.
Also use LSBs of the admin queue producer counter to better detect
entropy mismatch between smaller number of commands.

Reviewed-by: Daniel Kranzdorf <dkkranzd@amazon.com>
Reviewed-by: Michael Margolin <mrgolin@amazon.com>
Signed-off-by: Yonatan Nachum <ynachum@amazon.com>
Link: https://patch.msgid.link/20251210130614.36460-2-ynachum@amazon.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/efa/efa_com.c