[PATCH 0/1] nvme: Export CSTS register via sysfs

Christoph Hellwig hch at lst.de
Fri Mar 19 06:51:58 GMT 2021


On Thu, Mar 18, 2021 at 12:46:53PM -0700, Keith Busch wrote:
> I don't think it should require user space modifications. Just mmap the
> current resource as-is but let the driver allow read-only in the
> precense of CONFIG_IO_STRICT_DEVMEM. The below is a rough idea of what I
> had in mind (compile tested only, and a proper solution should restrict
> access to a specific address range)

I think this is a horrible idea.  Userspace has no business touching
registers even read-only.  MMIO reads can have side effects as well,
intentional or unintentional, and we also open up a whole can of worms
of mismatched memory attributes.



More information about the Linux-nvme mailing list