[Devel] [PATCH vz10] selftests: syscall_user_dispatch: keep the frame pointer in sud_benchmark

Konstantin Khorenko khorenko at virtuozzo.com
Wed Sep 23 21:59:29 MSK 2026


On Wed, 09 Sep 2026 00:32:59 +0300, Eva Kurchatova <eva.kurchatova at virtuozzo.com> wrote:
> The SIGSYS handler returns by hand: it loads __NR_rt_sigreturn, runs
> leaveq to drop its frame, adjusts the stack and issues the syscall. leaveq
> restores the stack from the frame pointer, so the sequence only works in a
> function that has one.
> 
> gcc omits the frame pointer from -O1 up, so the handler restores a stack
> that is not the signal frame and rt_sigreturn resumes at a bogus address:
> 
> [...]

Reviewed-by: Konstantin Khorenko <khorenko at virtuozzo.com>

-- 
Konstantin Khorenko <khorenko at virtuozzo.com>


More information about the Devel mailing list