From: Marco Schlumpp Date: Mon, 20 Nov 2023 08:15:09 +0000 (+0100) Subject: Remove broken patch for __unw_getcontext X-Git-Tag: RELEASE-0.16.0~1 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=5a3c8b3110ecf16cee15b6845c87a525c01f1d60;p=unikraft%2Flibs%2Flibunwind.git Remove broken patch for __unw_getcontext The patch just skipped internal libunwind functions to work-around the missing unwind tables in libunwind itself. This work-around caused a mismatch between the actual stack state and what the unwind tables of the user application expected. Signed-off-by: Marco Schlumpp --- diff --git a/patches/0001-Save-RIP-from-previous-stack-frame.patch b/patches/0001-Save-RIP-from-previous-stack-frame.patch deleted file mode 100644 index 2011e3f..0000000 --- a/patches/0001-Save-RIP-from-previous-stack-frame.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 6d79ff97d634cf5317492f7e80ede5b8e07bf51a Mon Sep 17 00:00:00 2001 -From: Andrei Tatar -Date: Wed, 10 May 2023 15:21:30 +0300 -Subject: [PATCH] Save RIP from previous stack frame - -__unw_getcontext assumes the throwing function's return address is at -the top of the stack; however, this does not hold in unikraft, instead -we must go one stack frame earlier to get the right address. - -Co-authored-by: Vlad-Andrei Badoiu -Signed-off-by: Vlad-Andrei Badoiu -Signed-off-by: Andrei Tatar ---- - libunwind/src/UnwindRegistersSave.S | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libunwind/src/UnwindRegistersSave.S b/libunwind/src/UnwindRegistersSave.S -index b39489235..49067c021 100644 ---- a/src/UnwindRegistersSave.S -+++ b/src/UnwindRegistersSave.S -@@ -90,7 +90,7 @@ DEFINE_LIBUNWIND_FUNCTION(__unw_getcontext) - movq %r13,104(PTR) - movq %r14,112(PTR) - movq %r15,120(PTR) -- movq (%rsp),TMP -+ movq 8(%rbp),TMP - movq TMP,128(PTR) # store return address as rip - # skip rflags - # skip cs --- -2.40.1 -