Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2768172ybk; Tue, 12 May 2020 07:42:32 -0700 (PDT) X-Google-Smtp-Source: APiQypKsSRVCg19DKBRS9yeFSjWMY/iZcSUycUEVJHdSgBGsP/UA8JjYSrRcv3M6G99DI0rYVKpx X-Received: by 2002:a17:907:7210:: with SMTP id dr16mr17671204ejc.197.1589294552602; Tue, 12 May 2020 07:42:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589294552; cv=none; d=google.com; s=arc-20160816; b=FoJvXsO6+uI9MZThwSDNsPzjGqZotA3pAyetJQmmYajNqLm0Qi566lbi0qC2vBxjLV Ls4pNodTdJS9r4y2dGZwE5efGh3OF3EPrPiA0KDDqjr3bs4+4nQkwze4MrALC2NWRp7F OXYSVXreVS30XthdB7hSSDMcQ55R3jWVKjGmd17qiKrVKUuEw378YNe2rrPhu3FE1X8+ ZnakaLzOfIQj1ZPrDcaHDpmJycsPYVF30MCVgAHO8AJK9F+EsWhO/sV0fH3Ck79+fbzy RGyA+Hn4HuD1pJXN/L5Sy5BiLCCoSvvdNsYzMWCiq+n55l3pRFGR8EskhfygoGhtzYdR bt5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:subject:from; bh=v78vciJL6EF/iLODOxPale1pFsp3+b2qT2ZEBTLKxKY=; b=Eun3ONN8gk/bKn8iKAV1YI/6TEbqRPMqfyNZA3sDAGpu7yU+gP0FZOjIjk5DidyiQ8 bWqSvBW02wprpcAIKPwECHQOuC2sx4Mb381pqSUty5ndpvZW+FyYZyfsbcs6ghrNqmvh jRl1mCCIc1YXjROIaj5mkUSzjGCJMWSt5kjmQPxT/eXFxi0Fo9hejmhNJGN74RJLY4SR onZgWglqz9yZmLRUPZYN1eKbV614XuLFB26VBLMey9xzRLTkkIwm/mTL0Lme6fhNFCeg rUQXs7aL/leanYF8tIQCeoqlPIO6W40VPD3lb/kU/rGunAnFIM81/7GGBZyaxxzrEdj0 /RPQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 39si574027edq.195.2020.05.12.07.42.09; Tue, 12 May 2020 07:42:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728085AbgELOkb (ORCPT + 99 others); Tue, 12 May 2020 10:40:31 -0400 Received: from mx3.molgen.mpg.de ([141.14.17.11]:58513 "EHLO mx1.molgen.mpg.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727118AbgELOkb (ORCPT ); Tue, 12 May 2020 10:40:31 -0400 Received: from [192.168.0.7] (ip5f5af0be.dynamic.kabel-deutschland.de [95.90.240.190]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: pmenzel) by mx.molgen.mpg.de (Postfix) with ESMTPSA id F2B432002EE1D; Tue, 12 May 2020 16:40:29 +0200 (CEST) From: Paul Menzel Subject: Re: [for-linus][PATCH 3/3] bootconfig: Fix to prevent warning message if no bootconfig option To: Steven Rostedt , linux-kernel@vger.kernel.org Cc: Ingo Molnar , Andrew Morton , Masami Hiramatsu References: <20200512132317.343672858@goodmis.org> <20200512132348.029291894@goodmis.org> Message-ID: Date: Tue, 12 May 2020 16:40:28 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200512132348.029291894@goodmis.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dear Steven, Am 12.05.20 um 15:23 schrieb Steven Rostedt: > From: Masami Hiramatsu > > Commit de462e5f1071 ("bootconfig: Fix to remove bootconfig > data from initrd while boot") causes a cosmetic regression > on dmesg, which warns "no bootconfig data" message without > bootconfig cmdline option. > > Fix setup_boot_config() by moving no bootconfig check after > commandline option check. > > Link: http://lkml.kernel.org/r/9b1ba335-071d-c983-89a4-2677b522dcc8@molgen.mpg.de > Link: http://lkml.kernel.org/r/158916116468.21787.14558782332170588206.stgit@devnote2 It’d be great if you could update your script to include HTTPS URLs. That would save one redirect. ``` $ curl -I http://lkml.kernel.org/r/9b1ba335-071d-c983-89a4-2677b522dcc8@molgen.mpg.de HTTP/1.1 301 Moved Permanently [ prevent LKML HTML mail detection ] ``` > Fixes: de462e5f1071 ("bootconfig: Fix to remove bootconfig data from initrd while boot") > Reported-by: Paul Menzel > Signed-off-by: Masami Hiramatsu > Signed-off-by: Steven Rostedt (VMware) > --- > init/main.c | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/init/main.c b/init/main.c > index 1a5da2c2660c..5803ecb411ab 100644 > --- a/init/main.c > +++ b/init/main.c > @@ -400,9 +400,8 @@ static void __init setup_boot_config(const char *cmdline) > char *data, *copy; > int ret; > > + /* Cut out the bootconfig data even if we have no bootconfig option */ > data = get_boot_config_from_initrd(&size, &csum); > - if (!data) > - goto not_found; > > strlcpy(tmp_cmdline, boot_command_line, COMMAND_LINE_SIZE); > parse_args("bootconfig", tmp_cmdline, NULL, 0, 0, 0, NULL, > @@ -411,6 +410,11 @@ static void __init setup_boot_config(const char *cmdline) > if (!bootconfig_found) > return; > > + if (!data) { > + pr_err("'bootconfig' found on command line, but no bootconfig found\n"); > + return; > + } > + > if (size >= XBC_DATA_MAX) { > pr_err("bootconfig size %d greater than max size %d\n", > size, XBC_DATA_MAX); > @@ -446,8 +450,6 @@ static void __init setup_boot_config(const char *cmdline) > extra_init_args = xbc_make_cmdline("init"); > } > return; > -not_found: > - pr_err("'bootconfig' found on command line, but no bootconfig found\n"); > } > > #else Reviewed-by: Paul Menzel Kind regards, Paul