[PATCH] tst-setcontext10.c: Undef _FORTIFY_SOURCE

Florian Weimer fweimer@redhat.com
Wed Dec 20 07:57:31 GMT 2023


* H. J. Lu:

> void ____longjmp_chk (__jmp_buf env, int val)
> {
>   void *this_frame = __builtin_frame_address (0);
>   void *saved_frame = JB_FRAME_ADDRESS (env);
>   stack_t ss;
>
>   /* If "env" is from a frame that called us, we're all set.  */
>   if (called_from(this_frame, saved_frame))  <<< This is false for user context
>     __longjmp (env, val);

Why isn't this a problem without shadow stack?

But what I meant was: Do the longjmp checks really add value over the
checking that shadow stack longjmp inevitably does?

Thanks,
Florian



More information about the Libc-alpha mailing list