Thread (6 messages) 6 messages, 2 authors, 2021-08-09

Re: [PATCH v4 1/2] blk-zoned: allow zone management send operations without CAP_SYS_ADMIN

From: Johannes Thumshirn <hidden>
Date: 2021-08-09 09:57:50
Also in: lkml, stable

On 09/08/2021 11:50, Niklas Cassel wrote:
From: Niklas Cassel <redacted>

Zone management send operations (BLKRESETZONE, BLKOPENZONE, BLKCLOSEZONE
and BLKFINISHZONE) should be allowed under the same permissions as write().
(write() does not require CAP_SYS_ADMIN).

Additionally, other ioctls like BLKSECDISCARD and BLKZEROOUT only check if
the fd was successfully opened with FMODE_WRITE.
(They do not require CAP_SYS_ADMIN).

Currently, zone management send operations require both CAP_SYS_ADMIN
and that the fd was successfully opened with FMODE_WRITE.

Remove the CAP_SYS_ADMIN requirement, so that zone management send
operations match the access control requirement of write(), BLKSECDISCARD
and BLKZEROOUT.

Fixes: 3ed05a987e0f ("blk-zoned: implement ioctls")
Signed-off-by: Niklas Cassel <redacted>
Reviewed-by: Damien Le Moal <redacted>
Reviewed-by: Aravind Ramesh <redacted>
Reviewed-by: Adam Manzanares <redacted>
Reviewed-by: Himanshu Madhani <redacted>
Cc: stable@vger.kernel.org # v4.10+
---
Looks good,
Reviewed-by: Johannes Thumshirn <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help