Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1359794rwb; Wed, 16 Nov 2022 16:33:33 -0800 (PST) X-Google-Smtp-Source: AA0mqf73frPwcPIwLhziJI5Fcj54WLN5P2Ebzfbik4pNQyf1ygYOiFYOoBSZl5mjR+9Lb1BqVme8 X-Received: by 2002:a17:903:1011:b0:187:feb:a787 with SMTP id a17-20020a170903101100b001870feba787mr387798plb.39.1668645213028; Wed, 16 Nov 2022 16:33:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668645213; cv=none; d=google.com; s=arc-20160816; b=OFuem11VfloeI1N3OCCJHNyIfGhZjMo1/vudBrXruDLtc369OLEZAXlxdyWpMYKbMu 4qUkSwZDpKvvlo+KEx7yKKLSN9zksti0bASWKNvkRfEUDFx6lFNUiZbGMCaPmtjj6Bs/ K6AuxOWej1VF3n2ddyQa6feuX20+uyf9tjAlIkd1kkaRK1t+kToslGTgUi+7LE1sRYh7 rWRmBima8NILRlv1mnC7jU+gDCCii+58ek7TWDvdkk4v5+nLG0iqmCGrO1bICKyij4+l VBnHjxFj1SBNfthOGp6or6Pm+R+5rhXO/iHNmhd81U+vj7Xs5T6A84u47CauwM6laM8+ nWTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=J0F2dHrglJs8yM/2U/TIJJZL6ikWOH0e3x2PVc+sHvw=; b=t/Z9Q4+Kt05fpPPt7IZPzOPf9vbbEi9nLQYpfWKQZyoHsVE/nZiaNPBr+baDtOZ45s WtQIeC2ZqkiAYvRkJCpPOi84lyMqETZvGCDE4C4PjMJN0u53sYGG3WUV/hsyItbn8InY FztwiSo6NQDakJuVIXxus9293sIj8Me5/FjTkQsv55TaxMWn5jR7RJ+QusdWUS4iidG7 9kuuFjAq4u7PLHysfLnZsM/giurgr3BbNjLEGST3XIOcrVu5A43VnmzC0mRXbbMhJFOq vJh1f3fRVEGncbGOChayNBIPVeiNDkMsiqDMs3VhoiCb2EDG7S+x9QIw/vDl8nuuksBH LrHA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j19-20020a634a53000000b00476e98ca7d5si3095381pgl.785.2022.11.16.16.33.21; Wed, 16 Nov 2022 16:33:33 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234042AbiKQATm (ORCPT + 90 others); Wed, 16 Nov 2022 19:19:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230103AbiKQATk (ORCPT ); Wed, 16 Nov 2022 19:19:40 -0500 Received: from fudo.makrotopia.org (fudo.makrotopia.org [IPv6:2a07:2ec0:3002::71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B582547328; Wed, 16 Nov 2022 16:19:37 -0800 (PST) Received: from local by fudo.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.94.2) (envelope-from ) id 1ovScc-0002P6-CE; Thu, 17 Nov 2022 01:19:14 +0100 Date: Thu, 17 Nov 2022 00:19:10 +0000 From: Daniel Golle To: Christoph Hellwig Cc: Jens Axboe , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Matthew Wilcox , "Martin K. Petersen" , Chaitanya Kulkarni , Michal Orzel , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org Subject: Re: [PATCH v5 3/4] partitions/efi: add support for uImage.FIT sub-partitions Message-ID: References: <7526fc5a461a0d68eb1dab575f9c1950638fc21a.1668548123.git.daniel@makrotopia.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_00,PDS_OTHER_BAD_TLD, SPF_HELO_NONE,SPF_PASS autolearn=no 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 Hi Christoph, On Tue, Nov 15, 2022 at 10:01:05PM -0800, Christoph Hellwig wrote: > On Tue, Nov 15, 2022 at 09:47:06PM +0000, Daniel Golle wrote: > > Add new GUID allowing to parse uImage.FIT stored in a GPT partition > > and map filesystem sub-image as sub-partitions. > > NAK, we should not go out from the partition code to parse random > weird image formats. While weirdness is certainly subjective, uImage.FIT is not just a random image format but used by a great majority of headless embedded Linux devices out there. It's the default image format of many of the SDKs distributed by chip vendors such as Allwinner, Marvell, MediaTek, NXP, Qualcomm/Atheros, ... Having better support for it in Linux hence doesn't seem too far-fetched to me, especially given that we got partition parsers for all sorts of historic (Acorn, Amiga, Atari, ...) or actually exotic (Karma?) formats. Even Microsoft Windows' Logical Disk Manager is supported natively by the kernel... > If you want to support uImage.FIT just write a tiny stackable block > driver or dm table for it. As this is used on rather tiny embedded devices my hope was to keep things simple and not having to enable device mapper on systems which have anyway only very small amounts of storage and won't ever need most of the device mapper features. Using a tiny block driver instead is an option, I've implemented this approach in the past couple of hours and it works just as fine. In this case I would introduce a new kernel cmdline option allowing to specify which block device (ie. a partition on eMMC, or mtdblock or ubiblock device) to launch the uImage.FIT parser on. Allowing this new driver to add block partitions by exporting a new helper functions for that in block/partition/core.c would greatly simplify things, as then the existing partitioning code could still be used (instead of basically having to re-implement loopdev and introduce a whole new type of block devices). I will post an RFC series illustrating this approach. Please let me know if this sounds acceptable, so I won't put effort into implementing something which will then be rejected again after 5 iterations on the mailing list for reasons which could have been expressed from the beginning. An RFC for this series was posted on 2022-04-25 [1], I wouldn't have worked months to fix all requests of other maintainers and tested it on a variety of different hardware knowing that the whole approach will be NACK'ed... And, of course, thank you anyway for reviewing! Cheers Daniel [1]: https://patchwork.kernel.org/project/linux-block/list/?series=635369&state=*