1. 16 11月, 2019 2 次提交
  2. 13 11月, 2019 2 次提交
  3. 12 11月, 2019 1 次提交
  4. 08 11月, 2019 21 次提交
  5. 07 11月, 2019 2 次提交
  6. 05 11月, 2019 3 次提交
  7. 02 11月, 2019 2 次提交
  8. 01 11月, 2019 1 次提交
  9. 31 10月, 2019 1 次提交
    • I
      bpf: Allow narrow loads of bpf_sysctl fields with offset > 0 · 7541c87c
      Ilya Leoshkevich 提交于
      "ctx:file_pos sysctl:read read ok narrow" works on s390 by accident: it
      reads the wrong byte, which happens to have the expected value of 0.
      Improve the test by seeking to the 4th byte and expecting 4 instead of
      0.
      
      This makes the latent problem apparent: the test attempts to read the
      first byte of bpf_sysctl.file_pos, assuming this is the least-significant
      byte, which is not the case on big-endian machines: a non-zero offset is
      needed.
      
      The point of the test is to verify narrow loads, so we cannot cheat our
      way out by simply using BPF_W. The existence of the test means that such
      loads have to be supported, most likely because llvm can generate them.
      Fix the test by adding a big-endian variant, which uses an offset to
      access the least-significant byte of bpf_sysctl.file_pos.
      
      This reveals the final problem: verifier rejects accesses to bpf_sysctl
      fields with offset > 0. Such accesses are already allowed for a wide
      range of structs: __sk_buff, bpf_sock_addr and sk_msg_md to name a few.
      Extend this support to bpf_sysctl by using bpf_ctx_range instead of
      offsetof when matching field offsets.
      
      Fixes: 7b146ceb ("bpf: Sysctl hook")
      Fixes: e1550bfe ("bpf: Add file_pos field to bpf_sysctl ctx")
      Fixes: 9a1027e5 ("selftests/bpf: Test file_pos field in bpf_sysctl ctx")
      Signed-off-by: NIlya Leoshkevich <iii@linux.ibm.com>
      Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
      Acked-by: NAndrey Ignatov <rdna@fb.com>
      Acked-by: NAndrii Nakryiko <andriin@fb.com>
      Link: https://lore.kernel.org/bpf/20191028122902.9763-1-iii@linux.ibm.com
      7541c87c
  10. 29 10月, 2019 1 次提交
  11. 27 10月, 2019 1 次提交
  12. 26 10月, 2019 1 次提交
  13. 23 10月, 2019 1 次提交
  14. 22 10月, 2019 1 次提交
    • S
      tools: gpio: Use !building_out_of_srctree to determine srctree · 4a6a6f5c
      Shuah Khan 提交于
      make TARGETS=gpio kselftest fails with:
      
      Makefile:23: tools/build/Makefile.include: No such file or directory
      
      When the gpio tool make is invoked from tools Makefile, srctree is
      cleared and the current logic check for srctree equals to empty
      string to determine srctree location from CURDIR.
      
      When the build in invoked from selftests/gpio Makefile, the srctree
      is set to "." and the same logic used for srctree equals to empty is
      needed to determine srctree.
      
      Check building_out_of_srctree undefined as the condition for both
      cases to fix "make TARGETS=gpio kselftest" build failure.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NShuah Khan <skhan@linuxfoundation.org>
      Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
      4a6a6f5c
反馈
建议
客服 返回
顶部