Re: [PATCH v2] selftests/seccomp: fix ptrace tests on powerpc

2020-09-13 Thread Michael Ellerman
Kees Cook writes: > On Fri, Sep 11, 2020 at 03:10:12PM -0300, Thadeu Lima de Souza Cascardo wrote: ... >> diff --git a/tools/testing/selftests/seccomp/seccomp_bpf.c >> b/tools/testing/selftests/seccomp/seccomp_bpf.c >> index 7a6d40286a42..0ddc0846e9c0 100644 >> --- a/tools/testing/selftests/secco

Re: [PATCH v2] selftests/seccomp: fix ptrace tests on powerpc

2020-09-11 Thread Kees Cook
On Fri, Sep 11, 2020 at 03:10:12PM -0300, Thadeu Lima de Souza Cascardo wrote: > As pointed out by Michael Ellerman, the ptrace ABI on powerpc does not > allow or require the return code to be set on syscall entry when > skipping the syscall. It will always return ENOSYS and the return code > must

Re: [PATCH v2] selftests/seccomp: fix ptrace tests on powerpc

2020-09-11 Thread Shuah Khan
On 9/11/20 12:10 PM, Thadeu Lima de Souza Cascardo wrote: As pointed out by Michael Ellerman, the ptrace ABI on powerpc does not allow or require the return code to be set on syscall entry when skipping the syscall. It will always return ENOSYS and the return code must be set on syscall exit. Th

[PATCH v2] selftests/seccomp: fix ptrace tests on powerpc

2020-09-11 Thread Thadeu Lima de Souza Cascardo
As pointed out by Michael Ellerman, the ptrace ABI on powerpc does not allow or require the return code to be set on syscall entry when skipping the syscall. It will always return ENOSYS and the return code must be set on syscall exit. This code does that, behaving more similarly to strace. It sti