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] [thread-next>] [day] [month] [year] [list]
Message-ID: <a945def3-ba5a-7539-e96a-43ade0ae674a@samsung.com>
Date:   Fri, 17 Jun 2022 08:40:56 +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>,
        Damien Le Moal <damien.lemoal@....com>
Subject: Re: [PATCH v7 13/13] dm: add non power of 2 zoned target

On 2022-06-17 08:12, Damien Le Moal wrote:
>> I think this is a cleaner approach using features flag and io_hints
>> instead of messing with the revalidate zone function:
>>
>> diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
>> index 135c0cc190fb..c97a71e0473f 100644
>> --- a/drivers/md/dm-table.c
>> +++ b/drivers/md/dm-table.c
>> @@ -1618,6 +1618,9 @@ static int device_not_matches_zone_sectors(struct
>> dm_target *ti, struct dm_dev *
>>  	if (!blk_queue_is_zoned(q))
>>  		return 0;
>>
>> +	if(dm_target_supports_emulated_zone_size(ti->type))
>> +		return 0;
>> +
> 
> This should be in validate_hardware_zoned_model(), not here.
> 
I am not sure about this comment. We need to peek into the individual
target from the table to check for this feature right?

if (dm_table_any_dev_attr(table, device_not_matches_zone_sectors,
&zone_sectors)) {
	DMERR("%s: zone sectors is not consistent across all zoned devices",
        dm_device_name(table->md));
	return -EINVAL;
	}

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().

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ