x86/mm: Cleanup the control_va_addr_alignment() __setup handler
authorRandy Dunlap <rdunlap@infradead.org>
Tue, 15 Mar 2022 00:10:45 +0000 (17:10 -0700)
committerBorislav Petkov <bp@suse.de>
Wed, 4 May 2022 16:20:42 +0000 (18:20 +0200)
commit1ef64b1e89e6d4018da46e08ffc32779a31160c7
tree642588661a91cefbadf4485ecda573e07e9ba5f6
parent12441ccdf5e2f5a01a46e344976cbbd3d46845c9
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