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]
Date:   Fri, 16 Jul 2021 09:42:19 +0800
From:   Miaohe Lin <linmiaohe@...wei.com>
To:     Miquel Raynal <miquel.raynal@...tlin.com>
CC:     <richard@....at>, <vigneshr@...com>, <David.Woodhouse@...el.com>,
        <Artem.Bityutskiy@...ia.com>, <ext-adrian.hunter@...ia.com>,
        <linux-kernel@...r.kernel.org>, <linux-mtd@...ts.infradead.org>,
        <linfeilong@...wei.com>
Subject: Re: [PATCH] mtd: fix size in mtd_info_user to support 64-bit

On 2021/7/16 7:02, Miquel Raynal wrote:
> Hi Miaohe,
> 
> Miaohe Lin <linmiaohe@...wei.com> wrote on Thu, 8 Jul 2021 21:13:59
> +0800:
> 
>> From: Feilong Lin <linfeilong@...wei.com>
>>
>> The size in struct mtd_info_user is 32-bit, which will cause errors
>> when obtaining the size of large-capacity MTD devices, such as TLC
>> NAND FLASH-2048Gb.
> 
> Besides the fact that such devices are far from being supported by the
> Linux kernel, this change would basically break userspace, it cannot
> enter as-is...
> 

I see. Many thanks for your reply! We're working with these large-capacity
MTD devices now, any suggestion to work around this?

Thanks again!

>> Fixes: 69423d99fc18 ("[MTD] update internal API to support 64-bit device size")
>> Signed-off-by: Feilong Lin <linfeilong@...wei.com>
>> ---
>>  include/uapi/mtd/mtd-abi.h | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/include/uapi/mtd/mtd-abi.h b/include/uapi/mtd/mtd-abi.h
>> index b869990c2db2..efe0b53b10c1 100644
>> --- a/include/uapi/mtd/mtd-abi.h
>> +++ b/include/uapi/mtd/mtd-abi.h
>> @@ -128,7 +128,7 @@ struct mtd_write_req {
>>  struct mtd_info_user {
>>  	__u8 type;
>>  	__u32 flags;
>> -	__u32 size;	/* Total size of the MTD */
>> +	__u64 size;	/* Total size of the MTD */
>>  	__u32 erasesize;
>>  	__u32 writesize;
>>  	__u32 oobsize;	/* Amount of OOB data per block (e.g. 16) */
> 
> Thanks,
> Miquèl
> .
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ