Skip to content

Two small fixes for global subprog tagging

Andrii Nakryiko bpf 1 version Applied

Status from this message: This series was applied to bpf/bpf-next.git (master)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 1 replyApplied 3/3

Patches in v1 All 3 applied

#Subject and filesSizeRepliesApplied
1/3bpf: handle trusted PTR_TO_BTF_ID_OR_NULL in argument check logickernel/bpf/verifier.c+1 -00 repliesApplied
2/3selftests/bpf: add more cases for __arg_trusted __arg_nullable argstools/testing/selftests/bpf/progs/verifier_global_ptr_args.c+29 -30 repliesApplied
3/3bpf: don't emit warnings intended for global subprogs for static subprogskernel/bpf/btf.c+6 -00 repliesApplied

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchEduard Zingerman
SeriesA-b
1/3
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH bpf-next 0/3] Two small fixes for global subprog tagging

Fix a bug with passing trusted PTR_TO_BTF_ID_OR_NULL register into global subprog that expects __arg_trusted __arg_nullable arguments, which was discovered when adopting production BPF application.

Also fix annoying warnings that are irrelevant for static subprogs, which are just an artifact of using btf_prepare_func_args() for both static and global subprogs.

Andrii Nakryiko (3):
bpf: handle trusted PTR_TO_BTF_ID_OR_NULL in argument check logic selftests/bpf: add more cases for __arg_trusted __arg_nullable args
bpf: don't emit warnings intended for global subprogs for static
subprogs

 kernel/bpf/btf.c                              |  6 ++++
 kernel/bpf/verifier.c                         |  1 +
 .../bpf/progs/verifier_global_ptr_args.c      | 32 +++++++++++++++++--
 3 files changed, 36 insertions(+), 3 deletions(-)
Signature · 1 line
2.34.1