• Mickaël Salaün's avatar
    selftests/seccomp: Remove the need for HAVE_ARCH_TRACEHOOK · 4a0b8807
    Mickaël Salaün authored
    Some architectures do not implement PTRACE_GETREGSET nor
    PTRACE_SETREGSET (required by HAVE_ARCH_TRACEHOOK) but only implement
    PTRACE_GETREGS and PTRACE_SETREGS (e.g. User-mode Linux).
    
    This improve seccomp selftest portability for architectures without
    HAVE_ARCH_TRACEHOOK support by defining a new trigger HAVE_GETREGS. For
    now, this is only enabled for i386 and x86_64 architectures. This is
    required to be able to run this tests on User-mode Linux.
    Signed-off-by: default avatarMickaël Salaün <mic@digikod.net>
    Cc: Jeff Dike <jdike@addtoit.com>
    Cc: Richard Weinberger <richard@nod.at>
    Cc: Kees Cook <keescook@chromium.org>
    Cc: Andy Lutomirski <luto@amacapital.net>
    Cc: Will Drewry <wad@chromium.org>
    Cc: Shuah Khan <shuahkh@osg.samsung.com>
    Cc: Meredydd Luff <meredydd@senatehouse.org>
    Cc: David Drysdale <drysdale@google.com>
    Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
    Acked-by: default avatarKees Cook <keescook@chromium.org>
    4a0b8807
seccomp_bpf.c 56.4 KB