linux-stable/arch/x86/kernel/apic
Randy Dunlap 9777de28cf x86: Fix return value of __setup handlers
[ Upstream commit 12441ccdf5 ]

__setup() handlers should return 1 to obsolete_checksetup() in
init/main.c to indicate that the boot option has been handled. A return
of 0 causes the boot option/value to be listed as an Unknown kernel
parameter and added to init's (limited) argument (no '=') or environment
(with '=') strings. So return 1 from these x86 __setup handlers.

Examples:

  Unknown kernel command line parameters "apicpmtimer
    BOOT_IMAGE=/boot/bzImage-517rc8 vdso=1 ring3mwait=disable", will be
    passed to user space.

  Run /sbin/init as init process
   with arguments:
     /sbin/init
     apicpmtimer
   with environment:
     HOME=/
     TERM=linux
     BOOT_IMAGE=/boot/bzImage-517rc8
     vdso=1
     ring3mwait=disable

Fixes: 2aae950b21 ("x86_64: Add vDSO for x86-64 with gettimeofday/clock_gettime/getcpu")
Fixes: 77b52b4c5c ("x86: add "debugpat" boot option")
Fixes: e16fd002af ("x86/cpufeature: Enable RING3MWAIT for Knights Landing")
Fixes: b8ce335906 ("x86_64: convert to clock events")
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/20220314012725.26661-1-rdunlap@infradead.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-14 18:11:35 +02:00
..
apic.c x86: Fix return value of __setup handlers 2022-06-14 18:11:35 +02:00
apic_common.c x86/apic: Fix signedness bug in APIC ID validity checks 2018-04-10 16:46:39 +02:00
apic_flat_64.c x86/apic/flat64: Remove the IPI shorthand decision logic 2019-07-25 16:12:02 +02:00
apic_noop.c x86/apic: Cleanup the include maze 2019-07-25 16:11:57 +02:00
apic_numachip.c x86/apic: Consolidate the apic local headers 2019-07-25 16:11:58 +02:00
bigsmp_32.c Merge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-09-17 12:04:39 -07:00
hw_nmi.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
io_apic.c x86/ioapic: Force affinity setup before startup 2021-08-18 08:57:02 +02:00
ipi.c x86/apic: Share common IPI helpers 2019-07-25 16:12:02 +02:00
local.h x86/apic/x2apic: Implement IPI shorthands support 2019-07-25 16:12:02 +02:00
Makefile x86/PCI: Remove unused HyperTransport interrupt support 2017-11-23 20:18:18 +01:00
msi.c x86/msi: Force affinity setup before startup 2021-08-18 08:57:02 +02:00
probe_32.c Merge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-09-17 12:04:39 -07:00
probe_64.c x86/apic/flat64: Remove the IPI shorthand decision logic 2019-07-25 16:12:02 +02:00
vector.c x86/apic: Mark _all_ legacy interrupts when IO/APIC is missing 2021-06-10 13:37:12 +02:00
x2apic_cluster.c x86/apic: Add extra serialization for non-serializing MSRs 2021-02-10 09:25:32 +01:00
x2apic_phys.c x86/apic: Add extra serialization for non-serializing MSRs 2021-02-10 09:25:32 +01:00
x2apic_uv_x.c x86/apic/uv: Make x2apic_extra_bits static 2019-07-25 16:11:58 +02:00