[PATCH 0/1] nvme: Export CSTS register via sysfs
Keith Busch
kbusch at kernel.org
Fri Mar 19 15:22:08 GMT 2021
On Fri, Mar 19, 2021 at 07:51:58AM +0100, Christoph Hellwig wrote:
> 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.
I was thinking the driver wouldn't opt-in if there were read side
effects, but yeah, it's too fragile. I withdraw the suggestion.
More information about the Linux-nvme
mailing list