1
0
Fork 0
alistair23-linux/arch/x86
Arvind Sankar 0a4bb5e550 x86/fpu: Allow multiple bits in clearcpuid= parameter
Commit

  0c2a3913d6 ("x86/fpu: Parse clearcpuid= as early XSAVE argument")

changed clearcpuid parsing from __setup() to cmdline_find_option().
While the __setup() function would have been called for each clearcpuid=
parameter on the command line, cmdline_find_option() will only return
the last one, so the change effectively made it impossible to disable
more than one bit.

Allow a comma-separated list of bit numbers as the argument for
clearcpuid to allow multiple bits to be disabled again. Log the bits
being disabled for informational purposes.

Also fix the check on the return value of cmdline_find_option(). It
returns -1 when the option is not found, so testing as a boolean is
incorrect.

Fixes: 0c2a3913d6 ("x86/fpu: Parse clearcpuid= as early XSAVE argument")
Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20200907213919.2423441-1-nivedita@alum.mit.edu
2020-09-10 18:32:05 +02:00
..
boot treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
configs x86/defconfigs: Refresh defconfig files 2020-07-25 12:02:14 +02:00
crypto crypto: x86/curve25519 - Remove unused carry variables 2020-07-31 18:25:29 +10:00
entry x86/entry: Unbreak 32bit fast syscall 2020-09-04 15:50:14 +02:00
events treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
hyperv vmalloc: fix the owner argument for the new __vmalloc_node_range callers 2020-07-03 16:15:25 -07:00
ia32 mm: remove unneeded includes of <asm/pgalloc.h> 2020-08-07 11:33:26 -07:00
include x86/entry: Fix AC assertion 2020-09-04 15:09:29 +02:00
kernel x86/fpu: Allow multiple bits in clearcpuid= parameter 2020-09-10 18:32:05 +02:00
kvm treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
lib x86/cmdline: Disable jump tables for cmdline.c 2020-09-03 10:59:16 +02:00
math-emu treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
mm x86, fakenuma: Fix invalid starting node ID 2020-09-04 08:56:13 +02:00
net bpf, i386: Remove unneeded conversion to bool 2020-05-07 16:29:14 +02:00
oprofile x86: Use pr_warn instead of pr_warning 2019-10-18 15:00:18 +02:00
pci xen: branch for v5.9-rc2 2020-08-21 12:28:33 -07:00
platform efi/x86: Move 32-bit code into efi_32.c 2020-08-20 11:18:36 +02:00
power Kbuild updates for v5.9 2020-08-09 14:10:26 -07:00
purgatory Misc fixes and small updates all around the place: 2020-08-15 10:38:03 -07:00
ras treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
realmode Rebase locking/kcsan to locking/urgent 2020-06-11 20:02:46 +02:00
tools .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
um kbuild: remove cc-option test of -fno-stack-protector 2020-07-07 11:13:10 +09:00
video
xen xen: branch for v5.9-rc1b 2020-08-14 13:34:37 -07:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
Kbuild
Kconfig A set of posix CPU timer changes which allows to defer the heavy work of 2020-08-14 14:17:51 -07:00
Kconfig.assembler x86/delay: Introduce TPAUSE delay 2020-05-07 16:06:20 +02:00
Kconfig.cpu treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Kconfig.debug locking/lockdep: Fix TRACE_IRQFLAGS vs. NMIs 2020-07-27 15:13:29 +02:00
Makefile Kbuild updates for v5.9 2020-08-09 14:10:26 -07:00
Makefile.um
Makefile_32.cpu x86/math-emu: Limit MATH_EMULATION to 486SX compatibles 2019-10-03 10:51:17 +02:00