Skip to content

Commit

Permalink
Fix S3 resume
Browse files Browse the repository at this point in the history
  • Loading branch information
marmarek committed Sep 27, 2020
1 parent 85f4a51 commit 62678cc
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
37 changes: 37 additions & 0 deletions patch-x86-S3-Fix-Shadow-Stack-resume-path.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
From bd032cbd664a229603592d595ce562dc1a22d158 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?=
<[email protected]>
Date: Sun, 27 Sep 2020 17:29:35 +0200
Subject: [PATCH] x86/S3: Fix Shadow Stack resume path
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Organization: Invisible Things Lab
Cc: Marek Marczykowski-Górecki <[email protected]>

Fix the resume path to load the shadow stack pointer from saved_ssp (not
saved_rsp), to match what suspend path does.

Signed-off-by: Marek Marczykowski-Górecki <[email protected]>
Fixes: 633ecc4a7cb2 ("x86/S3: Save and restore Shadow Stack configuration")
Backport: 4.14
---
xen/arch/x86/acpi/wakeup_prot.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/acpi/wakeup_prot.S b/xen/arch/x86/acpi/wakeup_prot.S
index a2c41c4f3f26..c6b3fcc93d93 100644
--- a/xen/arch/x86/acpi/wakeup_prot.S
+++ b/xen/arch/x86/acpi/wakeup_prot.S
@@ -69,7 +69,7 @@ ENTRY(s3_resume)
* so SETSSBSY will successfully load a value useful for us, then
* reset MSR_PL0_SSP to its usual value and pop the temporary token.
*/
- mov saved_rsp(%rip), %rdi
+ mov saved_ssp(%rip), %rdi
cmpq $1, %rdi
je .L_shstk_done

--
2.25.4

1 change: 1 addition & 0 deletions xen.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ Patch622: patch-xen-disable-efi-gettime.patch
Patch627: patch-libxl-automatically-enable-gfx_passthru-if-IGD-is-as.patch
Patch628: patch-libxl-workaround-gcc-10.2-maybe-uninitialized-warnin.patch
Patch629: patch-libxl-fix-Werror-stringop-truncation-in-libxl__prepa.patch
Patch630: patch-x86-S3-Fix-Shadow-Stack-resume-path.patch

# GCC8 fixes
Patch714: patch-tools-kdd-mute-spurious-gcc-warning.patch
Expand Down

0 comments on commit 62678cc

Please sign in to comment.