[PATCH v4 1/1] nvme : Add ioctl to query nvme attributes

Keith Busch kbusch at kernel.org
Tue Nov 29 06:57:43 PST 2022


On Tue, Nov 22, 2022 at 10:22:44AM +0100, Joel Granados wrote:
> An ioctl (NVME_IOCTL_GET_ATTR) is added to query nvme controller
> attributes needed to effectively write to the char device without needing
> to be a privileged user.  They are also provided on block devices for
> convenience. The attributes here are meant to complement what you can
> already get with the allowed identify commands.
> 
> New members are added to the nvme_ctrl struct: dmsl, vsl and wusl from
> the I/O Command Set Specific Identify Controller Data Structure in the nvme
> spec.

I think what you have here is fine given the constraints you have work
with, though inventing new structures to report things in existing
structures still seems off to me. Is there actually any privileged
information contained within the controller scope identifications that
require the driver prevent non-admin users from seeing? If not, I think
relaxing that access restriction will set us up for longer term success.



More information about the Linux-nvme mailing list