selftests/x86: Add a test for ptrace syscall restart and arg modification
authorAndy Lutomirski <luto@kernel.org>
Tue, 6 Oct 2015 00:47:52 +0000 (17:47 -0700)
committerIngo Molnar <mingo@kernel.org>
Wed, 7 Oct 2015 09:34:07 +0000 (11:34 +0200)
commit04235c00b6bb72b589e99efcc18883378ee76f1b
tree814f6686f3983a319235928bc269209e121e6f6c
parent3b56aae34bc695638b8673fc8459be1837c18730
selftests/x86: Add a test for ptrace syscall restart and arg modification

This tests assumptions about how fast syscall works wrt pt_regs
and, in particular, what happens if IP is decremented by 2
during a syscall.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Shuah Khan <shuahkh@osg.samsung.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Link: http://lkml.kernel.org/r/1c44dbfe59000ba135bbf35ccc5d2433a0b31618.1444091584.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
tools/testing/selftests/x86/Makefile
tools/testing/selftests/x86/ptrace_syscall.c [new file with mode: 0644]
tools/testing/selftests/x86/raw_syscall_helper_32.S [new file with mode: 0644]