Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp777883pxv; Thu, 15 Jul 2021 16:04:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzM0yLxgnpCDXHow4+8OI0uoL2Ak+LM29XrDQ7jks5SKr4YUFgBecLA1avBLI2m8LY0nIrC X-Received: by 2002:a92:3302:: with SMTP id a2mr4311960ilf.62.1626390272650; Thu, 15 Jul 2021 16:04:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626390272; cv=none; d=google.com; s=arc-20160816; b=eCBTr1kxUxwstvvhlrPmjS+0n2IldGUojnKolTQQijNup7WzBuMaH4KHGQzlhecFTg /PS5rQySVdmH07lxTlA7obzGz093tIhT4ZrCY/iDDTpAIP8cYm4dPTKaOAi92JyHBuQc YjMjJyRyqNVtbVuVFKnEMJsHHOeQVdDUhwpMVsk3b17/WcnnlIVFs3mo9Ni1wnNgUqXK XiCVbewJjm4GJAUbWUH1wJDavkuCkFoSwiN/mc039GLm/sGxZ9Jd8+CZQPVNLcikuo75 HMMrmxVDXvwfLXkVJi1DmcTeMv1NN1ciXTXdGU3TpxBP811Vz6sjaegA6SXZg60AxVyj 5aGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=FhRUGJ/G3j0fo8KKsEMCFKKNLA86yZWDMriDgJX+oB8=; b=044drYsWJiTHwIX8nKH2w9Q09l9OLWOsItoa5hdlKL8eOyGKgrvHxGbs+kYL8ByUpi ZUbh2ZvMachi40qVBF6TVTE0sqseHEOPSZlzeMPSrJitG6zwX+qxAuZYW2Y/mifLa/cv B9WM1TFYpdreHc+SeQiZPFEgkjqC2+hOnosLYoxss0VNIkbf9IdEOeyXcsUqZHUGKPfq 0hRF96mFt+eQnak9vZnSIpXljW6X8ZYmUcNqxQt8zhgKzKTAihVvmtyggPOSLJXnAnuW ry0DV6nXCPjXb66bdms+WuXfi0cxMZr87iGUstT4A45CVHzBlvmt94JPiwSey5s6uSyw iF7A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b39si3921477jav.0.2021.07.15.16.04.08; Thu, 15 Jul 2021 16:04:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230315AbhGOXFW convert rfc822-to-8bit (ORCPT + 99 others); Thu, 15 Jul 2021 19:05:22 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:45031 "EHLO relay5-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229624AbhGOXFV (ORCPT ); Thu, 15 Jul 2021 19:05:21 -0400 Received: (Authenticated sender: miquel.raynal@bootlin.com) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id DBADB1C0008; Thu, 15 Jul 2021 23:02:25 +0000 (UTC) Date: Fri, 16 Jul 2021 01:02:24 +0200 From: Miquel Raynal To: Miaohe Lin Cc: , , , , , , , Subject: Re: [PATCH] mtd: fix size in mtd_info_user to support 64-bit Message-ID: <20210716010224.44582046@xps13> In-Reply-To: <20210708131359.21591-1-linmiaohe@huawei.com> References: <20210708131359.21591-1-linmiaohe@huawei.com> Organization: Bootlin X-Mailer: Claws Mail 3.17.7 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Miaohe, Miaohe Lin wrote on Thu, 8 Jul 2021 21:13:59 +0800: > From: Feilong Lin > > 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... > Fixes: 69423d99fc18 ("[MTD] update internal API to support 64-bit device size") > Signed-off-by: Feilong Lin > --- > 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