aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/arm64/signal/test_signals_utils.h
diff options
context:
space:
mode:
authorCristian Marussi <cristian.marussi@arm.com>2019-10-25 18:57:12 +0100
committerCatalin Marinas <catalin.marinas@arm.com>2019-11-08 11:10:42 +0000
commit6c2aa4284513585e9cc0c25b125ab4d57ef4ce76 (patch)
tree6b1dfe2fe94b6056691598a53677557f06feb91b /tools/testing/selftests/arm64/signal/test_signals_utils.h
parentkselftest: arm64: add helper get_current_context (diff)
downloadlinux-dev-6c2aa4284513585e9cc0c25b125ab4d57ef4ce76.tar.xz
linux-dev-6c2aa4284513585e9cc0c25b125ab4d57ef4ce76.zip
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>
Diffstat (limited to 'tools/testing/selftests/arm64/signal/test_signals_utils.h')
-rw-r--r--tools/testing/selftests/arm64/signal/test_signals_utils.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/testing/selftests/arm64/signal/test_signals_utils.h b/tools/testing/selftests/arm64/signal/test_signals_utils.h
index fd67b1f23c41..6772b5c8d274 100644
--- a/tools/testing/selftests/arm64/signal/test_signals_utils.h
+++ b/tools/testing/selftests/arm64/signal/test_signals_utils.h
@@ -115,4 +115,6 @@ static __always_inline bool get_current_context(struct tdescr *td,
return td->live_uc_valid;
}
+
+int fake_sigreturn(void *sigframe, size_t sz, int misalign_bytes);
#endif