1. 10 5月, 2020 1 次提交
  2. 18 3月, 2020 1 次提交
  3. 14 3月, 2020 1 次提交
  4. 03 3月, 2020 2 次提交
  5. 09 10月, 2019 5 次提交
  6. 07 10月, 2019 1 次提交
  7. 06 10月, 2019 1 次提交
  8. 16 9月, 2019 1 次提交
    • I
      selftests/bpf: add bpf-gcc support · 4ce150b6
      Ilya Leoshkevich 提交于
      Now that binutils and gcc support for BPF is upstream, make use of it in
      BPF selftests using alu32-like approach. Share as much as possible of
      CFLAGS calculation with clang.
      
      Fixes only obvious issues, leaving more complex ones for later:
      - Use gcc-provided bpf-helpers.h instead of manually defining the
        helpers, change bpf_helpers.h include guard to avoid conflict.
      - Include <linux/stddef.h> for __always_inline.
      - Add $(OUTPUT)/../usr/include to include path in order to use local
        kernel headers instead of system kernel headers when building with O=.
      
      In order to activate the bpf-gcc support, one needs to configure
      binutils and gcc with --target=bpf and make them available in $PATH. In
      particular, gcc must be installed as `bpf-gcc`, which is the default.
      
      Right now with binutils 25a2915e8dba and gcc r275589 only a handful of
      tests work:
      
      	# ./test_progs_bpf_gcc
      	# Summary: 7/39 PASSED, 1 SKIPPED, 98 FAILED
      
      The reason for those failures are as follows:
      
      - Build errors:
        - `error: too many function arguments for eBPF` for __always_inline
          functions read_str_var and read_map_var - must be inlining issue,
          and for process_l3_headers_v6, which relies on optimizing away
          function arguments.
        - `error: indirect call in function, which are not supported by eBPF`
          where there are no obvious indirect calls in the source calls, e.g.
          in __encap_ipip_none.
        - `error: field 'lock' has incomplete type` for fields of `struct
          bpf_spin_lock` type - bpf_spin_lock is re#defined by bpf-helpers.h,
          so its usage is sensitive to order of #includes.
        - `error: eBPF stack limit exceeded` in sysctl_tcp_mem.
      - Load errors:
        - Missing object files due to above build errors.
        - `libbpf: failed to create map (name: 'test_ver.bss')`.
        - `libbpf: object file doesn't contain bpf program`.
        - `libbpf: Program '.text' contains unrecognized relo data pointing to
          section 0`.
        - `libbpf: BTF is required, but is missing or corrupted` - no BTF
          support in gcc yet.
      Signed-off-by: NIlya Leoshkevich <iii@linux.ibm.com>
      Cc: Jose E. Marchesi <jose.marchesi@oracle.com>
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      4ce150b6
  9. 18 8月, 2019 1 次提交
  10. 08 8月, 2019 1 次提交
  11. 31 7月, 2019 1 次提交
  12. 12 7月, 2019 3 次提交
  13. 06 7月, 2019 1 次提交
  14. 11 6月, 2019 1 次提交
  15. 25 5月, 2019 2 次提交
  16. 17 5月, 2019 1 次提交
  17. 28 4月, 2019 1 次提交
  18. 13 4月, 2019 1 次提交
  19. 10 4月, 2019 1 次提交
    • J
      bpf, selftest: test global data/bss/rodata sections · b915ebe6
      Joe Stringer 提交于
      Add tests for libbpf relocation of static variable references
      into the .data, .rodata and .bss sections of the ELF, also add
      read-only test for .rodata. All passing:
      
        # ./test_progs
        [...]
        test_global_data:PASS:load program 0 nsec
        test_global_data:PASS:pass global data run 925 nsec
        test_global_data_number:PASS:relocate .bss reference 925 nsec
        test_global_data_number:PASS:relocate .data reference 925 nsec
        test_global_data_number:PASS:relocate .rodata reference 925 nsec
        test_global_data_number:PASS:relocate .bss reference 925 nsec
        test_global_data_number:PASS:relocate .data reference 925 nsec
        test_global_data_number:PASS:relocate .rodata reference 925 nsec
        test_global_data_number:PASS:relocate .bss reference 925 nsec
        test_global_data_number:PASS:relocate .bss reference 925 nsec
        test_global_data_number:PASS:relocate .rodata reference 925 nsec
        test_global_data_number:PASS:relocate .rodata reference 925 nsec
        test_global_data_number:PASS:relocate .rodata reference 925 nsec
        test_global_data_string:PASS:relocate .rodata reference 925 nsec
        test_global_data_string:PASS:relocate .data reference 925 nsec
        test_global_data_string:PASS:relocate .bss reference 925 nsec
        test_global_data_string:PASS:relocate .data reference 925 nsec
        test_global_data_string:PASS:relocate .bss reference 925 nsec
        test_global_data_struct:PASS:relocate .rodata reference 925 nsec
        test_global_data_struct:PASS:relocate .bss reference 925 nsec
        test_global_data_struct:PASS:relocate .rodata reference 925 nsec
        test_global_data_struct:PASS:relocate .data reference 925 nsec
        test_global_data_rdonly:PASS:test .rodata read-only map 925 nsec
        [...]
        Summary: 229 PASSED, 0 FAILED
      
      Note map helper signatures have been changed to avoid warnings
      when passing in const data.
      
      Joint work with Daniel Borkmann.
      Signed-off-by: NJoe Stringer <joe@wand.net.nz>
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: NAndrii Nakryiko <andriin@fb.com>
      Acked-by: NMartin KaFai Lau <kafai@fb.com>
      Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
      b915ebe6
  20. 22 3月, 2019 1 次提交
  21. 21 3月, 2019 1 次提交
  22. 14 3月, 2019 1 次提交
  23. 03 3月, 2019 1 次提交
  24. 01 3月, 2019 1 次提交
  25. 11 2月, 2019 1 次提交
  26. 02 2月, 2019 1 次提交
  27. 10 12月, 2018 1 次提交
  28. 01 12月, 2018 1 次提交
    • J
      bpf: Support sk lookup in netns with id 0 · f71c6143
      Joe Stringer 提交于
      David Ahern and Nicolas Dichtel report that the handling of the netns id
      0 is incorrect for the BPF socket lookup helpers: rather than finding
      the netns with id 0, it is resolving to the current netns. This renders
      the netns_id 0 inaccessible.
      
      To fix this, adjust the API for the netns to treat all negative s32
      values as a lookup in the current netns (including u64 values which when
      truncated to s32 become negative), while any values with a positive
      value in the signed 32-bit integer space would result in a lookup for a
      socket in the netns corresponding to that id. As before, if the netns
      with that ID does not exist, no socket will be found. Any netns outside
      of these ranges will fail to find a corresponding socket, as those
      values are reserved for future usage.
      Signed-off-by: NJoe Stringer <joe@wand.net.nz>
      Acked-by: NNicolas Dichtel <nicolas.dichtel@6wind.com>
      Acked-by: NJoey Pabalinas <joeypabalinas@gmail.com>
      Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
      f71c6143
  29. 29 11月, 2018 1 次提交
  30. 21 10月, 2018 1 次提交
  31. 20 10月, 2018 1 次提交
  32. 10 10月, 2018 1 次提交