Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp196763rwb; Fri, 4 Aug 2023 11:10:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFYAQZWmRKKU1XCwm02H+0snwATFND4CTUUFF9Zug6ro7wx/kdLtLZezO4zRJSkvTnN/lXV X-Received: by 2002:a05:6a20:1454:b0:13d:c12a:b988 with SMTP id a20-20020a056a20145400b0013dc12ab988mr2801101pzi.46.1691172602399; Fri, 04 Aug 2023 11:10:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691172602; cv=none; d=google.com; s=arc-20160816; b=fuUsIN5c9QT2/avCgB8x4drOCnhp2aMaKY1D+uP/0NhdtJCs3r30qqLsZrjJzYwPK6 p0Op8CrV7V/SlLE5T7NWKQQlwUIep6ZHBU2lL0ckp25I/H/NR1fZs+QhL2jMoGW7uvvX RytYrqY39hxqSiOsRem/GZotPlSHyXxZI7Ox1BPoMVpgW1Y9U3ZBycz3jYTPuo8s4bnh stxoRt+VEwJmu0hbmcvT/WplheC9kQEg6uhZCvhD6FIsp1lLVWaHNULA13kvuYZbWVfx Z/5X0sx1oJzJxxb1/g8Pdg2+Q3biRh+zK/f68JGz44aQijK6CUGPcX3gfTd4laYJu6zh 44XA== 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:dkim-signature; bh=xJurCnFb19/xTjtoQWvlbIXrIzYRUxZWI+vBYnNya6Y=; fh=tj66oU+8zWoHCpqcz7afomCf/2kr77KP7kukAmu3Br0=; b=LZ6C1kR+iXqPIsRG1CmnIeLkdR3HdxBdOEWTwD6irW1XPLw/Gm3fs3VhimellCwnq7 znw51bBu5JY3U0fTI9wFXo89vGn7nEmCMAv2LFpY3TSy9XMhlNbzl1R24SpIwagiWY7D vcr3NcQ0sv1kjXjGfTC5ifXxoro+GPcuiQDWh6KL7OxvmzkDG8IB+/ayGB4PMSfiNKzg a5Q/xVqMhDOrSZHQttyBPVO2Joq7rR2BpPbvjtih4VF1N7FZjxKgKJRf+gv3EMCxMkNn oqQiLyUJOpqCUEvNdbTWFzBq2TBnq8Zq3TSJbWeOy6JKQFur3VxThciGI+k+yGikgIkt ovLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=lUzBTPdK; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e124-20020a636982000000b00564ca42aad9si339744pgc.894.2023.08.04.11.09.47; Fri, 04 Aug 2023 11:10:02 -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=@gmail.com header.s=20221208 header.b=lUzBTPdK; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232273AbjHDR2O (ORCPT + 99 others); Fri, 4 Aug 2023 13:28:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231146AbjHDR2N (ORCPT ); Fri, 4 Aug 2023 13:28:13 -0400 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 153AB49C1; Fri, 4 Aug 2023 10:28:12 -0700 (PDT) Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-3159d5e409dso2171908f8f.0; Fri, 04 Aug 2023 10:28:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691170090; x=1691774890; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=xJurCnFb19/xTjtoQWvlbIXrIzYRUxZWI+vBYnNya6Y=; b=lUzBTPdKkEmsXjFsH+m4uEssQONxx92ha5AzO5LlALONSxHVCQa6xTNTdy9+5hhdcK C3fr8tq1nUpfHt+F+W5/QmKwkfwdOhxvPp4Ep/8GzeFj8Cgx0ZcD5ZnP/+Mkn3yspV2l tSeKIw8EgUGDO73tF3w0qG2AEkiNyHgN2JloDui1z4fVSSqdYhoqzLu0ULKfsgMW46Sb fHA9yR6rhJR66ffyXPEj4cmPAnkRAe8Q4qIhS4n5HGj9BED10m0JEbfy2X8oMEy+RhBJ RrsYoQdPNr1qnYDxkkO/e/Dxxxzf64G/3KvmNprwOaWp/dsEyyCngJawjeHkr8b/aQ2O 6qlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691170090; x=1691774890; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=xJurCnFb19/xTjtoQWvlbIXrIzYRUxZWI+vBYnNya6Y=; b=NK+IcyvwVpWC9sHfa8g3W90QFKlGQsjZDmJ5q+67epHcVkiHZKL3g0flKqsLHarcgB qtrLiqZUiE3wyNIxyls4w5NOm8hqUMLsmuRbjSV274yPHmf0/E8az+TdUgjTaE2F7bSX qOgRsSy3hvL3hqrD5r6c7YLKPy8ob1ETdNavTUqxq0XPYRYq6dBf96Zg+aMK3u0fN0h2 YKAxjpdVQm9wm28C/2TLe8f4ISWoKCuBAmFRwfXlF+Vko1VxRjFWxxWFfjGLH/EFEioc pQGhbPpY1fTFc+k1BupBK8nok5tod22v+b/v39Neu5LBUzs8v/OXokFSbSoRw1z/e1/P WO2A== X-Gm-Message-State: AOJu0YwcFFwh+rPWifn7jgPKzIygB9gx6YGpWMJ7R4ixhZhQZGCKhjo8 7zKLVIV9WmxxWUvzd7pbqg== X-Received: by 2002:adf:f8ca:0:b0:317:59a6:6f68 with SMTP id f10-20020adff8ca000000b0031759a66f68mr328336wrq.0.1691170090391; Fri, 04 Aug 2023 10:28:10 -0700 (PDT) Received: from p183 ([46.53.252.19]) by smtp.gmail.com with ESMTPSA id t6-20020a5d6a46000000b003142e438e8csm2994480wrw.26.2023.08.04.10.28.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Aug 2023 10:28:10 -0700 (PDT) Date: Fri, 4 Aug 2023 20:28:08 +0300 From: Alexey Dobriyan To: "Paul E. McKenney" Cc: akpm@linux-foundation.org, mhiramat@kernel.org, arnd@kernel.org, ndesaulniers@google.com, sfr@canb.auug.org.au, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@meta.com Subject: Re: [PATCH RFC bootconfig] 2/2] fs/proc: Add /proc/cmdline_image for embedded arguments Message-ID: References: <197cba95-3989-4d2f-a9f1-8b192ad08c49@paulmck-laptop> <20230728033701.817094-2-paulmck@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230728033701.817094-2-paulmck@kernel.org> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS 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 Thu, Jul 27, 2023 at 08:37:01PM -0700, Paul E. McKenney wrote: > In kernels built with CONFIG_BOOT_CONFIG_FORCE=y, /proc/cmdline will show > all kernel boot parameters, both those supplied by the boot loader and > those embedded in the kernel image. This works well for those who just > want to see all of the kernel boot parameters, but is not helpful to those > who need to see only those parameters that were embedded into the kernel > image. This is especially important in situations where there are many > kernel images for different kernel versions and kernel configurations, > all of which opens the door to a great deal of human error. > > Therefore, provide a /proc/cmdline_image file that shows only those kernel > boot parameters that were embedded in the kernel image. The output > is in boot-image format, which allows easy reconcilation against the > boot-config source file. > > Why put this in /proc? Because it is quite similar to /proc/cmdline, so > it makes sense to put it in the same place that /proc/cmdline is located. > > Signed-off-by: Paul E. McKenney > Cc: Andrew Morton > Cc: Alexey Dobriyan > Cc: Masami Hiramatsu > Cc: > > Signed-off-by: Paul E. McKenney > --- > fs/proc/cmdline.c | 12 ++++++++++++ > include/linux/init.h | 11 ++++++----- > init/main.c | 9 +++++++++ Same thing, Please if possible put /proc/x into fs/proc/x.c so that it is easier to find source. Not all /proc follows this convention but still. I don't like this name too (but less than the other one). Is it Boot Image Format (BIF). If yes, maybe add it as /proc/cmdline.bif ? I don't know what's the good name.