diff options
author | Sebastian Andrzej Siewior <sebastian@breakpoint.cc> | 2021-12-28 23:05:32 +0100 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2022-01-04 12:14:19 +0100 |
commit | d26b3766a0a35668ee62b839a62acbdcd9ff2a98 (patch) | |
tree | d9e6bbad99613e785b0685cb492fa7b914fd448c | |
parent | Validate the category in OSSL_trace_end() (diff) | |
download | openssl-d26b3766a0a35668ee62b839a62acbdcd9ff2a98.tar.xz openssl-d26b3766a0a35668ee62b839a62acbdcd9ff2a98.zip |
Use USE_SWAPCONTEXT on IA64.
On IA64 the use of setjmp()/ longjmp() does not properly save the
state of the register stack engine (RSE) and requires extra care.
The use of it in the async interface led to a failure in the
test_async.t test since its introduction in 1.1.0 series.
Instead of properly adding the needed assembly bits here use the
swapcontext() function which properly saves the whole context.
Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17370)
-rw-r--r-- | crypto/async/arch/async_posix.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/async/arch/async_posix.h b/crypto/async/arch/async_posix.h index ab7637f69e..eeb7774512 100644 --- a/crypto/async/arch/async_posix.h +++ b/crypto/async/arch/async_posix.h @@ -25,12 +25,14 @@ # define ASYNC_POSIX # define ASYNC_ARCH -# ifdef __CET__ +# if defined(__CET__) || defined(__ia64__) /* * When Intel CET is enabled, makecontext will create a different * shadow stack for each context. async_fibre_swapcontext cannot * use _longjmp. It must call swapcontext to swap shadow stack as * well as normal stack. + * On IA64 the register stack engine is not saved across setjmp/longjmp. Here + * swapcontext() performs correctly. */ # define USE_SWAPCONTEXT # endif |