Re: [RFC PATCH] nvme: allow NVME_IOCTL_IO_CMD on controller char dev even when multiple ns

2021-03-30 Thread jav...@javigon.com
On 26.03.2021 20:59, Niklas Cassel wrote: From: Niklas Cassel Currently when doing NVME_IOCTL_IO_CMD on the controller character device, the command is rejected if there is more than one namespace in the ctrl->namespaces list. There is not really any reason for this restriction. Instead,

Re: nvme: disallow passthru cmd from targeting a nsid != nsid of the block dev

2021-03-27 Thread jav...@javigon.com
On 26.03.2021 19:48, Niklas Cassel wrote: From: Niklas Cassel When a passthru command targets a specific namespace, the ns parameter to nvme_user_cmd()/nvme_user_cmd64() is set. However, there is currently no validation that the nsid specified in the passthru command targets the namespace/nsid