Skip to content

Commit 50abbe1

Browse files
committed
Merge branch 'for-next/mitigations' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux into for-next/core
2 parents 9431ac2 + 4ad499c commit 50abbe1

File tree

13 files changed

+325
-97
lines changed

13 files changed

+325
-97
lines changed

Documentation/admin-guide/kernel-parameters.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ parameter is applicable::
8888
APIC APIC support is enabled.
8989
APM Advanced Power Management support is enabled.
9090
ARM ARM architecture is enabled.
91+
ARM64 ARM64 architecture is enabled.
9192
AX25 Appropriate AX.25 support is enabled.
9293
CLK Common clock infrastructure is enabled.
9394
CMA Contiguous Memory Area support is enabled.

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2544,6 +2544,40 @@
25442544
in the "bleeding edge" mini2440 support kernel at
25452545
http://repo.or.cz/w/linux-2.6/mini2440.git
25462546

2547+
mitigations=
2548+
[X86,PPC,S390,ARM64] Control optional mitigations for
2549+
CPU vulnerabilities. This is a set of curated,
2550+
arch-independent options, each of which is an
2551+
aggregation of existing arch-specific options.
2552+
2553+
off
2554+
Disable all optional CPU mitigations. This
2555+
improves system performance, but it may also
2556+
expose users to several CPU vulnerabilities.
2557+
Equivalent to: nopti [X86,PPC]
2558+
kpti=0 [ARM64]
2559+
nospectre_v1 [PPC]
2560+
nobp=0 [S390]
2561+
nospectre_v2 [X86,PPC,S390,ARM64]
2562+
spectre_v2_user=off [X86]
2563+
spec_store_bypass_disable=off [X86,PPC]
2564+
ssbd=force-off [ARM64]
2565+
l1tf=off [X86]
2566+
2567+
auto (default)
2568+
Mitigate all CPU vulnerabilities, but leave SMT
2569+
enabled, even if it's vulnerable. This is for
2570+
users who don't want to be surprised by SMT
2571+
getting disabled across kernel upgrades, or who
2572+
have other ways of avoiding SMT-based attacks.
2573+
Equivalent to: (default behavior)
2574+
2575+
auto,nosmt
2576+
Mitigate all CPU vulnerabilities, disabling SMT
2577+
if needed. This is for users who always want to
2578+
be fully mitigated, even if it means losing SMT.
2579+
Equivalent to: l1tf=flush,nosmt [X86]
2580+
25472581
mminit_loglevel=
25482582
[KNL] When CONFIG_DEBUG_MEMORY_INIT is set, this
25492583
parameter allows control of the logging verbosity for
@@ -2873,10 +2907,10 @@
28732907
check bypass). With this option data leaks are possible
28742908
in the system.
28752909

2876-
nospectre_v2 [X86,PPC_FSL_BOOK3E] Disable all mitigations for the Spectre variant 2
2877-
(indirect branch prediction) vulnerability. System may
2878-
allow data leaks with this option, which is equivalent
2879-
to spectre_v2=off.
2910+
nospectre_v2 [X86,PPC_FSL_BOOK3E,ARM64] Disable all mitigations for
2911+
the Spectre variant 2 (indirect branch prediction)
2912+
vulnerability. System may allow data leaks with this
2913+
option.
28802914

28812915
nospec_store_bypass_disable
28822916
[HW] Disable all mitigations for the Speculative Store Bypass vulnerability

arch/arm64/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ config ARM64
9090
select GENERIC_CLOCKEVENTS
9191
select GENERIC_CLOCKEVENTS_BROADCAST
9292
select GENERIC_CPU_AUTOPROBE
93+
select GENERIC_CPU_VULNERABILITIES
9394
select GENERIC_EARLY_IOREMAP
9495
select GENERIC_IDLE_POLL_SETUP
9596
select GENERIC_IRQ_MULTI_HANDLER

arch/arm64/include/asm/cpufeature.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -633,11 +633,7 @@ static inline int arm64_get_ssbd_state(void)
633633
#endif
634634
}
635635

636-
#ifdef CONFIG_ARM64_SSBD
637636
void arm64_set_ssbd_mitigation(bool state);
638-
#else
639-
static inline void arm64_set_ssbd_mitigation(bool state) {}
640-
#endif
641637

642638
extern int do_emulate_mrs(struct pt_regs *regs, u32 sys_reg, u32 rt);
643639

0 commit comments

Comments
 (0)