linux/arch/x86/kernel/cpu
Borislav Petkov (AMD) f58d6fbcb7 x86/CPU/AMD: Fix the DIV(0) initial fix attempt
Initially, it was thought that doing an innocuous division in the #DE
handler would take care to prevent any leaking of old data from the
divider but by the time the fault is raised, the speculation has already
advanced too far and such data could already have been used by younger
operations.

Therefore, do the innocuous division on every exit to userspace so that
userspace doesn't see any potentially old data from integer divisions in
kernel space.

Do the same before VMRUN too, to protect host data from leaking into the
guest too.

Fixes: 77245f1c3c ("x86/CPU/AMD: Do not leak quotient data after a division by 0")
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Cc: <stable@kernel.org>
Link: https://lore.kernel.org/r/20230811213824.10025-1-bp@alien8.de
2023-08-14 11:02:50 +02:00
..
mce x86/MCE/AMD: Decrement threshold_bank refcount when removing threshold blocks 2023-07-22 17:35:16 +02:00
microcode x86/microcode/AMD: Load late on both threads too 2023-06-12 11:02:17 +02:00
mtrr x86/mtrr: Unify debugging printing 2023-06-01 15:04:33 +02:00
resctrl x86/resctrl: Implement rename op for mon groups 2023-06-07 12:40:36 +02:00
sgx - Yosry Ahmed brought back some cgroup v1 stats in OOM logs. 2023-06-28 10:28:11 -07:00
.gitignore
acrn.c x86/acrn: Set up timekeeping 2022-08-04 11:11:59 +02:00
amd.c x86/CPU/AMD: Fix the DIV(0) initial fix attempt 2023-08-14 11:02:50 +02:00
aperfmperf.c x86/aperfmperf: Erase stale arch_freq_scale values when disabling frequency invariance readings 2023-01-16 10:19:15 +01:00
bugs.c Mitigate Gather Data Sampling issue 2023-08-07 17:03:54 -07:00
cacheinfo.c x86/cpu/cacheinfo: Remove cpu_callout_mask dependency 2023-05-15 13:44:52 +02:00
centaur.c x86/cpu/centaur: Add Centaur family >=7 CPUs initialization support 2020-09-11 10:53:19 +02:00
common.c Mitigate Gather Data Sampling issue 2023-08-07 17:03:54 -07:00
cpu.h x86/speculation: Add Gather Data Sampling mitigation 2023-07-19 16:45:37 -07:00
cpuid-deps.c x86/cpufeatures: Add Bandwidth Monitoring Event Configuration feature flag 2023-01-23 17:38:31 +01:00
cyrix.c x86/cyrix: include header linux/isa-dma.h 2022-07-26 14:03:12 -05:00
feat_ctl.c x86/cpu: Include the header of init_ia32_feat_ctl()'s prototype 2022-09-26 17:06:27 +02:00
hygon.c - Split MTRR and PAT init code to accomodate at least Xen PV and TDX 2022-12-13 14:56:56 -08:00
hypervisor.c
intel_epb.c x86/intel_epb: Set Alder Lake N and Raptor Lake P normal EPB 2022-11-03 11:31:01 -07:00
intel_pconfig.c
intel.c modules-6.4-rc1 2023-04-27 16:36:55 -07:00
Makefile x86/cpu: Remove X86_FEATURE_NAMES 2023-05-15 20:03:08 +02:00
match.c
mkcapflags.sh
mshyperv.c - Add the necessary glue so that the kernel can run as a confidential 2023-04-25 10:48:08 -07:00
perfctr-watchdog.c x86/nmi_watchdog: Fix old-style NMI watchdog regression on old Intel CPUs 2021-06-10 10:04:40 +02:00
powerflags.c
proc.c x86/aperfmperf: Integrate the fallback code from show_cpuinfo() 2022-04-27 20:22:20 +02:00
rdrand.c x86/rdrand: Remove "nordrand" flag in favor of "random.trust_cpu" 2022-07-18 15:04:04 +02:00
scattered.c x86/cpufeatures: Add Bandwidth Monitoring Event Configuration feature flag 2023-01-23 17:38:31 +01:00
topology.c x86/topology: Fix erroneous smp_num_siblings on Intel Hybrid platforms 2023-05-25 10:48:42 -07:00
transmeta.c
tsx.c x86/cpu: Remove redundant extern x86_read_arch_cap_msr() 2023-01-10 12:40:24 +01:00
umc.c
umwait.c x86/umwait: move to use bus_get_dev_root() 2023-03-17 15:29:29 +01:00
vmware.c sched/clock/x86: Mark sched_clock() noinstr 2023-01-31 15:01:47 +01:00
vortex.c x86/CPU: Add support for Vortex CPUs 2021-10-21 15:49:07 +02:00
zhaoxin.c x86/cpu: Reinitialize IA32_FEAT_CTL MSR on BSP during wakeup 2020-06-15 14:18:37 +02:00