Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp3808524rwp; Sat, 15 Jul 2023 09:45:54 -0700 (PDT) X-Google-Smtp-Source: APBJJlErxR2O4dcf8OrX3WQhTVAaBr2/Dpw3k3eTm8/0r4NbFOE3Jud0tRNLJniULDuBEizN2bdl X-Received: by 2002:a05:6a20:7f8c:b0:11f:985e:ae2c with SMTP id d12-20020a056a207f8c00b0011f985eae2cmr3034159pzj.3.1689439553835; Sat, 15 Jul 2023 09:45:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689439553; cv=none; d=google.com; s=arc-20160816; b=xLWjHBuGWW7o90OwpQ9AWCSMras5ieOA7Y4Q0c5j6Qi8KDkR6MhU+D2iYPsNHtOP4c 7wHMJXgCRMlUYjQ4Mu/7SJQKumZWv5bBRpBx/A92TGqsJ5IrPA3YL0iG12805ZL8Pd6A FR5LNSlDsBpYvNyNg8fDoD+bpsl1wmgWBYH6lHf5dmFIeki85dCVyYrQ79B5NK8ibYI9 FjwYfXIh0BAlJHFvmqd0jTaB/RP+OQIRfZNDrJl8RQv/5HlPlWmUfcbsBskDMiHfWonh mQe9r0sQ3SxgPqzRel9rqrvSJrH0vzjQkZlozeTw1iJFkCaZTwDngi5ahLBzDsWRCZ4v xorQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5eSGz3mdDJT8ii5lSTM1lv7ax6hZiqzfSWulMz49pEw=; fh=EPsSjq7KUOtD0w7eZ04iU4s7ZxSspby/e5knPECpWpk=; b=BshW6+eL86QHh+dkpVN7H3pn92G8Y8Yf5Eq0SmtYznaHDLRrp1rMzz3bTlRgx51LgG WQJUp3sPLXms8TculGQxQ5UdMRXHJrfA6j0/abuh21SpDPGF4jgMj6ykVGxzgH43qqPD HZldVpdNvbjT+mPT8FiJt/XtvIfCV0Ept/yoPtLjVDTWZPq2QZfnvfwiGN7l/Gn8S8VD GK+9Wvy9xT+bREKHYSDMYrHg+nVYotsHI4ItuNlKaxOQ63i8ksVebMDvHi1zDu41KsoV ip3XEvF4YU6arIK7AW/L8PpZvNo2oV2jVZqDdZxpCezAmOKfqHgcpXHCL15LJQE7jyi3 mY/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=cpVqsvmT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k27-20020a637b5b000000b0055b635d97adsi7762651pgn.619.2023.07.15.09.45.41; Sat, 15 Jul 2023 09:45:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=cpVqsvmT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229555AbjGOQTi (ORCPT + 99 others); Sat, 15 Jul 2023 12:19:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230127AbjGOQTg (ORCPT ); Sat, 15 Jul 2023 12:19:36 -0400 Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::223]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5BDE030E5 for ; Sat, 15 Jul 2023 09:19:30 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id 0B81760005; Sat, 15 Jul 2023 16:19:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1689437968; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5eSGz3mdDJT8ii5lSTM1lv7ax6hZiqzfSWulMz49pEw=; b=cpVqsvmThjjQ8rjhsGQ7TRfrsXzx1zXOJsnGisC+xFld92EpXtx83zTE8H02zXHT6SydVr IbiRUgkHobbzgaQ5RSEbFGOQkWL0hVKx2pfV5ry7QKOBPJh5P1ZGy3/1RgQkqacdNNeWPo +mEGawmiEnhRFabXMow+Qwt/ljk4mMbFwX/B8ky/Jl86TKDMoigYBWDhe6s+AAXK/C9Kwr 2Jdfou1E7s1z5IZ3yygogkf2adIZI2KxNySLaxbX6lcKoY0woM6DEokO/ZX5aiQsqatj7y Q06JJK/WTjZAln//bBYn78QKt2CDFK7den17iM8XMW39YHg0V9vQ3voajmO7Kg== From: Miquel Raynal To: Johan Jonker , miquel.raynal@bootlin.com Cc: richard@nod.at, vigneshr@ti.com, heiko@sntech.de, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, yifeng.zhao@rock-chips.com Subject: Re: [PATCH v5 1/2] mtd: rawnand: rockchip: fix oobfree offset and description Date: Sat, 15 Jul 2023 18:19:25 +0200 Message-Id: <20230715161925.20644-1-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-linux-mtd-patch-notification: thanks X-linux-mtd-patch-commit: b'd0ca3b92b7a6f42841ea9da8492aaf649db79780' Content-Transfer-Encoding: 8bit X-GND-Sasl: miquel.raynal@bootlin.com X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2023-07-14 at 15:21:01 UTC, Johan Jonker wrote: > Rockchip boot blocks are written per 4 x 512 byte sectors per page. > Each page with boot blocks must have a page address (PA) pointer in OOB > to the next page. > > The currently advertised free OOB area starts at offset 6, like > if 4 PA bytes were located right after the BBM. This is wrong as the > PA bytes are located right before the ECC bytes. > > Fix the layout by allowing access to all bytes between the BBM and the > PA bytes instead of reserving 4 bytes right after the BBM. > > This change breaks existing jffs2 users. > > Fixes: 058e0e847d54 ("mtd: rawnand: rockchip: NFC driver for RK3308, RK2928 and others") > Signed-off-by: Johan Jonker Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/fixes, thanks. Miquel