Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2350019rwb; Thu, 17 Nov 2022 09:34:55 -0800 (PST) X-Google-Smtp-Source: AA0mqf7T4xbrNy9U96/FToc4HST6Wyrd3kaaYEZYOKf3UacJC06W4ILtTBGVNiRddeDaDMSeyVo5 X-Received: by 2002:a05:6a00:1941:b0:56b:a80f:38d4 with SMTP id s1-20020a056a00194100b0056ba80f38d4mr4058925pfk.12.1668706495541; Thu, 17 Nov 2022 09:34:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668706495; cv=none; d=google.com; s=arc-20160816; b=vr0E6Xr2FefrwfBoGas3gZqvPEb86YFH5skuNgS/g5paVwef5VyAtVU5G6fLuCyfnX OuISEl6EzslOO+btn/8IFluJVGG10byaH4abK2HwitKDX0evn8T0/w3dVAtFmAJhH1O4 +lgwR/4jsrYpafOjZLyE2T1ULpgosYI2vwh8dwAXX4YLmTt8kvxowhZOIdArM2McVoph N+CmI/9mrTRHhq4vZFQVEcnD4RBOz58mDbzsJ/odXJjLKXOEHZq5uCodLkTga7F8ncEL kulWBhiG/pYgq3nsdSe7ovLvPGm+BOC+aKRD6Oog87QU65djIRDBmCciT2TsI00yHMkd VJow== 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=xcmFhpwvc+3gJhxKiBBzbVn2HXUDXoV1wuJQO/Surr8=; b=twoeNhDJdpm2k9oWZe6to7YgFpsaCnNGIb6VVqql2qTGctgB26ED6a+RCULC6llo35 EbXyLuRI8PoqNzL5XfTUkrvoen8IyOHRs7oIJa4YBku7pDVinOPDqGq2L2ifywU1liFC hfVTpGggUacq8SqDFEJh2Eyqaffeei5adIn3RgYUkreaq2JwGrr+klBYyq+6FmKkMcJN m1YDy+RAaF4d/VIjYIXBqv7rD553/Qc98gjKBGvoFDyKKXBRmJtQ9C3qzPnftK2gnXgb PNDjAdC/cPP32qTO2H6pSW2beNmVL7dNn6EgwdHdfxlsYRj6qnXexDsUeymiB+d1wt+3 zjkg== 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 b3-20020a170902b60300b001768a29b9dfsi1401383pls.68.2022.11.17.09.34.43; Thu, 17 Nov 2022 09:34:55 -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 S240595AbiKQRNG (ORCPT + 93 others); Thu, 17 Nov 2022 12:13:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240175AbiKQRND (ORCPT ); Thu, 17 Nov 2022 12:13:03 -0500 Received: from fudo.makrotopia.org (fudo.makrotopia.org [IPv6:2a07:2ec0:3002::71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4696F769DB; Thu, 17 Nov 2022 09:13:02 -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 1oviRY-0005Ko-IO; Thu, 17 Nov 2022 18:12:52 +0100 Date: Thu, 17 Nov 2022 17:12:46 +0000 From: Daniel Golle To: Christoph Hellwig Cc: Jens Axboe , "Martin K. Petersen" , Chaitanya Kulkarni , Wolfram Sang , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 3/4] blkdev: add function to add named read-only partitions Message-ID: References: <2015e6097f7166915d829740ff33aab506948a0a.1668644705.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 On Wed, Nov 16, 2022 at 09:56:37PM -0800, Christoph Hellwig wrote: > On Thu, Nov 17, 2022 at 12:44:40AM +0000, Daniel Golle wrote: > > Add function bdev_add_partition_ro() which can be used by drivers to > > register named read-only partitions on a disk device. > > Unlike the existing bdev_add_partition() function, there is also no > > check for overlapping partitions. > > This new function is going to be used by the uImage.FIT parser. > > Err, no. No on has any business adding partitions to the block device > except for the partition parser. Well, there is a user-space ioctl for this as well[1], just that won't set the partition to read-only and also doesn't allow naming it... [1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/block/ioctl.c#n40