Re: [PATCH] block: move CAP_SYS_ADMIN check in blkdev_roset()

2017-10-25 Thread Jens Axboe
On 10/24/2017 11:30 PM, Ilya Dryomov wrote: > On Thu, Oct 19, 2017 at 2:14 AM, Al Viro wrote: >> On Wed, Oct 18, 2017 at 02:38:38PM +0200, Ilya Dryomov wrote: >>> Check for CAP_SYS_ADMIN before calling into the driver, similar to >>> blkdev_flushbuf(). This is safer and can spare a check in the d

Re: [PATCH] block: move CAP_SYS_ADMIN check in blkdev_roset()

2017-10-24 Thread Ilya Dryomov
On Thu, Oct 19, 2017 at 2:14 AM, Al Viro wrote: > On Wed, Oct 18, 2017 at 02:38:38PM +0200, Ilya Dryomov wrote: >> Check for CAP_SYS_ADMIN before calling into the driver, similar to >> blkdev_flushbuf(). This is safer and can spare a check in the driver. >> >> (Currently BLKROSET is overridden by

Re: [PATCH] block: move CAP_SYS_ADMIN check in blkdev_roset()

2017-10-18 Thread Al Viro
On Wed, Oct 18, 2017 at 02:38:38PM +0200, Ilya Dryomov wrote: > Check for CAP_SYS_ADMIN before calling into the driver, similar to > blkdev_flushbuf(). This is safer and can spare a check in the driver. > > (Currently BLKROSET is overridden by md and rbd, rbd is missing the > check. md has the c

[PATCH] block: move CAP_SYS_ADMIN check in blkdev_roset()

2017-10-18 Thread Ilya Dryomov
Check for CAP_SYS_ADMIN before calling into the driver, similar to blkdev_flushbuf(). This is safer and can spare a check in the driver. (Currently BLKROSET is overridden by md and rbd, rbd is missing the check. md has the check, but it covers a lot more than BLKROSET.) Signed-off-by: Ilya Dryo