kselftest: arm64: fake_sigreturn_bad_magic
authorCristian Marussi <cristian.marussi@arm.com>
Fri, 25 Oct 2019 17:57:12 +0000 (18:57 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 8 Nov 2019 11:10:42 +0000 (11:10 +0000)
commit6c2aa4284513585e9cc0c25b125ab4d57ef4ce76
tree6b1dfe2fe94b6056691598a53677557f06feb91b
parent34306b05d3106447c87d29d262e824ca4a30c569
kselftest: arm64: fake_sigreturn_bad_magic

Add a simple fake_sigreturn testcase which builds a ucontext_t with a bad
magic header and place it onto the stack. Expects a SIGSEGV on test PASS.

Introduce a common utility assembly trampoline function to invoke a
sigreturn while placing the provided sigframe at wanted alignment and
also an helper to make space when needed inside the sigframe reserved
area.

Reviewed-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
tools/testing/selftests/arm64/signal/Makefile
tools/testing/selftests/arm64/signal/signals.S [new file with mode: 0644]
tools/testing/selftests/arm64/signal/test_signals_utils.h
tools/testing/selftests/arm64/signal/testcases/fake_sigreturn_bad_magic.c [new file with mode: 0644]
tools/testing/selftests/arm64/signal/testcases/testcases.c
tools/testing/selftests/arm64/signal/testcases/testcases.h