[PATCH v6 1/1] nvme : Add ctrl id to allowed passthru commands
Joel Granados
j.granados at samsung.com
Mon Dec 5 23:39:14 PST 2022
Add NVME_ID_CNS_CS_CTRL and NVME_ID_CNS_CTRL to the nvme admin commands
that are allowed in unprivileged passthru. This will make attributes like
maximum data transfer size (mdts) and write zeroes size limit (wzsl)
available so they can be used to effectively write to the char device in
passthru.
Signed-off-by: Joel Granados <j.granados at samsung.com>
Reviewed-by: Keith Busch <kbusch at kernel.org>
Reviewed-by: Chaitanya Kulkarni <kch at nvidia.com>
---
drivers/nvme/host/ioctl.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/nvme/host/ioctl.c b/drivers/nvme/host/ioctl.c
index 9550a69029b3..9ddda571f046 100644
--- a/drivers/nvme/host/ioctl.c
+++ b/drivers/nvme/host/ioctl.c
@@ -34,6 +34,8 @@ static bool nvme_cmd_allowed(struct nvme_ns *ns, struct nvme_command *c,
case NVME_ID_CNS_NS:
case NVME_ID_CNS_CS_NS:
case NVME_ID_CNS_NS_CS_INDEP:
+ case NVME_ID_CNS_CS_CTRL:
+ case NVME_ID_CNS_CTRL:
return true;
}
}
--
2.30.2
More information about the Linux-nvme
mailing list