Re: [PATCH v3 bpf 0/5] Tighten up arg:ctx type enforcement

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello:

This series was applied to bpf/bpf.git (master)
by Alexei Starovoitov <ast@xxxxxxxxxx>:

On Wed, 17 Jan 2024 19:31:38 -0800 you wrote:
> Follow up fixes for kernel-side and libbpf-side logic around handling arg:ctx
> (__arg_ctx) tagged arguments of BPF global subprogs.
> 
> Patch #1 adds libbpf feature detection of kernel-side __arg_ctx support to
> avoid unnecessary rewriting BTF types. With stricter kernel-side type
> enforcement this is now mandatory to avoid problems with using `struct
> bpf_user_pt_regs_t` instead of actual typedef. For __arg_ctx tagged arguments
> verifier is now supporting either `bpf_user_pt_regs_t` typedef or resolves it
> down to the actual struct (pt_regs/user_pt_regs/user_regs_struct), depending
> on architecture), but for old kernels without __arg_ctx support it's more
> backwards compatible for libbpf to use `struct bpf_user_pt_regs_t` rewrite
> which will work on wider range of kernels. So feature detection prevent libbpf
> accidentally breaking global subprogs on new kernels.
> 
> [...]

Here is the summary with links:
  - [v3,bpf,1/5] libbpf: feature-detect arg:ctx tag support in kernel
    https://git.kernel.org/bpf/bpf/c/01b55f4f0cd6
  - [v3,bpf,2/5] bpf: extract bpf_ctx_convert_map logic and make it more reusable
    https://git.kernel.org/bpf/bpf/c/66967a32d3b1
  - [v3,bpf,3/5] bpf: enforce types for __arg_ctx-tagged arguments in global subprogs
    https://git.kernel.org/bpf/bpf/c/0ba971511d16
  - [v3,bpf,4/5] selftests/bpf: add tests confirming type logic in kernel for __arg_ctx
    https://git.kernel.org/bpf/bpf/c/989410cde819
  - [v3,bpf,5/5] libbpf: warn on unexpected __arg_ctx type when rewriting BTF
    https://git.kernel.org/bpf/bpf/c/76ec90a996e3

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html






[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux