Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp1788621rdg; Sat, 12 Aug 2023 17:22:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH0TGUfGu0LvnYRV0rNUMFAXCBbT/CBrSwkEQsJor6rD36VP+YMCZhf8INoYsgMjtDHx0ju X-Received: by 2002:a17:906:1d1:b0:99c:55c5:1c6e with SMTP id 17-20020a17090601d100b0099c55c51c6emr6893946ejj.8.1691886158457; Sat, 12 Aug 2023 17:22:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691886158; cv=none; d=google.com; s=arc-20160816; b=dP1AEz3NIdFpmn3wAx5lh8DAr+3an7eVh7KVUSru20URmQCQIoly3j4ldJMb0/zx8D jJEAqM+KVMYbs0vscuLW8QQIvc5/Bg7jQffKBxt485XCMD8FMIUJdHHLzW0nqxdoNLkl iLMUyOlZfbN+QCBgquc++DaQcA0K9cumSk4nKjSnpkQ8rtDZyfOm+hVVoAtUC0rdU23k GgnBMgfSd3n3O6MFt3+vFor2lj7koLPmidxftzRhXI5gzlt8s+lLGS9mrsaFbPYpEuYS ozIpJuSux4fUyeaEyhPv7EaCTKHmJNNekRpMCIHCdGpNUlI47GrOZqyhcyPACTrHLaEY cV8A== 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=GmH1aFwWLBbBPDZKGKtFkn4Nc0Wbd7Cp4/vDEoa2f6A=; fh=sdcTE5J/We6nDFj+bbpUhfRZBlJ3+AgevcsmY8mtAqI=; b=BpnVIZcYlv2HvHPM5l2yYT93y/TwhXqbaX0poWuiWfAVgR0weAZo8gSJKbKRjFKHi3 UmwaXihYS2l3xq/cj2UhBFvRuwLzD0idGxzJpFPfHcjCfuGLd0PuUVkk+X3Byq6RYzUj Fv0XmbFKK10qhrMsuVVFoNE1b7ahVA+SH6GvI2ppf/CrrUGVyTWRgKWd2lnDkSAyP8JN sL6iOWIDvZiSA7LiBSH7AXUiexlE+jNazD2UP2sZt+ucufEqPsiPvgMqfI5p+BR3X8PU z9Muf4+UFY6cn/GhpTN1NuYklZM3NRYLZjwUz4L9pau7JnvAroQwY86Ca8z0sZ3yMrVd nqRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="uF/COK8+"; 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 e21-20020a170906249500b0098df1cbe2acsi5366210ejb.997.2023.08.12.17.22.14; Sat, 12 Aug 2023 17:22:38 -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="uF/COK8+"; 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 S229699AbjHLXam (ORCPT + 99 others); Sat, 12 Aug 2023 19:30:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33908 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229441AbjHLXal (ORCPT ); Sat, 12 Aug 2023 19:30:41 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A46A1709; Sat, 12 Aug 2023 16:30:44 -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 AE9BA60A5C; Sat, 12 Aug 2023 23:30:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E61EDC433C7; Sat, 12 Aug 2023 23:30:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691883043; bh=KrCqW/jCgqRPD8zIczIcU75TX8B36Xq+hhaJur4o5C4=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=uF/COK8+QcibQLpuq2xUrbcuE5zoSo7eJdVLwLE6QxD2Sfe1u/Ex085kloXx9KpHt w8mghsQPy9xnKFHzBIwKrqdUWst2mPe0tJliQANneOrujGTBsJqdVvObWXXHjOe2NJ o3iJ2lwksVBZowl6Hbia0M3gLwiGQ6SHFxzqP4h+CRo/MBn9KS5YKyO4X2wipNqj07 MGW27nk6JIFPqIdBrcns4LQCEj6bI82n9NlXI26MZHOE+X7xqaQQtEVD9mBErG0tKR t8CgJqnxI49vRQzoJhCpTGJqW9w7hWyFgLwfRgfzBrUBys7myIY7pJI0IpSOZrAxgL spD0nN8kjJv9Q== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id C3DECCE0AB1; Sat, 12 Aug 2023 16:30:41 -0700 (PDT) Date: Sat, 12 Aug 2023 16:30:41 -0700 From: "Paul E. McKenney" To: Masami Hiramatsu Cc: Alexey Dobriyan , akpm@linux-foundation.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] 1/2] fs/proc: Add /proc/cmdline_load for boot loader arguments Message-ID: <24ec9c40-7310-4544-8c3f-81f2a756aead@paulmck-laptop> Reply-To: paulmck@kernel.org References: <197cba95-3989-4d2f-a9f1-8b192ad08c49@paulmck-laptop> <20230728033701.817094-1-paulmck@kernel.org> <9a42de2a-7d9f-4be3-b6c8-9f3e8a092c4d@paulmck-laptop> <20230807114455.b4bab41d771556d086e8bdf4@kernel.org> <7c81c63b-7097-4d28-864e-f364eaafc5a0@paulmck-laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7c81c63b-7097-4d28-864e-f364eaafc5a0@paulmck-laptop> X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_HI,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 Sun, Aug 06, 2023 at 09:39:28PM -0700, Paul E. McKenney wrote: > On Mon, Aug 07, 2023 at 11:44:55AM +0900, Masami Hiramatsu wrote: > > On Fri, 4 Aug 2023 10:36:17 -0700 > > "Paul E. McKenney" wrote: > > > > > On Fri, Aug 04, 2023 at 08:23:20PM +0300, Alexey Dobriyan wrote: > > > > On Thu, Jul 27, 2023 at 08:37:00PM -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 supplied by the boot loader. > > > > > This is especially important when these parameters are presented to the > > > > > boot loader by automation that might gather them from diverse sources. > > > > > > > > > > Therefore, provide a /proc/cmdline_load file that shows only those kernel > > > > > boot parameters supplied by the boot loader. > > > > > > > > > +static int cmdline_load_proc_show(struct seq_file *m, void *v) > > > > > +{ > > > > > + seq_puts(m, boot_command_line); > > > > > + seq_putc(m, '\n'); > > > > > + return 0; > > > > > +} > > > > > + > > > > > static int __init proc_cmdline_init(void) > > > > > { > > > > > struct proc_dir_entry *pde; > > > > > @@ -19,6 +27,11 @@ static int __init proc_cmdline_init(void) > > > > > pde = proc_create_single("cmdline", 0, NULL, cmdline_proc_show); > > > > > pde_make_permanent(pde); > > > > > pde->size = saved_command_line_len + 1; > > > > > + if (IS_ENABLED(CONFIG_BOOT_CONFIG_FORCE)) { > > > > > + pde = proc_create_single("cmdline_load", 0, NULL, cmdline_load_proc_show); > > > > > + pde_make_permanent(pde); > > > > > + pde->size = strnlen(boot_command_line, COMMAND_LINE_SIZE) + 1; > > > > > + } > > > > > > > > Please add it as separate fs/proc/cmdline_load.c file so that name of > > > > the file matches name of the /proc file. > > > > > > Thank you, will do! > > > > > > > The name "cmdline_load" is kind of non-descriptive. Mentioning "bootloader" > > > > somewhere should improve things. > > > > > > If we can all quickly come to agreement on a name, I can of course easily > > > change it. > > > > > > /proc/cmdline_bootloader? Better than /proc/cmdline_from_bootloader, > > > I suppose. /proc/cmdline_bootldr? /proc/bootloader by analogy with > > > /proc/bootconfig? Something else? > > > > What about "/proc/raw_cmdline" ? > > That would work of me! > > Any objections to /proc/raw_cmdline? > > Going once... Going twice... If I don't hear otherwise, /proc/raw_cmdline is is on Monday August 14 PDT. Thanx, Paul