linux-stable/drivers/nvme
Nitesh Shetty ce97686124 nvme: prevent potential spectre v1 gadget
[ Upstream commit 20dc66f2d7 ]

This patch fixes the smatch warning, "nvmet_ns_ana_grpid_store() warn:
potential spectre issue 'nvmet_ana_group_enabled' [w] (local cap)"
Prevent the contents of kernel memory from being leaked to  user space
via speculative execution by using array_index_nospec.

Signed-off-by: Nitesh Shetty <nj.shetty@samsung.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-01-20 11:50:06 +01:00
..
common treewide: use get_random_u32() when possible 2022-10-11 17:42:58 -06:00
host nvme: introduce helper function to get ctrl state 2024-01-20 11:50:06 +01:00
target nvme: prevent potential spectre v1 gadget 2024-01-20 11:50:06 +01:00
Kconfig nvme: implement In-Band authentication 2022-08-02 17:14:49 -06:00
Makefile nvme: implement In-Band authentication 2022-08-02 17:14:49 -06:00