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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0A2BACCF9F8 for ; Wed, 12 Nov 2025 09:33:40 +0000 (UTC) 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:Message-ID:Date:References :In-Reply-To:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=L/iN1JBMbGU6a0D0RXVTmmVwq4KB4dIOMq6GZnNe4Oc=; b=HJ8JqdpnPEmIoE 9xPInjriWckbJtoiwDi10py1zwfUvsnLaCOWuOtLo3wVcaYz7A0YSvKdmnZCzDltG6KcTQgDSN5ho 5E2DnnKmN0dpKQLE7XIM9Ks7EmDItgaXalDnGrUJZ5pofDvayVrshPEyyfwXtmdb5Qddut7emC5mz RNpKGBgDKT9+IIavLQ900Q5eyj4oTJOCxwfG5PFQ0qNYCq3/Xi9PSWlbXmnT4lQy+H4ZvF2VSaq6m tPcnL5sYmdmQ2HLv305cwG/zIqHe69I478o/rRqi6t+xCsCgFJFazIB1hQRf1q4lBpzxjR/6Ftttj ESIPn5en3HE3c9lG2Lyw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vJ7EP-00000008TJo-0rlo; Wed, 12 Nov 2025 09:33:37 +0000 Received: from smtpout-03.galae.net ([185.246.85.4]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vJ7EL-00000008TJ5-3il0 for linux-mtd@lists.infradead.org; Wed, 12 Nov 2025 09:33:35 +0000 Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 143674E41660; Wed, 12 Nov 2025 09:33:29 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id D86756070B; Wed, 12 Nov 2025 09:33:28 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 1E0121037191E; Wed, 12 Nov 2025 10:33:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1762940008; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=V7VJas4OcRnxXubUexQa+LfGKvk8QPDPWv3vK3C+96g=; b=A78suv9J6JZ2r7gjwmylN4gjA0BmFOfU+51v5jfOn3/pHKb6bGvgozBKvXYxJwyBMvhesw iqqUSC0xYLcaSeq8QmCG9u7wSdEPPU35SsjWFABMa8oNC6XAoqv243/UfHySk4B5jMQY0g RlIQd77VF4riaFsjY3a25QOJnReog+RJLqwJQcKJqRkN31IJOqWDswDcbgaPfPn54M3KpA 8skPYy+FU1FWRbUGM9gHY7uaiUWqQPBVpvszzEvSOk2FUKfSy2yJh6hELtksRRbNzIWAva 97HqEj3bJhuo74Iq7KSUhEQo6T8KD8Jy49+ehUARosCu7N+cAfeW9xRNhHXq4w== From: Miquel Raynal To: Christian Marangi Cc: Richard Weinberger , Vignesh Raghavendra , =?utf-8?Q?Rafa=C5=82_Mi=C5=82ecki?= , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] mtd: mtdpart: ignore error -ENOENT from parsers on subpartitions In-Reply-To: <20251109115247.15448-1-ansuelsmth@gmail.com> (Christian Marangi's message of "Sun, 9 Nov 2025 12:52:44 +0100") References: <20251109115247.15448-1-ansuelsmth@gmail.com> User-Agent: mu4e 1.12.7; emacs 30.2 Date: Wed, 12 Nov 2025 10:33:25 +0100 Message-ID: <87y0ob7fyy.fsf@bootlin.com> MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20251112_013334_054823_BF61D593 X-CRM114-Status: GOOD ( 12.33 ) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org SGkgQ2hyaXN0aWFuLAoKT24gMDkvMTEvMjAyNSBhdCAxMjo1Mjo0NCArMDEsIENocmlzdGlhbiBN YXJhbmdpIDxhbnN1ZWxzbXRoQGdtYWlsLmNvbT4gd3JvdGU6Cgo+IENvbW1pdCA1YzJmNzcyN2Q0 MzcgKCJtdGQ6IG10ZHBhcnQ6IGNoZWNrIGZvciBzdWJwYXJ0aXRpb25zIHBhcnNpbmcKPiByZXN1 bHQiKSBpbnRyb2R1Y2VkIHNvbWUga2luZCBvZiByZWdyZXNzaW9uIHdpdGggcGFyc2VyIG9uIHN1 YnBhcnRpdGlvbnMKPiB3aGVyZSBpZiBhIHBhcnNlciBlbWl0cyBhbiBlcnJvciB0aGVuIHRoZSBl bnRpcmUgcGFyc2luZyBwcm9jZXNzIGZyb20gdGhlCj4gdXBwZXIgcGFyc2VyIGZhaWxzIGFuZCBw YXJ0aXRpb25zIGFyZSBkZWxldGVkLgo+Cj4gTm90IGNoZWNraW5nIGZvciBlcnJvciBpbiBzdWJw YXJ0aXRpb25zIHd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ZyYWRlYWQub3JnL21haWxtYW4vbGlzdGluZm8vbGludXgtbXRkLwo= From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A580127FD78 for ; Wed, 12 Nov 2025 09:33:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762940013; cv=none; b=JUKiuBM61wHn/NDZo3tP+gmEcLjIuYQC7WiBd8WB24xkTlIxyDbqROJOO1RXfOwVsQD/mAzXKrKMZ5CQyrs6QDS6PXF6DLIJxJzOcN0fr3Tpq+BEz1HVnrj3GB5/3FzE+HTa93IiGNFPgjuJn88XqmE0/jEV3tfDdzZ7atFsXzY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762940013; c=relaxed/simple; bh=V7VJas4OcRnxXubUexQa+LfGKvk8QPDPWv3vK3C+96g=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=tJ3iNXe3EHUbhtZIzCd5Q5xHCDAH3JHXz1hKQFBcqcUoRWXiX3rpk0/Y5rNSqigdRzq52U79kteajuKvzKwXVKgfnIRQBrhhCxvZGwqDyraMg+f8bpjp+2gBIpZ1673PoK7w9m26iu6Et2xoqgYUVYBl78oHTzi6vZSzpBafe4w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=A78suv9J; arc=none smtp.client-ip=185.246.84.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="A78suv9J" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 13A1B1A1A0F; Wed, 12 Nov 2025 09:33:29 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id D86756070B; Wed, 12 Nov 2025 09:33:28 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 1E0121037191E; Wed, 12 Nov 2025 10:33:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1762940008; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=V7VJas4OcRnxXubUexQa+LfGKvk8QPDPWv3vK3C+96g=; b=A78suv9J6JZ2r7gjwmylN4gjA0BmFOfU+51v5jfOn3/pHKb6bGvgozBKvXYxJwyBMvhesw iqqUSC0xYLcaSeq8QmCG9u7wSdEPPU35SsjWFABMa8oNC6XAoqv243/UfHySk4B5jMQY0g RlIQd77VF4riaFsjY3a25QOJnReog+RJLqwJQcKJqRkN31IJOqWDswDcbgaPfPn54M3KpA 8skPYy+FU1FWRbUGM9gHY7uaiUWqQPBVpvszzEvSOk2FUKfSy2yJh6hELtksRRbNzIWAva 97HqEj3bJhuo74Iq7KSUhEQo6T8KD8Jy49+ehUARosCu7N+cAfeW9xRNhHXq4w== From: Miquel Raynal To: Christian Marangi Cc: Richard Weinberger , Vignesh Raghavendra , =?utf-8?Q?Rafa=C5=82_Mi=C5=82ecki?= , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] mtd: mtdpart: ignore error -ENOENT from parsers on subpartitions In-Reply-To: <20251109115247.15448-1-ansuelsmth@gmail.com> (Christian Marangi's message of "Sun, 9 Nov 2025 12:52:44 +0100") References: <20251109115247.15448-1-ansuelsmth@gmail.com> User-Agent: mu4e 1.12.7; emacs 30.2 Date: Wed, 12 Nov 2025 10:33:25 +0100 Message-ID: <87y0ob7fyy.fsf@bootlin.com> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Hi Christian, On 09/11/2025 at 12:52:44 +01, Christian Marangi wro= te: > Commit 5c2f7727d437 ("mtd: mtdpart: check for subpartitions parsing > result") introduced some kind of regression with parser on subpartitions > where if a parser emits an error then the entire parsing process from the > upper parser fails and partitions are deleted. > > Not checking for error in subpartitions was originally intended as > special parser can emit error also in the case of the partition not > correctly init (for example a wiped partition) or special case where the > partition should be skipped due to some ENV variables externally > provided (from bootloader for example) > > One example case is the TRX partition where, in the context of a wiped > partition, returns a -ENOENT as the trx_magic is not found in the > expected TRX header (as the partition is wiped) I didn't had in mind this was a valid case. I am a bit puzzled because it opens the breach to other special cases, but at the same time I have no strong arguments to refuse this situation so let's go for it. Thanks, Miqu=C3=A8l