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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <258a2366-0042-dc2b-0589-fe3a99851ded@huawei.com>
Date:   Fri, 18 Jun 2021 16:55:01 +0800
From:   Zhihao Cheng <chengzhihao1@...wei.com>
To:     Miquel Raynal <miquel.raynal@...tlin.com>
CC:     <richard@....at>, <vigneshr@...com>,
        <linux-mtd@...ts.infradead.org>, <linux-kernel@...r.kernel.org>,
        <yukuai3@...wei.com>, Christoph Hellwig <hch@....de>
Subject: Re: [PATCH v2] mtd: mtd_blkdevs: Initialize
 rq.limits.discard_granularity

在 2021/6/18 15:52, Miquel Raynal 写道:
> Hi Zhihao,
> 
> Zhihao Cheng <chengzhihao1@...wei.com> wrote on Tue, 15 Jun 2021
> 17:39:05 +0800:
> 
>> Since commit b35fd7422c2f8("block: check queue's limits.discard_granularity
>> in __blkdev_issue_discard()") checks rq.limits.discard_granularity in
>> __blkdev_issue_discard(), we may get following warnings on formatted ftl:
>>
>>    WARNING: CPU: 2 PID: 7313 at block/blk-lib.c:51
>>    __blkdev_issue_discard+0x2a7/0x390
>>
>> Reproducer:
>>    1. ftl_format /dev/mtd0
>>    2. modprobe ftl
>>    3. mkfs.vfat /dev/ftla
>>    4. mount -odiscard /dev/ftla temp
>>    5. dd if=/dev/zero of=temp/tst bs=1M count=10 oflag=direct
>>    6. dd if=/dev/zero of=temp/tst bs=1M count=10 oflag=direct
>>
>> Fix it by initializing rq.limits.discard_granularity if device supports
>> discard operation.
> 
> Can you please verify that this is still needed after Christoph's
> additional fix:
> https://patchwork.kernel.org/project/xen-devel/patch/20210602065345.355274-10-hch@lst.de/
> 
Hi, Miquel,
I can still reproduce the problem after [1] applied.
I look through this series patches and I didn't find out 
'rq.limits.discard_granularity' has been initialized somewhere. The 
patchset is aming at reconstructing to avoid boilerplate code in drivers?
So 'rq.limits.discard_granularity' still need to be initialized in 
mtdblock driver.

[1] 
https://patchwork.kernel.org/project/xen-devel/patch/20210602065345.355274-10-hch@lst.de/

> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ