Re: [PATCH 1/1 RESEND] Allow non-root users to perform ZBC commands.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2020/03/11 12:10, Martin K. Petersen wrote:
> 
> Damien: Please opine.

My apologies. This one slipped through the cracks...

>> Allow users with read permissions to issue REPORT ZONE commands and
>> users with write permissions to manage zones on block devices supporting
>> the ZBC specification.

I think this is fine for SG_IO ioctls since other SG_IO commands with an impact
on the device data (write) can be done without CAP_SYS_ADMIN as required by
block device file ioctl.

>>
>> Signed-off-by: Ryan Attard <ryanattard@xxxxxxxxxxxxxxx>

Reviewed-by: Damien Le Moal <damien.lemoal@xxxxxxx>

>> ---
>>  block/scsi_ioctl.c | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c
>> index b4e73d5dd5c2..ef722f04f88a 100644
>> --- a/block/scsi_ioctl.c
>> +++ b/block/scsi_ioctl.c
>> @@ -193,6 +193,10 @@ static void blk_set_cmd_filter_defaults(struct blk_cmd_filter *filter)
>>  	__set_bit(GPCMD_LOAD_UNLOAD, filter->write_ok);
>>  	__set_bit(GPCMD_SET_STREAMING, filter->write_ok);
>>  	__set_bit(GPCMD_SET_READ_AHEAD, filter->write_ok);
>> +
>> +	/* ZBC Commands */
>> +	__set_bit(ZBC_OUT, filter->write_ok);
>> +	__set_bit(ZBC_IN, filter->read_ok);
>>  }
>>  
>>  int blk_verify_command(unsigned char *cmd, fmode_t mode)
> 


-- 
Damien Le Moal
Western Digital Research




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux