Message ID | 70a28293-82db-41d3-871d-2624f1705c63@lineo.co.jp |
---|---|
State | New |
Headers | show
Return-Path: <linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=MWXVY1Wg; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=lineo.co.jp header.i=@lineo.co.jp header.a=rsa-sha256 header.s=selector2 header.b=hrD926EN; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SgCBN0fzCz1yS6 for <incoming@patchwork.ozlabs.org>; Wed, 29 Nov 2023 19:27:53 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To:Subject:From:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=IzIe5BAx2C8i5xuPZywgsGkh1UIBU+hT9s1oyN18Tn0=; b=MWXVY1Wgy8502a 0OSfDlB+8mvfs45Ofj8+FEc3t9fKe9wIiaaDTk+rnRlclCFUxGVzSUd3R++7ycOWWn0/buHkcPtnj S2kQGJFpL46EYAwNXH6KrItNNVBL6j9vRIIakU96hqks3PjTS2spvMRNJgmLth+k2xiC7iJWyixHB v26o7wGPocPiwYZ99SEgd48YPITdkxaokpjjZ/OwmnDx33D+ujWxoygAIIw4MvxlpyOgRDLDyyAsv Mrb9O6/ptECsph8J10ZIsEFfI9eSVF2PcCTV8gmVryHXv/tsPdzEyR7ASixnWwCsBKNb75m+JbT6g GKswms1UZcnwwUkra/FQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r8Fui-007SpZ-0q; Wed, 29 Nov 2023 08:27:20 +0000 Received: from mail-tycjpn01on20700.outbound.protection.outlook.com ([2a01:111:f403:2019::700] helo=JPN01-TYC-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r8Fuf-007SoW-2G for linux-mtd@lists.infradead.org; Wed, 29 Nov 2023 08:27:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nOmb/xfbhNl7ezMaNHZWeiH4f94AflVeODDm1gjsiKbN97NCwlZOFBckaMYqcmuSKKGGRP7StOX5fL5R+u+iY/v6A50p3og74YCtlOrCjQnGEAOoIsPma6zGJlKRTPebqbDzWl8wglfIkUHWbjfgydmfMZSdORPRLNcK6BGq5TujE+R6702aYrPi5zYA2ea+nLAjQeX1vG/QPZh9uYZMGjSOXU3hAU6WYq+46GISNDVbJD/FrIGhgouQsUT44mCHe91F9nxDoUFla54mrEkO+jfNNAiCfk637Mj2rfLxV67iW38XgvGRUm0LLEbI2pkAzZL/vR9oifIWDTyZ/e/oPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=O16o+YjqhUr6OrBpnlYbSV+AOkZWeg9fDhJPS/vR+OU=; b=ELS2a1AGliOQ6VA7mWmZSihgL0JG4a6A7sgI5V27mGyKwpFI/s9Ts4FHQxhHUJt1PxOKrB9BHn8Nfv4immOYGAwvohOwjq8K0T7+YkjTS5E1p43bjDh9wnLOHCj6jN3T6IWLRhLfTpXqoyPMalfFKciGK4LlOTdQEEEOz0M4pk7uPjnggWRwGtrKwj1Ir7lFvmrJu/Wd+VzgGmVXcBhlCYyK+w34Kn28MFhEdFFi6HM3u4PA56ato+PhJxmsP12uiSjh2z41PaRiA6Igh/JNGAbP7JgP9OyLeqP6dNhM1HtwFDn5LCchPBu7MSJNiUz+IzZhs4bj/Ako+uAPBvxa2g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=lineo.co.jp; dmarc=pass action=none header.from=lineo.co.jp; dkim=pass header.d=lineo.co.jp; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lineo.co.jp; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=O16o+YjqhUr6OrBpnlYbSV+AOkZWeg9fDhJPS/vR+OU=; b=hrD926ENEsxKQrJZCbEwiAelUeXQ4YtI2VjNXHQvn9AuK8VIsU6nPQJZgcwCbsuusaTjeaaOvF9xHDkzRhLcZkZ4ZhVj25sXAOZA7k47W/bIqYgHCC5wnI/eJuLZ05zPIJwPGmfhDDpK49lhddAh2VrDE5aVwh892L1MlDiFUTjtt2il987foxAPWXMFxi4qU7lOIwe8uUXk5r+oIXrMHbGPbX0lJlvr78fnypmgBqxpSU8q9VV9bir8UkWMslEMfAHdldvdmgVcvMARPI4dPo0d8QUGw+BRxxfW4zw2PNj3lBvQxhiCmQODQ77LpUuOUOFWHdUw3vi4dKpMsomkMw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=lineo.co.jp; Received: from OS3PR01MB8115.jpnprd01.prod.outlook.com (2603:1096:604:171::9) by TY3PR01MB11722.jpnprd01.prod.outlook.com (2603:1096:400:3dc::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7025.27; Wed, 29 Nov 2023 08:27:01 +0000 Received: from OS3PR01MB8115.jpnprd01.prod.outlook.com ([fe80::9538:79a:d7:b2a8]) by OS3PR01MB8115.jpnprd01.prod.outlook.com ([fe80::9538:79a:d7:b2a8%3]) with mapi id 15.20.7025.022; Wed, 29 Nov 2023 08:27:01 +0000 Message-ID: <70a28293-82db-41d3-871d-2624f1705c63@lineo.co.jp> Date: Wed, 29 Nov 2023 17:26:59 +0900 User-Agent: Mozilla Thunderbird Content-Language: en-US From: Yuta Hayama <hayama@lineo.co.jp> Subject: [PATCH 4.19] mtd: rawnand: brcmnand: Fix ecc chunk calculation for erased page bitfips To: stable@vger.kernel.org, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Sasha Levin <sashal@kernel.org> Cc: Claire Lin <claire.lin@broadcom.com>, Ray Jui <ray.jui@broadcom.com>, Kamal Dasu <kdasu.kdev@gmail.com>, Miquel Raynal <miquel.raynal@bootlin.com>, linux-mtd@lists.infradead.org, Yuta Hayama <hayama@lineo.co.jp> X-ClientProxiedBy: TYCP286CA0190.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:382::10) To OS3PR01MB8115.jpnprd01.prod.outlook.com (2603:1096:604:171::9) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3PR01MB8115:EE_|TY3PR01MB11722:EE_ X-MS-Office365-Filtering-Correlation-Id: 1bb548ee-186a-409b-add8-08dbf0b4f58f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zd7rfGhKi3FAolhRLRTxxNt9ue2hx0optqBJTLj/ZVYolGPW7JwG6r8c9IOAJKuZ1uOVxqh0jZliqfNCpvOsC9d5WaL4aZm9JRxGY8YPBSiIMwlvjaBNupsN5vZ0A+3Oe43bwHbvO483NnX2qn7lT99BO9OGC0M+sBM3E9IfdZUTY4Q7UUVTOX75+9Zz1u9mR4L6uLVoGjgUKXL358ZNPWHGZsFCXi7aMM7ShXpLAfNYWLCAThB3ANt7ge1/lAL67yaEPXIaqKOzbXaV1O9OYiZTw7b0F8PMreG9IwZPAsRxoBJpHOJx10XGuF1x1BIsYDw2zDgKtNWtOWHASB24NjJ+U1nbqXkXvDBgzt4JSzTMdk9MFY0vC116V9WDIkNuIpxp4t5oqYmfPEt0dGsj1KzOM3Xp/L8kMRiSKvESUnQ3bcOJYipBdMbCloxwbL6euA7hgNBHLXT0B4KGvL9i9PaXXV+C278ezt4hX3aKi2c6bfi+EpBM2G4h1n2zhiwiAHVq+VQo6cRUmTayOTu0RY3zpP6EPc65UanVm7qtrdNhTvTjxJrxLSLxVNrAUjNZSxSvfCJN6i7qf0Oky4gSpFJQ7f2qpnK8KgqS7d2Rn9UeigjiWLKxhQ8pFQr3t3OdFAEA1MltcJY6wGDfdhL+Fw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS3PR01MB8115.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(366004)(396003)(376002)(136003)(39840400004)(230922051799003)(451199024)(1800799012)(64100799003)(186009)(31686004)(478600001)(26005)(2616005)(6506007)(6512007)(38100700002)(31696002)(36756003)(66556008)(83380400001)(2906002)(4326008)(54906003)(41300700001)(86362001)(5660300002)(107886003)(110136005)(8676002)(316002)(66946007)(66476007)(6486002)(8936002)(43740500002)(45980500001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-Message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GAV3ov1XL5vOloa66dC4iwMyGPLeMewnVNDx?= =?utf-8?q?jyFRyaMcKfd8To860mq7bILfxWplEyJ674YgAJcnewSlJNITEqfK/zwFm8ntuMBGk?= =?utf-8?q?fkqRoeBlDhhGlOh7KpdMwV/ISin9U7955P8oT1eKXNO0OX0WfFh319kagtovd5fNu?= =?utf-8?q?wuxyL3oOwl+3aVQkfEk8HD18VgRZPsReN6Ft75XVLzJ4QUaNJMk5oUOQn07ccuqF8?= =?utf-8?q?j2ziKeD8M0zeM9IwzXbWQVfOzczCBETfNfSOgh+z0c0laMBCC4uK7TD2B1xiHNkhf?= =?utf-8?q?ZwM11xOA95UX+kp1d4PWczote1yutGKI3w5MEMJ1jaQ4s863J0jYb+ogMxkCXYaFJ?= =?utf-8?q?teBSo8I1js89LT2OAAf4o0hLGbGXoFwHof9bZ9VpaQudC85Kn6eBw0Xc6nZIt0d3v?= =?utf-8?q?27XSvYBgqLyU5Zh1+Ohj8/Ej5JhDeQILV3eBvZjelz9ncJidQhUMg/vBy8vzuD32U?= =?utf-8?q?RspLWoqCT4p9iJYsT74dNEYq5ksNNkheY82xj2yjiGLav9WYdOh6ogUR5cBwwLL1l?= =?utf-8?q?FLjAVs0vqa/+W8nYItLKRXMgEq1AyMVpZbYkBer/WPsh2fUYU5WE1Dq3WijtI3fei?= =?utf-8?q?bWJJPqNFzypE6ZhN8ID0fsK08PVeNKdAYsBvEN2GqmPqP/qb4BbF6rDWPCA+tnn/9?= =?utf-8?q?K/U0dUyvFpa5?= X-OriginatorOrg: lineo.co.jp X-MS-Exchange-CrossTenant-Network-Message-Id: 1bb548ee-186a-409b-add8-08dbf0b4f58f X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB8115.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Nov 2023 08:27:01.1866 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 850e1ad4-d43d-42a8-82ab-c68675f36887 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: bBUdyVsYd6iFYQ940tUV4lOFHQ3j8vxSP84Yx+DEb1brtvYDcS7JSO56iELd8fLeJNYQRpzKoWcuO8QCmmeG0A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY3PR01MB11722 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231129_002717_960051_D4724904 X-CRM114-Status: GOOD ( 14.02 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Claire Lin <claire.lin@broadcom.com> commit 7f852cc1579297fd763789f8cd370639d0c654b6 upstream. In brcmstb_nand_verify_erased_page(), the ECC chunk pointer calculation while correcting erased page bitflips is wrong, fix it. Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list <linux-mtd.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-mtd>, <mailto:linux-mtd-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-mtd/> List-Post: <mailto:linux-mtd@lists.infradead.org> List-Help: <mailto:linux-mtd-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-mtd>, <mailto:linux-mtd-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" <linux-mtd-bounces@lists.infradead.org> Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org |
Series |
[4.19] mtd: rawnand: brcmnand: Fix ecc chunk calculation for erased page bitfips
|
expand
|
diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand.c b/drivers/mtd/nand/raw/brcmnand/brcmnand.c index 0e14892ff926..dc7650ae0464 100644 --- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c +++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c @@ -1753,6 +1753,7 @@ static int brcmstb_nand_verify_erased_page(struct mtd_info *mtd, int bitflips = 0; int page = addr >> chip->page_shift; int ret; + void *ecc_chunk; if (!buf) { buf = chip->data_buf; @@ -1768,7 +1769,9 @@ static int brcmstb_nand_verify_erased_page(struct mtd_info *mtd, return ret; for (i = 0; i < chip->ecc.steps; i++, oob += sas) { - ret = nand_check_erased_ecc_chunk(buf, chip->ecc.size, + ecc_chunk = buf + chip->ecc.size * i; + ret = nand_check_erased_ecc_chunk(ecc_chunk, + chip->ecc.size, oob, sas, NULL, 0, chip->ecc.strength); if (ret < 0)