0003-btf-emit-xdp-buff.patch 492 B

1234567891011121314
  1. --- a/net/core/filter.c
  2. +++ b/net/core/filter.c
  3. @@ -4630,6 +4630,11 @@
  4. {
  5. u64 xdp_size = (flags & BPF_F_CTXLEN_MASK) >> 32;
  6. + /* xdp_buff is referenced via BTF_ID_LIST_SINGLE(bpf_xdp_output_btf_ids)
  7. + * below but is not otherwise emitted into vmlinux BTF, so resolve_btfids
  8. + * aborts with "unresolved symbol xdp_buff". Force BTF emission. */
  9. + BTF_TYPE_EMIT(struct xdp_buff);
  10. +
  11. if (unlikely(flags & ~(BPF_F_CTXLEN_MASK | BPF_F_INDEX_MASK)))
  12. return -EINVAL;
  13. if (unlikely(!xdp ||