Re: [PATCH bpf-next v3 00/10] Support BTF_KIND_TYPE_TAG for btf_type_tag attributes

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

 



On Thu, Nov 11, 2021 at 5:26 PM Yonghong Song <yhs@xxxxxx> wrote:
>
> LLVM patches ([1] for clang, [2] and [3] for BPF backend)
> added support for btf_type_tag attributes. This patch
> added support for the kernel.
>
> The main motivation for btf_type_tag is to bring kernel
> annotations __user, __rcu etc. to btf. With such information
> available in btf, bpf verifier can detect mis-usages
> and reject the program. For example, for __user tagged pointer,
> developers can then use proper helper like bpf_probe_read_kernel()
> etc. to read the data.
>
> BTF_KIND_TYPE_TAG may also useful for other tracing
> facility where instead of to require user to specify
> kernel/user address type, the kernel can detect it
> by itself with btf.
>
> Patch 1 added support in kernel, Patch 2 for libbpf and Patch 3
> for bpftool. Patches 4-9 are for bpf selftests and Patch 10
> updated docs/bpf/btf.rst file with new btf kind.
>
>   [1] https://reviews.llvm.org/D111199
>   [2] https://reviews.llvm.org/D113222
>   [3] https://reviews.llvm.org/D113496
>
> Changelogs:
>   v2 -> v3:
>     - rebase to resolve merge conflicts.
>   v1 -> v2:
>     - add more dedup tests.
>     - remove build requirement for LLVM=1.
>     - remove testing macro __has_attribute in bpf programs
>       as it is always defined in recent clang compilers.

Applied. Thanks.
Cannot wait to get tags available in vmlinux.



[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