[libunwind] Check corrupted return address in unwind_phase2 when CET is enabled.
If CET shadow stack is enabled, we count the number of stack frames skipped and adjust CET shadow stack based on the number in libunwind unwind_phase2. At the same time, we can enhance security via comparing the return address in normal stack against counterpart in CET shadow stack, if they don't match, it means the return address stored in normal stack has been corrupted and we will return _URC_FATAL_PHASE2_ERROR in that case. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D136667 Signed-off-by:jinge90 <ge.jin@intel.com>
Loading
Please sign in to comment