parisc: Add ARCH_TRACEHOOK and regset support
Subsystems (4)
Helge Deller
maintainerPATCH 1/1 parisc: Add ARCH_TRACEHOOK and regset support
By adding TRACEHOOK support we now get a clean user interface to access registers via PTRACE_GETREGS, PTRACE_SETREGS, PTRACE_GETFPREGS and PTRACE_SETFPREGS.
The user-visible regset struct user_regs_struct and user_fp_struct are modelled similiar to x86 and can be accessed via PTRACE_GETREGSET.
Add support for the parisc architecture to the seccomp_bpf testcase.
Signed-off-by Helge Deller <[email protected]>
arch/parisc/Kconfig +1 -0
@@ -31,6 +31,7 @@ config PARISC select HAVE_DEBUG_STACKOVERFLOW select HAVE_ARCH_AUDITSYSCALL select HAVE_ARCH_SECCOMP_FILTER + select HAVE_ARCH_TRACEHOOK select ARCH_NO_COHERENT_DMA_MMAP help
arch/parisc/include/uapi/asm/ptrace.h +48 -0
65 lines not on this page · raw message
arch/parisc/kernel/ptrace.c +354 -2
400 lines not on this page · raw message
tools/testing/selftests/seccomp/seccomp_bpf.c +7 -1
@@ -1234,6 +1234,10 @@ TEST_F(TRACE_poke, getpid_runs_normally)# define ARCH_REGS struct user_pt_regs# define SYSCALL_NUM regs[8]# define SYSCALL_RET regs[0] +#elif defined(__hppa__) +# define ARCH_REGS struct user_regs_struct +# define SYSCALL_NUM gr[20] +# define SYSCALL_RET gr[28]#elif defined(__powerpc__)# define ARCH_REGS struct pt_regs# define SYSCALL_NUM gpr[0]
@@ -1293,7 +1297,7 @@ void change_syscall(struct __test_metadata *_metadata,EXPECT_EQ (0 , ret);#if defined(__x86_64__) || defined(__i386__) || defined(__powerpc__) || \ - defined(__s390__) + defined(__s390__) || defined(__hppa__) { regs.SYSCALL_NUM = syscall; }
@@ -1479,6 +1483,8 @@ TEST_F(TRACE_syscall, syscall_dropped)# define __NR_seccomp 383# elif defined(__aarch64__)# define __NR_seccomp 277 +# elif defined(__hppa__) +# define __NR_seccomp 338# elif defined(__powerpc__)# define __NR_seccomp 358# elif defined(__s390__)