From: "tip-bot2 for Randy Dunlap" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Igor Zhbanov <i.zhbanov@omprussia.ru>,
Randy Dunlap <rdunlap@infradead.org>,
Borislav Petkov <bp@suse.de>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: x86/misc] x86/mm: Cleanup the control_va_addr_alignment() __setup handler
Date: Wed, 04 May 2022 16:28:36 -0000 [thread overview]
Message-ID: <165168171687.4207.3726639368956620183.tip-bot2@tip-bot2> (raw)
In-Reply-To: <64644a2f-4a20-bab3-1e15-3b2cdd0defe3@omprussia.ru>
The following commit has been merged into the x86/misc branch of tip:
Commit-ID: 1ef64b1e89e6d4018da46e08ffc32779a31160c7
Gitweb: https://git.kernel.org/tip/1ef64b1e89e6d4018da46e08ffc32779a31160c7
Author: Randy Dunlap <rdunlap@infradead.org>
AuthorDate: Mon, 14 Mar 2022 17:10:45 -07:00
Committer: Borislav Petkov <bp@suse.de>
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 '=' 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 family 15h")
Reported-by: Igor Zhbanov <i.zhbanov@omprussia.ru>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/64644a2f-4a20-bab3-1e15-3b2cdd0defe3@omprussia.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 == 0)
return 1;
- if (*str == '=')
- str++;
-
if (!strcmp(str, "32"))
va_align.flags = 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 = ALIGN_VA_32 | ALIGN_VA_64;
else
- return 0;
+ pr_warn("invalid option value: 'align_va_addr=%s'\n", str);
return 1;
}
-__setup("align_va_addr", control_va_addr_alignment);
+__setup("align_va_addr=", control_va_addr_alignment);
SYSCALL_DEFINE6(mmap, unsigned long, addr, unsigned long, len,
unsigned long, prot, unsigned long, flags,
prev parent reply other threads:[~2022-05-04 16:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-25 17:20 Wrong __setup() callbacks return values and /init's environment pollution Igor Zhbanov
2022-02-15 1:19 ` Randy Dunlap
2022-05-04 15:01 ` [tip: x86/misc] x86: Fix return value of __setup handlers tip-bot2 for Randy Dunlap
2022-05-04 16:28 ` tip-bot2 for Randy Dunlap [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=165168171687.4207.3726639368956620183.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=bp@suse.de \
--cc=i.zhbanov@omprussia.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=rdunlap@infradead.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®