1. 06 1月, 2017 1 次提交
    • B
      selftests: remove duplicated all and clean target · 88baa78d
      bamvor.zhangjian@huawei.com 提交于
      Currently, kselftest use TEST_PROGS, TEST_PROGS_EXTENDED, TEST_FILES to
      indicate the test program, extended test program and test files. It is
      easy to understand the purpose of these files. But mix of compiled and
      uncompiled files lead to duplicated "all" and "clean" targets.
      
      In order to remove the duplicated targets, introduce TEST_GEN_PROGS,
      TEST_GEN_PROGS_EXTENDED, TEST_GEN_FILES to indicate the compiled
      objects.
      
      Also, the later patch will make use of TEST_GEN_XXX to redirect these
      files to output directory indicated by KBUILD_OUTPUT or O.
      
      And add this changes to "Contributing new tests(details)" of
      Documentation/kselftest.txt.
      Signed-off-by: NBamvor Jian Zhang <bamvor.zhangjian@linaro.org>
      Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
      88baa78d
  2. 15 6月, 2016 1 次提交
    • K
      seccomp: add tests for ptrace hole · 58d0a862
      Kees Cook 提交于
      One problem with seccomp was that ptrace could be used to change a
      syscall after seccomp filtering had completed. This was a well documented
      limitation, and it was recommended to block ptrace when defining a filter
      to avoid this problem. This can be quite a limitation for containers or
      other places where ptrace is desired even under seccomp filters.
      
      This adds tests for both SECCOMP_RET_TRACE and PTRACE_SYSCALL manipulations.
      Signed-off-by: NKees Cook <keescook@chromium.org>
      Cc: Andy Lutomirski <luto@kernel.org>
      58d0a862
  3. 23 5月, 2016 1 次提交
    • H
      parisc: Add ARCH_TRACEHOOK and regset support · 64e2a42b
      Helge Deller 提交于
      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.
      Signed-off-by: NHelge Deller <deller@gmx.de>
      64e2a42b
  4. 13 5月, 2016 1 次提交
    • M
      selftests/seccomp: add MIPS self-test support · 0ce105bf
      Matt Redfearn 提交于
      This adds self-test support on MIPS, based on RFC patch from Kees Cook.
      Modifications from the RFC:
      - support the O32 syscall which passes the real syscall number in a0.
      - Use PTRACE_{GET,SET}REGS
      - Because SYSCALL_NUM and SYSCALL_RET are the same register, it is not
        possible to test modifying the syscall return value when skipping,
        since both would need to set the same register. Therefore modify that
        test case to just detect the skipped test.
      Tested on MIPS32r2 / MIPS64r2 with O32, N32 and N64 userlands.
      Signed-off-by: NMatt Redfearn <matt.redfearn@imgtec.com>
      Acked-by: NKees Cook <keescook@chromium.org>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Shuah Khan <shuahkh@osg.samsung.com>
      Cc: Will Drewry <wad@chromium.org>
      Cc: IMG-MIPSLinuxKerneldevelopers@imgtec.com
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-kselftest@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/12977/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      0ce105bf
  5. 30 3月, 2016 2 次提交
  6. 26 2月, 2016 1 次提交
  7. 11 1月, 2016 1 次提交
    • M
      selftests/seccomp: Remove the need for HAVE_ARCH_TRACEHOOK · 4a0b8807
      Mickaël Salaün 提交于
      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: NMickaë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: NRichard Weinberger <richard@nod.at>
      Acked-by: NKees Cook <keescook@chromium.org>
      4a0b8807
  8. 08 1月, 2016 1 次提交
  9. 19 11月, 2015 1 次提交
  10. 03 11月, 2015 1 次提交
  11. 16 10月, 2015 1 次提交
    • K
      selftests/seccomp: build and pass on arm64 · 256d0afb
      Kees Cook 提交于
      Changing arm64 syscalls is done via a specific register set, more like s390
      than like arm (specific ptrace call) and x86 (part of general registers).
      Since (restarting) poll doesn't exist on arm64, switch to using nanosleep
      for testing restart_syscall. And since it looks like the syscall ABI is
      inconsistent on arm-compat, so we must work around it (and document it) in
      the test.
      Signed-off-by: NKees Cook <keescook@chromium.org>
      Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
      256d0afb
  12. 15 9月, 2015 1 次提交
  13. 30 7月, 2015 2 次提交
  14. 18 6月, 2015 1 次提交