android_kernel_xiaomi_sm7250/arch
Peter Zijlstra 9e03416b02 x86/entry: Add kernel IBRS implementation
commit 2dbb887e875b1de3ca8f40ddf26bcfe55798c609 upstream.

Implement Kernel IBRS - currently the only known option to mitigate RSB
underflow speculation issues on Skylake hardware.

Note: since IBRS_ENTER requires fuller context established than
UNTRAIN_RET, it must be placed after it. However, since UNTRAIN_RET
itself implies a RET, it must come after IBRS_ENTER. This means
IBRS_ENTER needs to also move UNTRAIN_RET.

Note 2: KERNEL_IBRS is sub-optimal for XenPV.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
[cascardo: conflict at arch/x86/entry/entry_64.S, skip_r11rcx]
[cascardo: conflict at arch/x86/entry/entry_64_compat.S]
[cascardo: conflict fixups, no ANNOTATE_NOENDBR]
[cascardo: entry fixups because of missing UNTRAIN_RET]
[cascardo: conflicts on fsgsbase]
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Signed-off-by: Suleiman Souhlal <suleiman@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-11-23 07:53:45 +01:00
..
alpha tty: the rest, stop using tty_schedule_flip() 2022-07-29 17:10:37 +02:00
arc arc: iounmap() arg is volatile 2022-11-03 23:52:30 +09:00
arm ARM: dts: imx6sx: add missing properties for sram 2022-10-26 13:19:40 +02:00
arm64 arm64: errata: Remove AES hwcap for COMPAT tasks 2022-11-03 23:52:25 +09:00
c6x
h8300 h8300: fix PREEMPTION build, TI_PRE_COUNT undefined 2021-02-23 15:00:58 +01:00
hexagon hexagon: export raw I/O routines for modules 2021-11-26 11:36:23 +01:00
ia64 ia64, processor: fix -Wincompatible-pointer-types in ia64_get_irr() 2022-08-25 11:14:56 +02:00
m68k m68k: use fallback for random_get_entropy() instead of zero 2022-06-25 11:49:10 +02:00
microblaze microblaze: Prevent the overflow of the start 2020-02-24 08:34:53 +01:00
mips MIPS: BCM47XX: Cast memcmp() of function to (void *) 2022-10-26 13:19:36 +02:00
nds32 nds32: fix access_ok() checks in get/put_user 2022-03-28 08:41:44 +02:00
nios2 nios2: add force_successful_syscall_return() 2022-08-25 11:15:40 +02:00
openrisc openrisc: start CPU timer early in boot 2022-06-14 16:59:17 +02:00
parisc parisc: Avoid printing the hardware path twice 2022-11-10 17:46:55 +01:00
powerpc powerpc: Fix SPE Power ISA properties for e500v1 platforms 2022-10-26 13:19:35 +02:00
riscv riscv: fix build with binutils 2.38 2022-10-26 13:19:22 +02:00
s390 s390/futex: add missing EX_TABLE entry to __futex_atomic_op() 2022-11-03 23:52:29 +09:00
sh sh: machvec: Use char[] for section boundaries 2022-10-26 13:19:24 +02:00
sparc sparc: use fallback for random_get_entropy() instead of zero 2022-06-25 11:49:10 +02:00
um UM: cpuinfo: Fix a warning for CONFIG_CPUMASK_OFFSTACK 2022-10-26 13:19:22 +02:00
unicore32
x86 x86/entry: Add kernel IBRS implementation 2022-11-23 07:53:45 +01:00
xtensa xtensa: Fix refcount leak bug in time.c 2022-07-02 16:27:36 +02:00
.gitignore
Kconfig x86: Make ARCH_USE_MEMREMAP_PROT a generic Kconfig symbol 2021-12-22 09:19:01 +01:00