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  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f83eb255-89fe-90dc-3670-79b8684389f1@samsung.com>
Date:   Fri, 17 Jun 2022 10:03:09 +0200
From:   Pankaj Raghav <p.raghav@...sung.com>
To:     Damien Le Moal <damien.lemoal@...nsource.wdc.com>, <hch@....de>,
        <snitzer@...hat.com>, <axboe@...nel.dk>
CC:     <bvanassche@....org>, <linux-kernel@...r.kernel.org>,
        <jiangbo.365@...edance.com>, <hare@...e.de>, <pankydev8@...il.com>,
        <dm-devel@...hat.com>, <jonathan.derrick@...ux.dev>,
        <gost.dev@...sung.com>, <dsterba@...e.com>, <jaegeuk@...nel.org>,
        <linux-nvme@...ts.infradead.org>, <Johannes.Thumshirn@....com>,
        <linux-block@...r.kernel.org>
Subject: Re: [PATCH v7 13/13] dm: add non power of 2 zoned target

On 2022-06-17 08:56, Damien Le Moal wrote:
>>
>> So we call this function device_not_matches_zone_sectors() from
>> validate_hardware_zoned_model() for each target and we let the validate
>> succeed even if the target's zone size is different from the underlying
>> device zone size if this feature flag is set. Let me know if I am
>> missing something and how this can be moved to
>> validate_hardware_zoned_model().
> 
> Your change does not match the function name
> device_not_matches_zone_sectors(), at all. So I think this is wrong.
> 
> The fact is that zone support in DM has been built under the following
> assumptions:
> 1) A zoned device can be used to create a *zoned* target (e.g. dm-linear,
> dm-flakey, dm-crypt). For this case, the target *must* use the same zone
> size as the underlying devices and all devices used for the target must
> have the same zone size.
> 2) A zoned device can be used to create a *regular* device target (e.g.
> dm-zoned). All zoned devices used for the target must have the same zone size.
> 
> This new target driver completely breaks (1) and does not fit with (2). I
> suspect this is why you are seeing problems with dm_revalidate_zones() as
> that one uses the underlying device instead of the target report zones.
> 
> Based on this analysis, validate_hardware_zoned_model() definitely needs
> to be changed. But device_not_matches_zone_sectors() is to check the
> assumptions (1) and (2) so changing it for your new case is wrong in my
> opinion. You need another set of assumptions (3) (define that well please)
> and modify validate_hardware_zoned_model() so that the defined constraints
> are checked. Using a target flag to indicate the type of zoned target is
> fine by me.
> 
Got it. Thanks for the explanation. Renaming
device_not_matches_zone_sectors() function to something meaningful with
my changes should address what you have pointed out to accommodate all
three types.

I see that something similar was done to dm_table_supports_zoned_model()
to accommodate type 2(dm-zoned) with different underlying zoned models
even though the initial impl. supported only type 1.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ