1. 17 9月, 2022 4 次提交
  2. 15 9月, 2022 1 次提交
    • D
      bpf: Add verifier check for BPF_PTR_POISON retval and arg · 47e34cb7
      Dave Marchevsky 提交于
      BPF_PTR_POISON was added in commit c0a5a21c ("bpf: Allow storing
      referenced kptr in map") to denote a bpf_func_proto btf_id which the
      verifier will replace with a dynamically-determined btf_id at verification
      time.
      
      This patch adds verifier 'poison' functionality to BPF_PTR_POISON in
      order to prepare for expanded use of the value to poison ret- and
      arg-btf_id in ongoing work, namely rbtree and linked list patchsets
      [0, 1]. Specifically, when the verifier checks helper calls, it assumes
      that BPF_PTR_POISON'ed ret type will be replaced with a valid type before
      - or in lieu of - the default ret_btf_id logic. Similarly for arg btf_id.
      
      If poisoned btf_id reaches default handling block for either, consider
      this a verifier internal error and fail verification. Otherwise a helper
      w/ poisoned btf_id but no verifier logic replacing the type will cause a
      crash as the invalid pointer is dereferenced.
      
      Also move BPF_PTR_POISON to existing include/linux/posion.h header and
      remove unnecessary shift.
      
        [0]: lore.kernel.org/bpf/20220830172759.4069786-1-davemarchevsky@fb.com
        [1]: lore.kernel.org/bpf/20220904204145.3089-1-memxor@gmail.com
      Signed-off-by: NDave Marchevsky <davemarchevsky@fb.com>
      Acked-by: NKumar Kartikeya Dwivedi <memxor@gmail.com>
      Link: https://lore.kernel.org/r/20220912154544.1398199-1-davemarchevsky@fb.comSigned-off-by: NAlexei Starovoitov <ast@kernel.org>
      47e34cb7
  3. 11 9月, 2022 11 次提交
  4. 10 9月, 2022 4 次提交
  5. 09 9月, 2022 1 次提交
    • D
      libbpf: Remove gcc support for bpf_tail_call_static for now · 665f5d35
      Daniel Borkmann 提交于
      This reverts commit 14e5ce79 ("libbpf: Add GCC support for
      bpf_tail_call_static"). Reason is that gcc invented their own BPF asm
      which is not conform with LLVM one, and going forward this would be
      more painful to maintain here and in other areas of the library. Thus
      remove it; ask to gcc folks is to align with LLVM one to use exact
      same syntax.
      
      Fixes: 14e5ce79 ("libbpf: Add GCC support for bpf_tail_call_static")
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      Cc: James Hilliard <james.hilliard1@gmail.com>
      Cc: Jose E. Marchesi <jose.marchesi@oracle.com>
      665f5d35
  6. 08 9月, 2022 13 次提交
  7. 07 9月, 2022 6 次提交