linux-stable/arch/x86
Arvind Sankar f3eabd796e x86/fpu: Allow multiple bits in clearcpuid= parameter
[ Upstream commit 0a4bb5e550 ]

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
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-10-29 09:07:00 +01:00
..
boot x86/boot/compressed: Relax sed symbol type regex for LLVM ld.lld 2020-06-25 15:42:00 +02:00
configs x86/defconfig: Enable CONFIG_USB_XHCI_HCD=y 2020-09-23 10:46:37 +02:00
crypto crypto: aesni - add compatibility with IAS 2020-08-21 09:48:13 +02:00
entry x86/entry/64: Fix unwind hints in register clearing code 2020-05-20 08:17:08 +02:00
events perf/amd/uncore: Replace manual sampling check with CAP_NO_INTERRUPT flag 2020-03-20 10:54:23 +01:00
hyperv x86/hyperv: mark hyperv_init as __init function 2019-12-01 09:14:37 +01:00
ia32 x86/ia32: Fix ia32_restore_sigcontext() AC leak 2019-05-31 06:47:31 -07:00
include x86/speculation/mds: Mark mds_user_clear_cpu_buffers() __always_inline 2020-10-01 13:12:47 +02:00
kernel x86/fpu: Allow multiple bits in clearcpuid= parameter 2020-10-29 09:07:00 +01:00
kvm KVM: SVM: Initialize prev_ga_tag before use 2020-10-29 09:07:00 +01:00
lib arch/x86/lib/usercopy_64.c: fix __copy_user_flushcache() cache writeback 2020-10-01 13:12:27 +02:00
math-emu x86: math-emu: Fix up 'cmp' insn for clang ias 2020-07-29 07:42:56 +02:00
mm x86/mm: Stop printing BRK addresses 2020-06-20 10:25:13 +02:00
net bpf, x86: Fix encoding for lower 8-bit registers in BPF_STX BPF_B 2020-05-02 17:24:42 +02:00
oprofile x86/oprofile: Fix bogus GCC-8 warning in nmi_setup() 2018-02-28 10:19:41 +01:00
pci x86/PCI: Mark Intel C620 MROMs as having non-compliant BARs 2020-06-20 10:25:00 +02:00
platform irqdomain/treewide: Keep firmware node unconditionally allocated 2020-07-29 07:42:52 +02:00
power PM / hibernate: Check the success of generating md5 digest before hibernation 2019-11-24 08:23:02 +01:00
purgatory License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ras License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
realmode x86/build: Specify elf_i386 linker emulation explicitly for i386 objects 2019-04-05 22:31:39 +02:00
tools x86/insn: Fix awk regexp warnings 2019-12-01 09:14:21 +01:00
um um: Drop own definition of PTRACE_SYSEMU/_SINGLESTEP 2018-11-21 09:24:06 +01:00
video
xen x86: Fix early boot crash on gcc-10, third try 2020-05-20 08:17:15 +02:00
.gitignore
Kbuild
Kconfig x86/olpc: Fix build error with CONFIG_MFD_CS5535=m 2019-11-24 08:23:16 +01:00
Kconfig.cpu License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig.debug x86, perf: Fix the dependency of the x86 insn decoder selftest 2020-01-27 14:46:45 +01:00
Makefile x86/retpolines: Fix up backport of a9d57ef15c 2019-10-05 12:48:05 +02:00
Makefile.um License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile_32.cpu License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00