Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp206901lqp; Thu, 4 Apr 2024 10:43:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWn/ssXK6IKQMDjjh5fdrOy0biUVWe+vswJKmj+C9QZjzCqmUAQrrf8HXJxdPcx3T5opY1uD9xvFwnxypaXqLngG6FCDFCHGNwSXMU6cg== X-Google-Smtp-Source: AGHT+IE2Lij7qXPGK4AHr3twOASC30nxGy2jw5CBX8Wb/w3EtV+l8Ak2xXZwWYQQXhK4Ihbufc1X X-Received: by 2002:a05:6a21:8cc7:b0:1a7:1b6e:4c8 with SMTP id ta7-20020a056a218cc700b001a71b6e04c8mr3985823pzb.18.1712252603888; Thu, 04 Apr 2024 10:43:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712252603; cv=pass; d=google.com; s=arc-20160816; b=g7GbRfivqeh7HBUpWECHcwdcJbe8HgdUyP3d2Au2N1OreWCCyjD5Eje3fxqbb+enxb APrJ39dvjnavuPCWhkGJR74tAcc5oajWK15KFqsIjymg3CM+gh6gB73qkGWkxVTcr4Qb lnQ4Nu+9x7cm8RwPIVhJhNqfkgJCGLwpw8CSUTrSK6O/AksMVNx8PO0VqHeDc8VhtUpy 9XINmaDReTGMs9z1jbcvKV217Gy4lk/1QDyD+SUHcXWtBAFOb9KEI2rrqqkVYuh28fbc xo6WdAekOpPJehdKri+ODsjJmsvvlCiwszpn9G+3f4uoIUz815kkXdrSMHd6/qyVBjGu fNsA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=s5YgyAEPISTnIiZHeNGVEXCu4xYjgv3oWjeT3ounQMY=; fh=E2vn5j0GUpbUnXxrwWUfGoiLiG7FX1rjoGTw/zrp8Jc=; b=mpwGw9YGHTOXyH7keTTHk18G95vsBxfOd4XkND1POV7ZHyrfyykHAg4ZNk+feFu0Ge cnQqaupjh3e6tA59co3vVQSB4N2FU5LGiEcJ4ii3mlkAr8N4RhmmeSt0yP0Rr6LBR6ct DKGmovkg3MMWgGDZH1CYw/3qGx2kam/WzpjYYondAewZ3gboEdYLDPzornebeew1bvUH F0zLiCkPbsvymaEi3wbhtDPbh3p3jUng7atEBaOTv4cmtwgYnGxiUp9xWMx09Og8OnEG jokQX9VYHIdH6ziKMpFYSTLuyQw/IVCvkmyz/IUC/NTvFk9g11cGmKDhajYNIX0CObXN PIGA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=N2M3VFtJ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-131900-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131900-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id k197-20020a633dce000000b005f0565d6614si15521171pga.290.2024.04.04.10.43.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 10:43:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-131900-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=N2M3VFtJ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-131900-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131900-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 89483290A59 for ; Thu, 4 Apr 2024 17:43:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EE71D12EBDC; Thu, 4 Apr 2024 17:43:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="N2M3VFtJ" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 15D9812B95; Thu, 4 Apr 2024 17:43:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712252595; cv=none; b=RkKXmZoWBesY2eK3vf3fka73jYIUjA8MqaCHFbBIafK4dtvw+8SjW25WZHAR/O4x3fwsqUOvMORG+S2o02pSwX9fepjw5R7WCMtzeGvQ1dlozBxGa2Pnn1p8Yisxqu4jxV07RXAYeN1lHMcia1Y80/3hFr5ePMsh6Sp1VeI6grU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712252595; c=relaxed/simple; bh=XVqjP0+idGhkMlRNHlBMQ51jpiOeoZ7Hg495Orxy1ig=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=u4Azi1aqdp0W3bkA/43p2KcDTq2fXAwZ3wnqDw4NmfWlK+QLknIJEjGV9RviDfVfM8EW9gqa9cZeB9lwJUHd9wuYlyQrVw4NW+GUdjGr0QGd76ggwOqooopwKhfQumGZslmhUVDpCq9OZ8pxFo3qYOO4NUoL/57F9K9NcR7XCHY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=N2M3VFtJ; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 955F4C433F1; Thu, 4 Apr 2024 17:43:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712252594; bh=XVqjP0+idGhkMlRNHlBMQ51jpiOeoZ7Hg495Orxy1ig=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=N2M3VFtJ/uVjhjss0pSDO+miIyL0kv0tnP3bK3Ejy1PENtrqVQjt8kVeN5qwmX91C VhNHoLDEfNTRbwj6p7ve1uJRZtpS5zxsGY2fag1ngIK11ruWoa97v38jNWGQoCsoPG oIGdDyUDkHvZx/xc/x0TacdbNwZu2RTUulQtWGj5suyyja5/N/vjoiIWrKilycqRtn lkLD9sZpVeKCoQw9eLyggh3gnMTqgersYDnXavDtJm2HzmcDCZt/7yhkr0iwPf3LOj 8nZgCmRYzScG29KZlWBGi187i7dR18vt6U1ctORI9y4tw7QOpCE9ZeKk0NDjJ0NHAx 4iUvQFZt8wHJA== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 337B5CE0D0C; Thu, 4 Apr 2024 10:43:14 -0700 (PDT) Date: Thu, 4 Apr 2024 10:43:14 -0700 From: "Paul E. McKenney" To: Masami Hiramatsu Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Zhenhua Huang Subject: Re: [PATCH fs/proc/bootconfig] remove redundant comments from /proc/bootconfig Message-ID: <26d56fa5-2c95-46da-8268-35642f857d6d@paulmck-laptop> Reply-To: paulmck@kernel.org References: <20240404085522.63bf8cce6f961c07c8ce3f17@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240404085522.63bf8cce6f961c07c8ce3f17@kernel.org> On Thu, Apr 04, 2024 at 08:55:22AM +0900, Masami Hiramatsu wrote: > On Wed, 3 Apr 2024 12:16:28 -0700 > "Paul E. McKenney" wrote: > > > commit 717c7c894d4b ("fs/proc: Add boot loader arguments as comment to > > /proc/bootconfig") adds bootloader argument comments into /proc/bootconfig. > > > > /proc/bootconfig shows boot_command_line[] multiple times following > > every xbc key value pair, that's duplicated and not necessary. > > Remove redundant ones. > > > > Output before and after the fix is like: > > key1 = value1 > > *bootloader argument comments* > > key2 = value2 > > *bootloader argument comments* > > key3 = value3 > > *bootloader argument comments* > > ... > > > > key1 = value1 > > key2 = value2 > > key3 = value3 > > *bootloader argument comments* > > ... > > > > Fixes: 717c7c894d4b ("fs/proc: Add boot loader arguments as comment to /proc/bootconfig") > > Signed-off-by: Zhenhua Huang > > Signed-off-by: Paul E. McKenney > > Cc: Masami Hiramatsu > > Cc: > > Cc: > > OOps, good catch! Let me pick it. > > Acked-by: Masami Hiramatsu (Google) Thank you, and I have applied your ack and pulled this into its own bootconfig.2024.04.04a. My guess is that you will push this via your own tree, and so I will drop my copy as soon as yours hits -next. Thanx, Paul > Thank you! > > > > > diff --git a/fs/proc/bootconfig.c b/fs/proc/bootconfig.c > > index 902b326e1e560..e5635a6b127b0 100644 > > --- a/fs/proc/bootconfig.c > > +++ b/fs/proc/bootconfig.c > > @@ -62,12 +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; > > - } > > + } > > + 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); > > > -- > Masami Hiramatsu (Google)