Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp5019782rwb; Mon, 31 Jul 2023 16:55:36 -0700 (PDT) X-Google-Smtp-Source: APBJJlH8K2sk9cN2zzGc+YDKS4CRTTAbmpbEzBFYLJhb2myPMVeKZx/iFilHtwRjPqYRq+8TSO+0 X-Received: by 2002:a05:6a20:1611:b0:137:57fc:4f9d with SMTP id l17-20020a056a20161100b0013757fc4f9dmr10327382pzj.10.1690847735822; Mon, 31 Jul 2023 16:55:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690847735; cv=none; d=google.com; s=arc-20160816; b=FS76rNtInpD2BOisskxNmj6bmoAyb6e2Tn4rqkqKtQ1t3GNmRMgcAnUuuRekOJpYsk FXOTBgPtDzYI52s5g2FNvHW8IZQj48xlDMFtPGzd+8iQWNpGs+XJLN6X+AZXTl+A0tkz DUbvex1H5eL6VJTmAuEvsRGRdlmzzqHXsmVrmLCIgfA5zHLstX+s7KFqoF27Fqt0j00w EMHpNmX9UHBwoVaW+DrCX59iihen+8BwrfN2rWeJ7o2bzNNHKsEX0HIH71PNkeCHGYvK PzkU8/fQMdLXm3X88aKEo6NtxkgLo/Mr4M3sAV+jN8+eLmbfrPD3MaLKFRZdxwexZ3+5 8PLA== 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:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=8Ih9fkAOoT/jbZ20ZcxC7cqtzBTvPDURLW27YkeAf+E=; fh=tL9pPg+90OupcMCqNdTJNQnZA5lY4JAGiyNDJRddhJE=; b=0k8B8dLo46sq+mv1c8TeN+JENARv8exLDbUVbX4bObWRbZOSM+mD6xB2Ehc8MAx0zL sBaw0yyW0Q02XdMY3B+feOIU8qLNg46W2UhXDuac0tPjzAI2yo9II+kbXrkF0KSK2QWK Tfjwd8VmR1UGHVOPPNJlAIm3VwSN8EajyR7EFs+Kx20CWAAzsjPltCVDscxPfmLAlLUE E+SVpPMmUwSbtRwis8om/V2L8owpjN0z+4Lw/DNEAHopO4ISn2zbOoFEhSOs050s1Rgr 4iZe1WxXNUTJPwFMFJN8EBNVm14DfSVwh1iBuS2Ss9MGdXslvu/HrHbAoWB6MUcuD2GG 8KPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uK574GT9; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i184-20020a6387c1000000b00563de641cf1si7656549pge.724.2023.07.31.16.55.23; Mon, 31 Jul 2023 16:55:35 -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=@kernel.org header.s=k20201202 header.b=uK574GT9; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230527AbjGaXaO (ORCPT + 99 others); Mon, 31 Jul 2023 19:30:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230408AbjGaXaM (ORCPT ); Mon, 31 Jul 2023 19:30:12 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68705120; Mon, 31 Jul 2023 16:30:11 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id F2C8561344; Mon, 31 Jul 2023 23:30:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5C8DDC433C7; Mon, 31 Jul 2023 23:30:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690846210; bh=h+nVrnZ3EwL9z2/wjMqeRh+TZcvZgeSC9RunILZcjsc=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=uK574GT9Hv1wx8rHLhXYMhgpc3iIDgND7lv8uy+uCyii7XDPm2dV3hd2QZkA7jsMu OK6tPuDy0O4lK/hZe862QUAzSBAmUdUJkTUQpY3jbjS+CtF8Mc4wPf+534gA2/X0vB bIUUNnsJslZFxGYP15z9sq7/tdF4Anbe/tw5DTqsoqv1C6/Lq35rncwfIIf0IcLXlj +sVuBks5BZgw4VYbX4+u7TU6kVvXjD18X6hnvIuX+lmeCn4E0mjBj8OGWNk2AiQ/MV w2YzUuWQ74sWj0Dd3WlGRX7ZmcE3oQZEET47CFXFXixDmynWBRTukirPzNvLY5vmBv 9WEtZSXEP/g9Q== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id EC935CE1065; Mon, 31 Jul 2023 16:30:09 -0700 (PDT) Date: Mon, 31 Jul 2023 16:30:09 -0700 From: "Paul E. McKenney" To: akpm@linux-foundation.org, adobriyan@gmail.com, mhiramat@kernel.org Cc: 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: [PATCH RFC v2 bootconfig 0/3] Distinguish bootloader and embedded kernel parameters Message-ID: Reply-To: paulmck@kernel.org References: <197cba95-3989-4d2f-a9f1-8b192ad08c49@paulmck-laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <197cba95-3989-4d2f-a9f1-8b192ad08c49@paulmck-laptop> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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:35:10PM -0700, Paul E. McKenney wrote: Hello! This series provides a /proc interface parallel to /proc/cmdline that provides only those kernel boot parameters that were provided by the bootloader in a new /proc/cmdline_load. This is especially important when these parameters are presented to the boot loader by automation that might gather them from diverse sources, and also when a kexec-based reboot process pulls the kernel boot parameters from /proc. If such a reboot process uses /proc/cmdline, the kernel parameters from the image are replicated on every reboot, which can be frustrating when the new kernel has different embedded kernel boot parameters. Why put these in /proc? Because they is quite similar to /proc/cmdline, so it makes sense to put it in the same place that /proc/cmdline is located. 1. Update /proc/cmdline documentation to include boot config. 2. fs/proc: Add /proc/cmdline_load for boot loader arguments. 3. Add /proc/bootconfig to proc.rst. Changes since v1: o Dropped /proc/cmdline_image in favor of the existing /proc/bootconfig. o Pulled in fixes from Stephen and Arnd. o Added documentation for /proc/bootconfig. Thanx, Paul ------------------------------------------------------------------------ Documentation/filesystems/proc.rst | 2 ++ b/Documentation/filesystems/proc.rst | 3 ++- b/fs/proc/cmdline.c | 13 +++++++++++++ b/include/linux/init.h | 3 ++- b/init/main.c | 2 +- 5 files changed, 20 insertions(+), 3 deletions(-)