lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 26 Jun 2019 00:42:40 +0000
From:   Damien Le Moal <Damien.LeMoal@....com>
To:     Bart Van Assche <bvanassche@....org>,
        Matias Bjørling <mb@...htnvm.io>,
        Chaitanya Kulkarni <Chaitanya.Kulkarni@....com>,
        "axboe@...com" <axboe@...com>, "hch@....de" <hch@....de>,
        Dmitry Fomichev <Dmitry.Fomichev@....com>,
        Ajay Joshi <Ajay.Joshi@....com>,
        Aravind Ramesh <Aravind.Ramesh@....com>,
        "martin.petersen@...cle.com" <martin.petersen@...cle.com>,
        "James.Bottomley@...senPartnership.com" 
        <James.Bottomley@...senPartnership.com>,
        "agk@...hat.com" <agk@...hat.com>,
        "snitzer@...hat.com" <snitzer@...hat.com>
CC:     "linux-block@...r.kernel.org" <linux-block@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        "dm-devel@...hat.com" <dm-devel@...hat.com>,
        Matias Bjorling <Matias.Bjorling@....com>
Subject: Re: [PATCH 1/4] block: add zone open, close and finish support

On 2019/06/26 0:56, Bart Van Assche wrote:
> On 6/25/19 3:35 AM, Matias Bjørling wrote:
>> On 6/25/19 12:27 AM, Chaitanya Kulkarni wrote:
>>> On 6/24/19 12:43 PM, Bart Van Assche wrote:
>>>> static inline bool op_is_write(unsigned int op)
>>>> {
>>>>     return (op & 1);
>>>> }
>>>>
>>>
>>
>> The zone mgmt commands are neither write nor reads commands. I guess, 
>> one could characterize them as write commands, but they don't write any 
>> data, they update a state of a zone on a drive. One should keep it as 
>> is? and make sure the zone mgmt commands don't get categorized as either 
>> read/write.
> 
> Since the open, close and finish operations support modifying zone data 
> I propose to characterize these as write commands. How about the 
> following additional changes:
> - Make bio_check_ro() refuse open/close/flush/reset zone operations for 
> read-only partitions (see also commit a32e236eb93e ("Partially revert 
> "block: fail op_is_write() requests to read-only partitions"") # v4.18).
> - In submit_bio(), change op_is_write(bio_op(bio)) ? "WRITE" : "READ" 
> into something that uses blk_op_str().
> - Add open/close/flush zone support be added in blk_partition_remap().

Sounds good to me. And indeed, all operations should be failed for RO
devices/partitions. Of note though is that only reset and finish operations have
an effect on the zone data. Open and close have no effect at all on the zone
data and only change the zone condition/state. But since they do change
something on the drive, we can still consider them as "write" operations.

Best regards.

-- 
Damien Le Moal
Western Digital Research

Powered by blists - more mailing lists