BPF List
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/3] Two small fixes for global subprog tagging
@ 2024-02-02 19:05 Andrii Nakryiko
  2024-02-02 19:05 ` [PATCH bpf-next 1/3] bpf: handle trusted PTR_TO_BTF_ID_OR_NULL in argument check logic Andrii Nakryiko
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Andrii Nakryiko @ 2024-02-02 19:05 UTC (permalink / raw)
  To: bpf, ast, daniel, martin.lau; +Cc: andrii, kernel-team

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(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-02-03  2:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-02 19:05 [PATCH bpf-next 0/3] Two small fixes for global subprog tagging Andrii Nakryiko
2024-02-02 19:05 ` [PATCH bpf-next 1/3] bpf: handle trusted PTR_TO_BTF_ID_OR_NULL in argument check logic Andrii Nakryiko
2024-02-02 19:05 ` [PATCH bpf-next 2/3] selftests/bpf: add more cases for __arg_trusted __arg_nullable args Andrii Nakryiko
2024-02-02 19:05 ` [PATCH bpf-next 3/3] bpf: don't emit warnings intended for global subprogs for static subprogs Andrii Nakryiko
2024-02-02 21:27 ` [PATCH bpf-next 0/3] Two small fixes for global subprog tagging Eduard Zingerman
2024-02-03  2:20 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox