Re: [PATCH 0/1] nvme: Export CSTS register via sysfs
From: Christoph Hellwig <hch@lst.de>
Date: 2021-03-19 06:52:19
From: Christoph Hellwig <hch@lst.de>
Date: 2021-03-19 06:52:19
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. _______________________________________________ Linux-nvme mailing list Linux-nvme@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-nvme