Re: [PATCH] block: allow IOC_PR_READ_* ioctls with BLK_OPEN_READ

From: Christoph Hellwig

Date: Wed Feb 11 2026 - 10:43:18 EST


On Tue, Feb 10, 2026 at 11:36:17AM -0500, Stefan Hajnoczi wrote:
> It is safe to reduce the permission requirement from BLK_OPEN_WRITE to
> BLK_OPEN_READ since these two ioctls do not modify the persistent
> reservation state. Userspace cannot use the information fetched by these
> ioctls to make changes to the device unless it later opens the device
> with BLK_OPEN_WRITE.

Hmm. How often do we give unprivileged users access to the block
device node anyway? But I guess if they can read all the data on
the device, they might as well see the reservation holders as well:

Reviewed-by: Christoph Hellwig <hch@xxxxxx>