[openssl] master update

tomas at openssl.org tomas at openssl.org
Tue Jan 4 11:14:56 UTC 2022


The branch master has been updated
       via  d26b3766a0a35668ee62b839a62acbdcd9ff2a98 (commit)
      from  ee8a61e158c42c327c3303101083422b9a7cc504 (commit)


- Log -----------------------------------------------------------------
commit d26b3766a0a35668ee62b839a62acbdcd9ff2a98
Author: Sebastian Andrzej Siewior <sebastian at breakpoint.cc>
Date:   Tue Dec 28 23:05:32 2021 +0100

    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 at breakpoint.cc>
    
    Reviewed-by: Matt Caswell <matt at openssl.org>
    Reviewed-by: Paul Dale <pauli at openssl.org>
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/17370)

-----------------------------------------------------------------------

Summary of changes:
 crypto/async/arch/async_posix.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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


More information about the openssl-commits mailing list