Commit 2380b9f5 authored by Kevin Loughlin's avatar Kevin Loughlin Committed by Greg Kroah-Hartman
Browse files

x86/sev: Add missing RIP_REL_REF() invocations during sme_enable()

[ Upstream commit 72dafb56 ]

The following commit:

  1c811d40 ("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: 1c811d40 ("x86/sev: Fix position dependent variable references in startup code")
Signed-off-by: default avatarKevin Loughlin <kevinloughlin@google.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
Reviewed-by: default avatarArd Biesheuvel <ardb@kernel.org>
Reviewed-by: default avatarTom 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: default avatarSasha Levin <sashal@kernel.org>
parent cbcd6c85
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment