diff options
author | Linus Torvalds | 2019-05-25 00:21:05 +0200 |
---|---|---|
committer | Linus Torvalds | 2019-05-25 00:21:05 +0200 |
commit | 7f8b40e3dbcd7dbeabe6be8f157376ef0b890e06 (patch) | |
tree | c86f25d4a081b07727d21d229b4e8fdcfb798d22 /tools/testing/selftests/x86 | |
parent | Merge tag 'devicetree-fixes-for-5.2' of git://git.kernel.org/pub/scm/linux/ke... (diff) | |
parent | selftests/timers: Add missing fflush(stdout) calls (diff) | |
download | kernel-qcow2-linux-7f8b40e3dbcd7dbeabe6be8f157376ef0b890e06.tar.gz kernel-qcow2-linux-7f8b40e3dbcd7dbeabe6be8f157376ef0b890e06.tar.xz kernel-qcow2-linux-7f8b40e3dbcd7dbeabe6be8f157376ef0b890e06.zip |
Merge tag 'linux-kselftest-5.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
Pull Kselftest fixes from Shuah Khan:
- Two fixes to regressions introduced in kselftest Makefile test run
output refactoring work (Kees Cook)
- Adding Atom support to syscall_arg_fault test (Tong Bo)
* tag 'linux-kselftest-5.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
selftests/timers: Add missing fflush(stdout) calls
selftests: Remove forced unbuffering for test running
selftests/x86: Support Atom for syscall_arg_fault test
Diffstat (limited to 'tools/testing/selftests/x86')
-rw-r--r-- | tools/testing/selftests/x86/syscall_arg_fault.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/testing/selftests/x86/syscall_arg_fault.c b/tools/testing/selftests/x86/syscall_arg_fault.c index 7db4fc9fa09f..d2548401921f 100644 --- a/tools/testing/selftests/x86/syscall_arg_fault.c +++ b/tools/testing/selftests/x86/syscall_arg_fault.c @@ -43,7 +43,7 @@ static sigjmp_buf jmpbuf; static volatile sig_atomic_t n_errs; -static void sigsegv(int sig, siginfo_t *info, void *ctx_void) +static void sigsegv_or_sigbus(int sig, siginfo_t *info, void *ctx_void) { ucontext_t *ctx = (ucontext_t*)ctx_void; @@ -73,7 +73,13 @@ int main() if (sigaltstack(&stack, NULL) != 0) err(1, "sigaltstack"); - sethandler(SIGSEGV, sigsegv, SA_ONSTACK); + sethandler(SIGSEGV, sigsegv_or_sigbus, SA_ONSTACK); + /* + * The actual exception can vary. On Atom CPUs, we get #SS + * instead of #PF when the vDSO fails to access the stack when + * ESP is too close to 2^32, and #SS causes SIGBUS. + */ + sethandler(SIGBUS, sigsegv_or_sigbus, SA_ONSTACK); sethandler(SIGILL, sigill, SA_ONSTACK); /* |