From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2B3DCC433E0 for ; Tue, 5 Jan 2021 10:41:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F2A0022525 for ; Tue, 5 Jan 2021 10:41:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729205AbhAEKlT convert rfc822-to-8bit (ORCPT ); Tue, 5 Jan 2021 05:41:19 -0500 Received: from relay11.mail.gandi.net ([217.70.178.231]:53613 "EHLO relay11.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729193AbhAEKlS (ORCPT ); Tue, 5 Jan 2021 05:41:18 -0500 Received: from xps13 (lfbn-tou-1-1535-bdcst.w90-89.abo.wanadoo.fr [90.89.98.255]) (Authenticated sender: miquel.raynal@bootlin.com) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 8BF54100007; Tue, 5 Jan 2021 10:40:36 +0000 (UTC) Date: Tue, 5 Jan 2021 11:40:35 +0100 From: Miquel Raynal To: Greg KH Cc: Felix Fietkau , stable@vger.kernel.org Subject: Re: [PATCH] Revert "mtd: spinand: Fix OOB read" Message-ID: <20210105114035.2c766901@xps13> In-Reply-To: References: <20210105101821.47138-1-nbd@nbd.name> Organization: Bootlin X-Mailer: Claws Mail 3.17.4 (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: stable@vger.kernel.org Hello, Greg KH wrote on Tue, 5 Jan 2021 11:31:26 +0100: > On Tue, Jan 05, 2021 at 11:18:21AM +0100, Felix Fietkau wrote: > > This reverts stable commit baad618d078c857f99cc286ea249e9629159901f. > > > > This commit is adding lines to spinand_write_to_cache_op, wheras the upstream > > commit 868cbe2a6dcee451bd8f87cbbb2a73cf463b57e5 that this was supposed to > > backport was touching spinand_read_from_cache_op. > > It causes a crash on writing OOB data by attempting to write to read-only > > kernel memory. > > > > Cc: Miquel Raynal > > Signed-off-by: Felix Fietkau > > --- > > drivers/mtd/nand/spi/core.c | 4 ---- > > 1 file changed, 4 deletions(-) > > So the backport to 5.10.y broke, but not the backport to 4.19.y or > 5.4.y? Can you provide a "correct" backport for this instead of just > removing this fix? Agreed, I think the proper way to handle the situation would be to move these three lines to spinand_read_from_cache_op() instead of just getting rid of them. Thanks, Miquèl