Use swapcontext for Intel CET
authorH.J. Lu <hongjiu.lu@intel.com>
Sat, 14 Dec 2019 00:46:07 +0000 (16:46 -0800)
committerMatt Caswell <matt@openssl.org>
Fri, 7 Feb 2020 23:25:37 +0000 (23:25 +0000)
commit34675b2ba942f81a74bd8bc46b937604dca0a645
tree5273284c30fdef96e48d5b9eab1a0277b6357f7e
parent0e43960e88128bb86031a45c0fe9ca3e3a310c3b
Use swapcontext for Intel CET

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.

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/10983)
crypto/async/arch/async_posix.c
crypto/async/arch/async_posix.h