Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1798910pxa; Thu, 6 Aug 2020 16:40:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwh9Il9GxJ/xJ04hIlBGALPBgeA6o/HRIYtYxgua2ufImUL9Jk3LS1FkDI4uRtPVXHKfQPo X-Received: by 2002:a17:906:6408:: with SMTP id d8mr6617740ejm.345.1596757248787; Thu, 06 Aug 2020 16:40:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596757248; cv=none; d=google.com; s=arc-20160816; b=wh3U23uGIA55KcmrsC2mzgAkwD24v+mOrehBbTBFm3WBEKA8Eux4nhraL9GjHgRdqS wFzRXYMqaoV/0e2GfcHGXYN2DCTMfFCeL3u5nmzSp6eQTcd79Rr9POwqckATvm8qGZf7 VXrB1u6ipCCpP+xpz/BENlSED8pLpCJGy4Zb07wB5h7mc+yZH30rM1xeJqsv732d6Yub 4LApcyK6NvjLKFpQJG2D+GMP2NptbT/ImchEkDItPYlXwLaQXjYMy5eVncFxSXQ3R5+D Kp5qMusBjNDqsnAocv1XqrYidBXNIe8as+2rPNK38aD30ovZU5KuSJfdZDuHeUzmzQpo 82Qw== 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=yToSpdeM6C3ejk+ILWYfVNM0PXl/drpN3uSrQ21Pn/Q=; b=Yhf6oJ/L77DHM+ggt3DfmhBEbgNsS792m2UOxx8Rc1p2EVbgCn4GiHw5Ym7S0wVhiS 5oJS7xzO8XCCoMDDrqgziNwPsiAoZDyN4XNjJOwhYbM/XklQgIH3jN/bJApUDfBYhUrG AB9b+FvjAJfgA8ixSqTvurpeS6ja66Z3gANXgYHD5xdXgsllwIj19zKcfA06LttlZOmg YksGCiDHDUcMf146Tpf9h0/BJmAtPNgA7dGJyr59ZdgzmXvlil+VvktfzrhpWnDWXWgC TLq54fyVyynGeeKLBx2hAkPvV8tD1tD+Y2Kf2mJTyIxy3qUvO5p3jXA9tvwdbXAsE0nE ZQ+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linutronix.de header.s=2020 header.b=BAezeRCg; dkim=neutral (no key) header.i=@vger.kernel.org; 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 t22si2607331ejy.433.2020.08.06.16.40.25; Thu, 06 Aug 2020 16:40:48 -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=BAezeRCg; dkim=neutral (no key) header.i=@vger.kernel.org; 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 S1726918AbgHFXj2 (ORCPT + 99 others); Thu, 6 Aug 2020 19:39:28 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:60936 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726724AbgHFXjF (ORCPT ); Thu, 6 Aug 2020 19:39:05 -0400 Date: Thu, 06 Aug 2020 23:39:02 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1596757143; 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=yToSpdeM6C3ejk+ILWYfVNM0PXl/drpN3uSrQ21Pn/Q=; b=BAezeRCgd0W5xKSk0G0pk6XCms3uGSDsZMRFf6Mw810jgEqFxrGUeeXvgFleG4aJF0U4em RrJ07nnGGDbYBiFG3GTXjU0jznvcBRDBsb3T7ERQh8Gs1iwOb2HoJ2soFeYzRB6w36OkbC 6GqZ7lDZ+5f+qF5BmUtouJClolMW2+gvLj8QvBVmSZ6Jkld0IU6WorNRUJA07SE/gCelmv whfoKGPozStGXhwr9qshx3xkM2zN11Tw6edJ17BXFGM9Oa9Jumnz0Qo9ObzJIJ+/E4f6NR RLIuNVL0Gt5+nIG1LxSc2xP7kjnLLHLMvtgUAyJ0gVWi8aPO9hlykgcJ4yj6zw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1596757143; 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=yToSpdeM6C3ejk+ILWYfVNM0PXl/drpN3uSrQ21Pn/Q=; b=u8iA+PVvfqcZV/UkkWW0vL+1ds+iPg7NkXBWSU6eFX7wke3RfY2ICwdW7bfgBaB985zFLk EccljINe4wp1o6Cw== 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 , Kees Cook , 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: <159675714282.3192.931391555464136826.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: e2ee6173162b28053cb76b25887a0be9331c9e21 Gitweb: https://git.kernel.org/tip/e2ee6173162b28053cb76b25887a0be9331c9e21 Author: Arvind Sankar AuthorDate: Mon, 27 Jul 2020 19:07:55 -04:00 Committer: Ingo Molnar CommitterDate: Fri, 31 Jul 2020 11:08:07 +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 Reviewed-by: Kees Cook 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 e0f69f3..c31f3a5 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; }