Re: [PATCH v2 8/9] gdb: Implement the hook 'is_no_return_shadow_stack_address' for amd64 linux.

Tom Tromey
2026-02-19T17:43:37Z

>>>>> Christina Schimpe <christina.schimpe@intel.com> writes:

> There can be elements on the shadow stack which are not return addresses.
> This can happen, for instance, in case of signals on amd64 linux.
> The old shadow stack pointer is pushed in a special format with bit 63 set.

> |1...old SSP| - Pointer to old pre-signal ssp in sigframe token format
> (bit 63 set to 1)

> Linux kernel documentation: https://docs.kernel.org/arch/x86/shstk.html

> Implement the gdbarch hook is_no_return_shadow_stack_address to detect
> this scenario to print the shadow stack backtrace correctly.

I read this and didn't see any problems.
However you will have to self-approve in the end since I don't really
know anything about the arch details.

Reviewed-By: Tom Tromey <tom@tromey.com>

Tom