linux_dsm_epyc7002/arch/x86/include/asm
Quentin Casasnovas 06c8173eb9 x86/fpu/xsaves: Fix improper uses of __ex_table
Commit:

  f31a9f7c71 ("x86/xsaves: Use xsaves/xrstors to save and restore xsave area")

introduced alternative instructions for XSAVES/XRSTORS and commit:

  adb9d526e9 ("x86/xsaves: Add xsaves and xrstors support for booting time")

added support for the XSAVES/XRSTORS instructions at boot time.

Unfortunately both failed to properly protect them against faulting:

The 'xstate_fault' macro will use the closest label named '1'
backward and that ends up in the .altinstr_replacement section
rather than in .text. This means that the kernel will never find
in the __ex_table the .text address where this instruction might
fault, leading to serious problems if userspace manages to
trigger the fault.

Signed-off-by: Quentin Casasnovas <quentin.casasnovas@oracle.com>
Signed-off-by: Jamie Iles <jamie.iles@oracle.com>
[ Improved the changelog, fixed some whitespace noise. ]
Acked-by: Borislav Petkov <bp@alien8.de>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: <stable@vger.kernel.org>
Cc: Allan Xavier <mr.a.xavier@gmail.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Fixes: adb9d526e9 ("x86/xsaves: Add xsaves and xrstors support for booting time")
Fixes: f31a9f7c71 ("x86/xsaves: Use xsaves/xrstors to save and restore xsave area")
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2015-03-05 18:20:36 +01:00
..
crypto
numachip
trace
uv
xen xen: remove scratch frames for ballooned pages and m2p override 2015-01-28 14:03:10 +00:00
a.out-core.h
acenv.h
acpi.h x86/xen: Override ACPI IRQ management callback __acpi_unregister_gsi 2015-01-20 11:44:41 +01:00
agp.h
alternative-asm.h
alternative.h
amd_nb.h
apb_timer.h
apic_flat_64.h
apic.h x86/apic: Fix the devicetree build in certain configs 2015-02-18 22:30:19 +01:00
apicdef.h
apm.h
arch_hweight.h
archrandom.h
asm-offsets.h
asm.h
atomic64_32.h
atomic64_64.h
atomic.h
barrier.h
bios_ebda.h
bitops.h
boot.h
bootparam_utils.h
bug.h
bugs.h
cache.h
cacheflush.h
calgary.h
calling.h x86: entry_64.S: delete unused code 2015-01-13 14:00:33 -08:00
ce4100.h
checksum_32.h
checksum_64.h
checksum.h
clocksource.h
cmdline.h
cmpxchg_32.h
cmpxchg_64.h
cmpxchg.h
compat.h
context_tracking.h
cpu_device_id.h
cpu.h
cpufeature.h Merge branch 'perf/hw_breakpoints' into perf/core 2015-01-28 15:48:59 +01:00
cpumask.h
crash.h
current.h
debugreg.h
delay.h
desc_defs.h
desc.h x86, tls: Interpret an all-zero struct user_desc as "no segment" 2015-01-22 21:45:07 +01:00
device.h
disabled-features.h
div64.h
dma-mapping.h
dma.h
dmi.h
dwarf2.h
e820.h
edac.h
efi.h
elf.h
emergency-restart.h
entry_arch.h
espfix.h
exec.h
fb.h
fixmap.h
floppy.h
fpu-internal.h x86/fpu: Use a symbolic name for asm operand 2014-12-23 10:41:12 +01:00
frame.h
ftrace.h
futex.h
gart.h
genapic.h
geode.h
gpio.h
hardirq.h
highmem.h
hpet.h
hugetlb.h
hw_breakpoint.h
hw_irq.h
hypertransport.h
hypervisor.h
i387.h x86, fpu: Fix math_state_restore() race with kernel_fpu_begin() 2015-01-20 13:53:07 +01:00
i8259.h
ia32_unistd.h
ia32.h
idle.h
imr.h x86/intel/quark: Add Isolated Memory Regions for Quark X1000 2015-02-18 23:22:47 +01:00
inat_types.h
inat.h
init.h
insn.h
inst.h
intel_mid_vrtc.h
intel_scu_ipc.h
intel-mid.h x86, mrst: remove Moorestown specific serial drivers 2015-02-02 10:11:24 -08:00
io_apic.h x86/ioapic: Provide stub functions for IOAPIC%3Dn 2015-01-22 15:10:55 +01:00
io.h
iomap.h
iommu_table.h
iommu.h
iosf_mbi.h
ipi.h
irq_regs.h
irq_remapping.h iommu/irq_remapping: Kill function irq_remapping_supported() and related code 2015-01-15 11:24:23 +01:00
irq_vectors.h
irq_work.h
irq.h
irqflags.h
ist.h
jump_label.h
kasan.h x86_64: add KASan support 2015-02-13 21:21:41 -08:00
kbdleds.h
Kbuild
kdebug.h
kexec-bzimage64.h
kexec.h
kgdb.h
kmap_types.h
kmemcheck.h
kprobes.h
kvm_emulate.h KVM: x86: IRET emulation does not clear NMI masking 2015-01-26 12:14:42 +01:00
kvm_guest.h
kvm_host.h kvm: add halt_poll_ns module parameter 2015-02-06 13:08:37 +01:00
kvm_para.h
lguest_hcall.h lguest: remove NOTIFY call and eventfd facility. 2015-02-11 16:47:46 +10:30
lguest.h
linkage.h
livepatch.h livepatch: rename config to CONFIG_LIVEPATCH 2015-02-04 11:25:51 +01:00
local64.h
local.h
mach_timer.h
mach_traps.h
math_emu.h
mc146818rtc.h
mce.h x86, mce: Get rid of TIF_MCE_NOTIFY and associated mce tricks 2015-01-07 07:47:42 -08:00
microcode_amd.h
microcode_intel.h
microcode.h
misc.h
mmconfig.h
mmu_context.h perf/x86: Add /sys/devices/cpu/rdpmc=2 to allow rdpmc for all tasks 2015-02-04 12:10:49 +01:00
mmu.h perf/x86: Only allow rdpmc if a perf_event is mapped 2015-02-04 12:10:47 +01:00
mmx.h
mmzone_32.h
mmzone_64.h
mmzone.h
module.h
mpspec_def.h
mpspec.h
mpx.h
mshyperv.h
msidef.h
msr.h
mtrr.h
mutex_32.h
mutex_64.h
mutex.h
mwait.h
nmi.h
nops.h
numa_32.h
numa.h
olpc_ofw.h
olpc.h
page_32_types.h
page_32.h
page_64_types.h kasan: enable stack instrumentation 2015-02-13 21:21:41 -08:00
page_64.h
page_types.h x86/mm/ASLR: Avoid PAGE_SIZE redefinition for UML subarch 2015-02-20 10:55:32 +01:00
page.h
paravirt_types.h
paravirt.h x86: Store a per-cpu shadow copy of CR4 2015-02-04 12:10:42 +01:00
parport.h
pat.h
pci_64.h
pci_x86.h x86/PCI: Refine the way to release PCI IRQ resources 2015-02-05 15:09:26 +01:00
pci-direct.h
pci-functions.h
pci.h
percpu.h
perf_event_p4.h
perf_event.h
pgalloc.h
pgtable_32_types.h
pgtable_32.h
pgtable_64_types.h
pgtable_64.h mm: remove remaining references to NUMA hinting bits and helpers 2015-02-12 18:54:08 -08:00
pgtable_types.h mm: remove remaining references to NUMA hinting bits and helpers 2015-02-12 18:54:08 -08:00
pgtable-2level_types.h
pgtable-2level.h x86: drop _PAGE_FILE and pte_file()-related helpers 2015-02-10 14:30:33 -08:00
pgtable-3level_types.h
pgtable-3level.h x86: drop _PAGE_FILE and pte_file()-related helpers 2015-02-10 14:30:33 -08:00
pgtable.h x86: pte_protnone() and pmd_protnone() must check entry is not present 2015-02-19 15:04:49 -08:00
platform_sst_audio.h
pmc_atom.h x86: pmc_atom: Expose contents of PSS 2015-01-20 12:50:14 +01:00
posix_types.h
preempt.h
probe_roms.h
processor-cyrix.h
processor-flags.h
processor.h x86: Clean up cr4 manipulation 2015-02-04 12:10:41 +01:00
prom.h
proto.h
ptrace.h
pvclock-abi.h
pvclock.h
qrwlock.h
realmode.h
reboot_fixups.h
reboot.h
required-features.h
resume-trace.h
rio.h
rmwcc.h
rtc.h
rwsem.h
seccomp_32.h
seccomp_64.h
seccomp.h
sections.h
segment.h
serial.h
setup_arch.h
setup.h
shmparam.h
sigcontext.h
sigframe.h
sighandling.h
signal.h
simd.h
smap.h
smp.h
sparsemem.h
special_insns.h x86: Store a per-cpu shadow copy of CR4 2015-02-04 12:10:42 +01:00
spinlock_types.h
spinlock.h x86/spinlocks/paravirt: Fix memory corruption on unlock 2015-02-18 14:53:49 +01:00
sta2x11.h
stackprotector.h
stacktrace.h
string_32.h
string_64.h x86_64: kasan: add interceptors for memset/memmove/memcpy functions 2015-02-13 21:21:41 -08:00
string.h
suspend_32.h
suspend_64.h
suspend.h
svm.h
swiotlb.h
switch_to.h
sync_bitops.h
sys_ia32.h
syscall.h
syscalls.h
sysfb.h
tce.h
thread_info.h all arches, signal: move restart_block to struct task_struct 2015-02-12 18:54:12 -08:00
time.h
timer.h
timex.h
tlb.h
tlbflush.h x86: Store a per-cpu shadow copy of CR4 2015-02-04 12:10:42 +01:00
topology.h
trace_clock.h
traps.h x86, traps: Add ist_begin_non_atomic and ist_end_non_atomic 2015-01-02 10:22:46 -08:00
tsc.h
uaccess_32.h
uaccess_64.h
uaccess.h x86/uaccess: fix sparse errors 2015-01-13 15:22:59 +02:00
unaligned.h
unistd.h
uprobes.h
user32.h
user_32.h
user_64.h
user.h
vdso.h
vga.h
vgtod.h x86, vdso: Use asm volatile in __getcpu 2014-12-23 13:05:30 -08:00
virtext.h x86: Store a per-cpu shadow copy of CR4 2015-02-04 12:10:42 +01:00
vm86.h
vmx.h KVM: VMX: Add PML support in VMX 2015-01-30 09:39:54 +01:00
vsyscall.h
vvar.h
word-at-a-time.h
x2apic.h
x86_init.h
xcr.h
xor_32.h
xor_64.h
xor_avx.h
xor.h
xsave.h x86/fpu/xsaves: Fix improper uses of __ex_table 2015-03-05 18:20:36 +01:00