Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp514183rdb; Fri, 6 Oct 2023 09:52:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFDH+ovnHirZBJP9RpgTelKkPtr0CoCneKI1VmMYvwLdxQgSaprhaQXQNk7LlES8yR09ABe X-Received: by 2002:a05:6a00:ccd:b0:68b:e29c:b61 with SMTP id b13-20020a056a000ccd00b0068be29c0b61mr10449326pfv.19.1696611166964; Fri, 06 Oct 2023 09:52:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696611166; cv=none; d=google.com; s=arc-20160816; b=Sy+yJTxtB4PgO1qRFYlD7XcNk3p+e/Vd6Sds53gtTa/5pTZmnyGW1kOku2XZ/8+GBE 91ITlSovmS2595ESuaHYQf2nYztsKlfKFQiU/B5dOzj+OauCKK3iWW+d7uXNzRQ+ezOY a6JH/nz3XEW1t8WBA5ujp1jxyoUsT8mXwXVm09VJY1yKD+lZnksYVrgxAeWLV5E01yJX 669hr05AnBskVGuhyaq1FmXBmTuhvIj56LVpkr3/9+MQvT6egGOBhsiTRpv06geWet2r tvmq98BkB0VTzYeEiqh7d1ouC1Fxm8KRnZwZqOp04HkMWCwlG3iUZx2gqHAGx2Lc8Wn/ 6MLA== 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=cyasLvpeGdw+5DZDVuQ0+5WFUzBTT6VFUsnW6+M2LQM=; fh=16IKIJC+v7LgjYI6hiFmDhZqOBTJpL/O8FctMbvuztQ=; b=kkHlw//11cQ0HxETA8EvMU3H/5iArUrq0A/PBvPhNAiee+tFJZZlz6RmnFpuF7aV/y NMvuSzIXzPu2o1STDXoWnhPdXtp05tIzBl7IyWMW1lFBZLO2ATDwvj7LKwT7XdfKI+nH jRY+548RQKKqm/EUvV5cE9eLggP2+Ex7m3geVcXMR0u8VAchJOykqEMO2D4gPrAuWSk7 OKDhyh0bv2yJhwcOG5rJ4gHoaJhDR6J9VyergybPWuDNRt0omg40rJGQlFHfLD8Sy8kU R9Q5VYF8cLATuS2q55aA7NFj+SCsxzbttmqMyDzG6Lcz05UQDSVKjx6gZDo/ywl+PUbP 500Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qMn2Cbkw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id j63-20020a638042000000b005859c255ce9si4032276pgd.861.2023.10.06.09.52.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 09:52:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qMn2Cbkw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 53DED8028FD6; Fri, 6 Oct 2023 09:52:44 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232807AbjJFQwd (ORCPT + 99 others); Fri, 6 Oct 2023 12:52:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230223AbjJFQwc (ORCPT ); Fri, 6 Oct 2023 12:52:32 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6EBEAD; Fri, 6 Oct 2023 09:52:30 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7DAEEC433C8; Fri, 6 Oct 2023 16:52:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696611150; bh=1/agTdIoDPH5KB+pV6NQO44zrxCRyNQUeJI7drOS5Ig=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=qMn2CbkwKErRdOowM3Ocy1kddkjyVCyEK2ZursCABQCNB/0S9dT0SBu/6poU8xsW7 HbKDn6iHiU+SpC2c5wZuD/92KeKcwxzUZQMoPL2E+kClr3tludjzbnlLerO5t/IjZv RrgqoxXjyOVgcB0+a7dg8Idgc6YA6JLpNnDV+9CHYnxkLi2aoX1wkGyhRVxEULU4bh aFWIrg5CJxZfIMYhJ9hXHxWD7iSfON50Z/PvPKTOU6RajLcLTF3d4FR8fxZ1invZhc a58yV2tXI2a4LDntzqX0YDKdJ9jy16hYNjrtZ5tbcHBpczp9+Qngx9REKBDzAO9HGg HkEsAUNNfiiSw== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 18A1BCE0976; Fri, 6 Oct 2023 09:52:30 -0700 (PDT) Date: Fri, 6 Oct 2023 09:52:30 -0700 From: "Paul E. McKenney" To: Masami Hiramatsu Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-doc@vger.kernel.org, Jonathan Corbet , Linus Torvalds , Stephen Rothwell , Arnd Bergmann , Nick Desaulniers , Alexey Dobriyan , Andrew Morton , Kees Cook , linux-trace-kernel@vger.kernel.org Subject: Re: [PATCH bootconfig 2/3] fs/proc: Add boot loader arguments as comment to /proc/bootconfig Message-ID: <55067c09-9ec6-452a-a6db-30b8a8d08485@paulmck-laptop> Reply-To: paulmck@kernel.org References: <6ea609a4-12e3-4266-8816-b9fca1f1f21c@paulmck-laptop> <20231005171747.541123-2-paulmck@kernel.org> <20231006175948.14df07948d8c6a4a46473c13@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231006175948.14df07948d8c6a4a46473c13@kernel.org> X-Spam-Status: No, score=2.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,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 groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Fri, 06 Oct 2023 09:52:44 -0700 (PDT) X-Spam-Level: ** On Fri, Oct 06, 2023 at 05:59:48PM +0900, Masami Hiramatsu wrote: > On Thu, 5 Oct 2023 10:17:46 -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. > > It is also useful when booting the next kernel via kexec(), in which > > case it is necessary to supply only those kernel command-line arguments > > from the boot loader, and most definitely not those that were embedded > > into the current kernel. > > > > Therefore, add comments to /proc/bootconfig of the form: > > > > # Parameters from bootloader: > > # root=UUID=ac0f0548-a69d-43ca-a06b-7db01bcbd5ad ro quiet ... > > > > The second added line shows only those kernel boot parameters supplied > > by the boot loader. > > Thanks for update it. > > This looks good to me. > > Acked-by: Masami Hiramatsu (Google) > > Thank you! And thank you! I take this as meaning that I should push these three commits for the upcoming v6.7 merge window. Please let me know if I should be doing something else. Thanx, Paul > > Link: https://lore.kernel.org/all/CAHk-=wjpVAW3iRq_bfKnVfs0ZtASh_aT67bQBG11b4W6niYVUw@mail.gmail.com/ > > Link: https://lore.kernel.org/all/20230731233130.424913-1-paulmck@kernel.org/ > > Co-developed-by: Masami Hiramatsu > > Signed-off-by: Masami Hiramatsu > > Signed-off-by: Paul E. McKenney > > Cc: Linus Torvalds > > Cc: Stephen Rothwell > > Cc: Arnd Bergmann > > Cc: Nick Desaulniers > > Cc: Alexey Dobriyan > > Cc: Andrew Morton > > Cc: Kees Cook > > Cc: > > Cc: > > --- > > fs/proc/bootconfig.c | 6 ++++++ > > 1 file changed, 6 insertions(+) > > > > diff --git a/fs/proc/bootconfig.c b/fs/proc/bootconfig.c > > index 2e244ada1f97..902b326e1e56 100644 > > --- a/fs/proc/bootconfig.c > > +++ b/fs/proc/bootconfig.c > > @@ -62,6 +62,12 @@ static int __init copy_xbc_key_value_list(char *dst, size_t size) > > break; > > dst += ret; > > } > > + if (ret >= 0 && boot_command_line[0]) { > > + ret = snprintf(dst, rest(dst, end), "# Parameters from bootloader:\n# %s\n", > > + boot_command_line); > > + if (ret > 0) > > + dst += ret; > > + } > > } > > out: > > kfree(key); > > -- > > 2.40.1 > > > > > -- > Masami Hiramatsu (Google)