1. 14 5月, 2018 1 次提交
  2. 27 4月, 2018 1 次提交
    • A
      x86/entry/64/compat: Preserve r8-r11 in int $0x80 · 8bb2610b
      Andy Lutomirski 提交于
      32-bit user code that uses int $80 doesn't care about r8-r11.  There is,
      however, some 64-bit user code that intentionally uses int $0x80 to invoke
      32-bit system calls.  From what I've seen, basically all such code assumes
      that r8-r15 are all preserved, but the kernel clobbers r8-r11.  Since I
      doubt that there's any code that depends on int $0x80 zeroing r8-r11,
      change the kernel to preserve them.
      
      I suspect that very little user code is broken by the old clobber, since
      r8-r11 are only rarely allocated by gcc, and they're clobbered by function
      calls, so they only way we'd see a problem is if the same function that
      invokes int $0x80 also spills something important to one of these
      registers.
      
      The current behavior seems to date back to the historical commit
      "[PATCH] x86-64 merge for 2.6.4".  Before that, all regs were
      preserved.  I can't find any explanation of why this change was made.
      
      Update the test_syscall_vdso_32 testcase as well to verify the new
      behavior, and it strengthens the test to make sure that the kernel doesn't
      accidentally permute r8..r15.
      Suggested-by: NDenys Vlasenko <dvlasenk@redhat.com>
      Signed-off-by: NAndy Lutomirski <luto@kernel.org>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Dominik Brodowski <linux@dominikbrodowski.net>
      Link: https://lkml.kernel.org/r/d4c4d9985fbe64f8c9e19291886453914b48caee.1523975710.git.luto@kernel.org
      8bb2610b
  3. 25 4月, 2018 3 次提交
  4. 23 4月, 2018 2 次提交
  5. 19 4月, 2018 1 次提交
    • Y
      tools/bpf: fix test_sock and test_sock_addr.sh failure · 0a0a7e00
      Yonghong Song 提交于
      The bpf selftests test_sock and test_sock_addr.sh failed
      in my test machine. The failure looks like:
          $ ./test_sock
          Test case: bind4 load with invalid access: src_ip6 .. [PASS]
          Test case: bind4 load with invalid access: mark .. [PASS]
          Test case: bind6 load with invalid access: src_ip4 .. [PASS]
          Test case: sock_create load with invalid access: src_port .. [PASS]
          Test case: sock_create load w/o expected_attach_type (compat mode) .. [FAIL]
          Test case: sock_create load w/ expected_attach_type .. [FAIL]
          Test case: attach type mismatch bind4 vs bind6 .. [FAIL]
          ...
          Summary: 4 PASSED, 12 FAILED
          $ ./test_sock_addr.sh
          Wait for testing IPv4/IPv6 to become available .....
          ERROR: Timeout waiting for test IP to become available.
      
      In test_sock, bpf program loads failed due to hitting memlock limits.
      In test_sock_addr.sh, my test machine is a ipv6 only test box and using
      "ping" without specifying address family for an ipv6 address does not work.
      
      This patch fixed the issue by including header bpf_rlimit.h in test_sock.c
      and test_sock_addr.c, and specifying address family for ping command.
      
      Cc: Andrey Ignatov <rdna@fb.com>
      Signed-off-by: NYonghong Song <yhs@fb.com>
      Acked-by: NAndrey Ignatov <rdna@fb.com>
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      0a0a7e00
  6. 18 4月, 2018 1 次提交
    • M
      selftests/filesystems: Don't run dnotify_test by default · 8bf24e83
      Michael Ellerman 提交于
      In commit ce290a19 ("selftests: add devpts selftests"), the
      filesystems directory was added to the top-level selftests Makefile.
      
      That had the effect of causing the existing dnotify_test in the
      filesystems directory to now be run as part of the default selftests
      test-run. Unfortunately dnotify_test is actually an infinite loop.
      
      Fix it by moving dnotify_test to TEST_GEN_PROGS_EXTENDED, which says
      that it's a generated file (ie. built) but should not be run as part
      of the default test suite run (it's an "extended" test).
      
      While we're here cleanup a few other things, devpts_pts should be in
      TEST_GEN_PROGS to indicate that it's built, and with the above two
      changes we no longer need a custom all or clean rule.
      
      Fixes: ce290a19 ("selftests: add devpts selftests")
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      Acked-by: NChristian brauner <christian.brauner@ubuntu.com>
      Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
      8bf24e83
  7. 16 4月, 2018 5 次提交
  8. 13 4月, 2018 3 次提交
  9. 12 4月, 2018 7 次提交
  10. 11 4月, 2018 2 次提交
  11. 10 4月, 2018 1 次提交
  12. 08 4月, 2018 5 次提交
  13. 07 4月, 2018 8 次提交