sst-linux/arch/x86/mm
Kevin Loughlin 2380b9f5aa x86/sev: Add missing RIP_REL_REF() invocations during sme_enable()
[ Upstream commit 72dafb567760320f2de7447cd6e979bf9d4e5d17 ]

The following commit:

  1c811d403afd ("x86/sev: Fix position dependent variable references in startup code")

introduced RIP_REL_REF() to force RIP-relative accesses to global variables,
as needed to prevent crashes during early SEV/SME startup code.

For completeness, RIP_REL_REF() should be used with additional variables during
sme_enable():

  https://lore.kernel.org/all/CAMj1kXHnA0fJu6zh634=fbJswp59kSRAbhW+ubDGj1+NYwZJ-Q@mail.gmail.com/

Access these vars with RIP_REL_REF() to prevent problem reoccurence.

Fixes: 1c811d403afd ("x86/sev: Fix position dependent variable references in startup code")
Signed-off-by: Kevin Loughlin <kevinloughlin@google.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Link: https://lore.kernel.org/r/20241122202322.977678-1-kevinloughlin@google.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-04-10 14:33:30 +02:00
..
pat x86/mm/pat: cpa-test: fix length for CPA_ARRAY test 2025-04-10 14:33:30 +02:00
amdtopology.c
cpu_entry_area.c
debug_pagetables.c
dump_pagetables.c
extable.c
fault.c
highmem_32.c
hugetlbpage.c
ident_map.c
init_32.c
init_64.c
init.c x86/mm: Don't disable PCID when INVLPG has been fixed by microcode 2025-03-13 12:53:24 +01:00
iomap_32.c
ioremap.c x86/mm: Fix a kdump kernel failure on SME system when CONFIG_IMA_KEXEC=y 2024-11-22 15:37:30 +01:00
kasan_init_64.c
kaslr.c
kmmio.c
kmsan_shadow.c
maccess.c
Makefile
mem_encrypt_amd.c
mem_encrypt_boot.S
mem_encrypt_identity.c x86/sev: Add missing RIP_REL_REF() invocations during sme_enable() 2025-04-10 14:33:30 +02:00
mem_encrypt.c
mm_internal.h
mmap.c
mmio-mod.c
numa_32.c
numa_64.c
numa_emulation.c
numa_internal.h
numa.c
pf_in.c
pf_in.h
pgprot.c
pgtable_32.c
pgtable.c
physaddr.c
physaddr.h
pkeys.c
pti.c
srat.c
testmmiotrace.c
tlb.c x86/mm/tlb: Only trim the mm_cpumask once a second 2025-02-21 13:50:00 +01:00