Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp260993ybg; Tue, 28 Jul 2020 05:30:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwV51GYf2oflEq2vn7E+LMFHC738SS+TJgLQCiRPxztRPt7Gj90UGLW/x+RRGkebARbhg0U X-Received: by 2002:a17:906:d042:: with SMTP id bo2mr13947482ejb.152.1595939438388; Tue, 28 Jul 2020 05:30:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595939438; cv=none; d=google.com; s=arc-20160816; b=f+n66aJ54ombfQ0mZMeQV4JiL0Z0SIwcOonlwCk/IxyA9GDlPeeovy/VUD1CvtuUhv w9+nmw5Pn5FSJK2JtON1OeHSOtuAEjBPvtB4vQYzJ337Zl98ueZurqTjrMzG97tZiMBH zx5fKDs3pC8fLIyirXUYXxmPugWX1WfHHNNgb59DWcoIBpx6d+UElaTAUA5Zc/b2OjAh FieuUrK5fOdK0Wqn4zNDC+F5hHVO8YG0GBMW1MD8BLM1I0b67Zi8spddNkHTD6efFPDO B9httQfnCD7CQqzYcm7T2gfCtjPHqK5ttMQb6Eh00pbb8yEJAa1hU5QuDajFUVpi1V+b 6wsQ== 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 :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:dkim-signature :dkim-signature:date; bh=7YdZ/axXCwm5XLxxjQO1zY7IIzjjaE8o/vGu+HswV80=; b=KTBEFOIUhkq62W43jV5N5FqsCaNpfQcxAl177q/2M0DCJu9H7DXe5W+LtxNRqRP1+c y6Smw87xGqdFXcFYwAeamzpTvUyLycVdmqRwSq4foSIDis7Wc85Eki20LVWMQZfCkeJd MnCCwZzzy2kIIA0BmHAddBSwnypKrS6zHzuib4oFn1Md/ReuliFTApoheL9eHI8UbA/I fD6lud3rJV24FKPutNEtPa35qtwRJDfcytAn6W790Vih1nx7EoD1fdhvGhOA9QTvmq51 L/CRWXi52einP7ceklu9k3Xg4vw9exs5CpoLQ/HQGNspLhUMAC/iEiRCCM5VypsQA+65 BUYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linutronix.de header.s=2020 header.b=dH8tROJO; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c3si7208844edy.147.2020.07.28.05.30.16; Tue, 28 Jul 2020 05:30:38 -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; dkim=fail header.i=@linutronix.de header.s=2020 header.b=dH8tROJO; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729625AbgG1M3T (ORCPT + 99 others); Tue, 28 Jul 2020 08:29:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729614AbgG1M3R (ORCPT ); Tue, 28 Jul 2020 08:29:17 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3395CC061794; Tue, 28 Jul 2020 05:29:17 -0700 (PDT) Date: Tue, 28 Jul 2020 12:29:15 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1595939355; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7YdZ/axXCwm5XLxxjQO1zY7IIzjjaE8o/vGu+HswV80=; b=dH8tROJOv5vjYJgzWMafFdY/lsmhhOQ/gZ6CCVcdeS0RXPzVxNBG91+B++8EytuJGlc4fU L3sfQ6mlzzTjW9DHTpo2P2D4IQKYURRK9yjq0FJzUTjBhrN0Nnq9H5FlQXKDeLZhsCHD5E vLTerRL7avkl1b5dX4aXUqYBtc6InfHASl/kcTSHj8SxrkCftIXvhQe9uQ8jAV5HAOAFZj IQjLXNtm/rOENV4ZBBfbYwnt1QUbJ6qseXY2j/VxK7yMTmR3J6IL5K2uCKdb5g/1v+6WGW pUIwWbX5QmQVODFs2IkEva6aIHtyl2J0jV7UcUOEr1wnUo2BkCc4878wpTfeNA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1595939355; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7YdZ/axXCwm5XLxxjQO1zY7IIzjjaE8o/vGu+HswV80=; b=ZPl0kblootfNSOyfVkLc775LwHAsmZXdljwDmeWMMQd92NzieEeZC99S/jnXuZpK+BCjKe im+W8hZqG3PVwhCA== From: "tip-bot2 for Arvind Sankar" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/kaslr] x86/kaslr: Remove bogus warning and unnecessary goto Cc: Arvind Sankar , Ingo Molnar , x86 , LKML In-Reply-To: <20200727230801.3468620-3-nivedita@alum.mit.edu> References: <20200727230801.3468620-3-nivedita@alum.mit.edu> MIME-Version: 1.0 Message-ID: <159593935504.4006.12364452342763685270.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/kaslr branch of tip: Commit-ID: 237069512d18f0f20b230680f067a2c070a7903a Gitweb: https://git.kernel.org/tip/237069512d18f0f20b230680f067a2c070a7903a Author: Arvind Sankar AuthorDate: Mon, 27 Jul 2020 19:07:55 -04:00 Committer: Ingo Molnar CommitterDate: Tue, 28 Jul 2020 12:54:42 +02:00 x86/kaslr: Remove bogus warning and unnecessary goto Drop the warning on seeing "--" in handle_mem_options(). This will trigger whenever one of the memory options is present in the command line together with "--", but there's no problem if that is the case. Replace goto with break. Signed-off-by: Arvind Sankar Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200727230801.3468620-3-nivedita@alum.mit.edu --- arch/x86/boot/compressed/kaslr.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/arch/x86/boot/compressed/kaslr.c b/arch/x86/boot/compressed/kaslr.c index a4af896..21cd9e0 100644 --- a/arch/x86/boot/compressed/kaslr.c +++ b/arch/x86/boot/compressed/kaslr.c @@ -295,10 +295,8 @@ static void handle_mem_options(void) while (*args) { args = next_arg(args, ¶m, &val); /* Stop at -- */ - if (!val && strcmp(param, "--") == 0) { - warn("Only '--' specified in cmdline"); - goto out; - } + if (!val && strcmp(param, "--") == 0) + break; if (!strcmp(param, "memmap")) { mem_avoid_memmap(PARSE_MEMMAP, val); @@ -311,7 +309,7 @@ static void handle_mem_options(void) continue; mem_size = memparse(p, &p); if (mem_size == 0) - goto out; + break; mem_limit = mem_size; } else if (!strcmp(param, "efi_fake_mem")) { @@ -319,7 +317,6 @@ static void handle_mem_options(void) } } -out: free(tmp_cmdline); return; }