Skip to content

selftests/seccomp: Refactor change_syscall()

Kees Cook linux-arm-kernel linux-kselftest linux-mips linuxppc-dev lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 4 repliesIn review
  2. v115 patches 23 repliesSuperseded

Changes in v2 from the cover letter

- Took Acked patches into -next
- refactored powerpc syscall setting implementation
- refactored clone3 args implementation

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4selftests/seccomp: Record syscall during ptrace entrytools/testing/selftests/seccomp/seccomp_bpf.c+27 -131 reply
2/4selftests/seccomp: Allow syscall nr and ret value to be set separatelytools/testing/selftests/seccomp/seccomp_bpf.c+47 -121 reply
3/4selftests/seccomp: powerpc: Set syscall return during ptrace syscall exittools/testing/selftests/seccomp/seccomp_bpf.c+21 -41 reply
4/4selftests/clone3: Avoid OS-defined clone_argstools/testing/selftests/clone3/clone3.c tools/testing/selftests/clone3/clone3_cap_checkpoint_restore.c tools/testing/selftests/clone3/clone3_clear_sighand.c +3 more+40 -431 reply

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchChristian Brauner
1/4A-b
2/4A-b
3/4A-b
4/4A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/4] selftests/seccomp: Refactor change_syscall()

v1: https://lore.kernel.org/lkml/[email protected]
v2:
- Took Acked patches into -next
- refactored powerpc syscall setting implementation
- refactored clone3 args implementation

Hi,

This finishes the refactoring of the seccomp selftest logic used in for ptrace syscall number/return handling for powerpc. Additionally fixes clone3 (which seccomp depends on for testing) to run under MIPS where an old struct clone_args has become visible.

(FWIW, I expect to take these via the seccomp tree.)

Thanks,

Kees Cook (4):
selftests/seccomp: Record syscall during ptrace entry selftests/seccomp: Allow syscall nr and ret value to be set separately selftests/seccomp: powerpc: Set syscall return during ptrace syscall
exit
selftests/clone3: Avoid OS-defined clone_args

 tools/testing/selftests/clone3/clone3.c       |  45 +++----
 .../clone3/clone3_cap_checkpoint_restore.c    |   4 +-
 .../selftests/clone3/clone3_clear_sighand.c   |   2 +-
 .../selftests/clone3/clone3_selftests.h       |  24 ++--
 .../testing/selftests/clone3/clone3_set_tid.c |   4 +-
 tools/testing/selftests/seccomp/seccomp_bpf.c | 120 ++++++++++++++----
 6 files changed, 131 insertions(+), 68 deletions(-)
Signature · 1 line
2.25.1