From nobody Fri May 8 11:35:56 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E91CEC433F5 for ; Wed, 4 May 2022 16:28:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353022AbiEDQcR (ORCPT ); Wed, 4 May 2022 12:32:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236487AbiEDQcQ (ORCPT ); Wed, 4 May 2022 12:32:16 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3163BE2A; Wed, 4 May 2022 09:28:39 -0700 (PDT) Date: Wed, 04 May 2022 16:28:36 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1651681718; 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=C1nhnUez3WutfniW4uOZh+IkzgM6frf+TCfMadffiaI=; b=Ro4XiDXUnhs7V4iY6YrhGx9YioqDDpLREeR4sPTMjmYYGcnbrBP5DCLXqmD53Lke6cjzR5 RYTeWHEsOTm9TCUGZ9Q1wdFkEABfJR56timyoOmPV7pfBECvSfwb3B64g2haQ2hNPJknEO 0bDwiXl1d9AaBgiCb/pkFlUTQP6AcmvToBhOZ2+SeYHDSIXoTRaOjjlhUor1YhLlrPWObl 3YPj6hXwjyfrMzCRnj+9mg2mYtSrCxY0gJTpkOccNj9i2GyW48F9CUAjsESmfC6q48xNOU XOe0SrxHV2uha+3kg64GSbR3GLn3V3lPC/+dejm75Bh4j970KZfCZRBaHAPGMA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1651681718; 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=C1nhnUez3WutfniW4uOZh+IkzgM6frf+TCfMadffiaI=; b=mLPJHLekMIXXwRv5w16tInYRDcfqGujR5SSUdl25tP+RPYcRm9TWjZbWWWNu3Z6uLy/ku9 A/FxUaSBmUHA7WDA== From: "tip-bot2 for Randy Dunlap" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/misc] x86/mm: Cleanup the control_va_addr_alignment() __setup handler Cc: Igor Zhbanov , Randy Dunlap , Borislav Petkov , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <64644a2f-4a20-bab3-1e15-3b2cdd0defe3@omprussia.ru> References: <64644a2f-4a20-bab3-1e15-3b2cdd0defe3@omprussia.ru> MIME-Version: 1.0 Message-ID: <165168171687.4207.3726639368956620183.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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/misc branch of tip: Commit-ID: 1ef64b1e89e6d4018da46e08ffc32779a31160c7 Gitweb: https://git.kernel.org/tip/1ef64b1e89e6d4018da46e08ffc32779a= 31160c7 Author: Randy Dunlap AuthorDate: Mon, 14 Mar 2022 17:10:45 -07:00 Committer: Borislav Petkov CommitterDate: Wed, 04 May 2022 18:20:42 +02:00 x86/mm: Cleanup the control_va_addr_alignment() __setup handler Clean up control_va_addr_alignment(): a. Make '=3D' required instead of optional (as documented). b. Print a warning if an invalid option value is used. c. Return 1 from the __setup handler when an invalid option value is used. This prevents the kernel from polluting init's (limited) environment space with the entire string. Fixes: dfb09f9b7ab0 ("x86, amd: Avoid cache aliasing penalties on AMD famil= y 15h") Reported-by: Igor Zhbanov Signed-off-by: Randy Dunlap Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/64644a2f-4a20-bab3-1e15-3b2cdd0defe3@omprus= sia.ru Link: https://lore.kernel.org/r/20220315001045.7680-1-rdunlap@infradead.org --- arch/x86/kernel/sys_x86_64.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/arch/x86/kernel/sys_x86_64.c b/arch/x86/kernel/sys_x86_64.c index 660b788..8cc653f 100644 --- a/arch/x86/kernel/sys_x86_64.c +++ b/arch/x86/kernel/sys_x86_64.c @@ -68,9 +68,6 @@ static int __init control_va_addr_alignment(char *str) if (*str =3D=3D 0) return 1; =20 - if (*str =3D=3D '=3D') - str++; - if (!strcmp(str, "32")) va_align.flags =3D ALIGN_VA_32; else if (!strcmp(str, "64")) @@ -80,11 +77,11 @@ static int __init control_va_addr_alignment(char *str) else if (!strcmp(str, "on")) va_align.flags =3D ALIGN_VA_32 | ALIGN_VA_64; else - return 0; + pr_warn("invalid option value: 'align_va_addr=3D%s'\n", str); =20 return 1; } -__setup("align_va_addr", control_va_addr_alignment); +__setup("align_va_addr=3D", control_va_addr_alignment); =20 SYSCALL_DEFINE6(mmap, unsigned long, addr, unsigned long, len, unsigned long, prot, unsigned long, flags,