Re: [PATCH bpf-next v3 5/6] bpf: allow kind_flag for BTF type and decl tags

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

 



On Thu, 2025-01-30 at 12:12 -0800, Ihor Solodrai wrote:
> BTF type tags and decl tags now may have info->kflag set to 1,
> changing the semantics of the tag.
> 
> Change BTF verification to permit BTF that makes use of this feature:
>   * remove kflag check in btf_decl_tag_check_meta(), as both values
>     are valid
>   * allow kflag to be set for BTF_KIND_TYPE_TAG type in
>     btf_ref_type_check_meta()
> 
> Make sure kind_flag is NOT set when checking for specific BTF tags,
> such as "kptr", "user" etc.
> 
> Modify a selftest checking for kflag in decl_tag accordingly.
> 
> Signed-off-by: Ihor Solodrai <ihor.solodrai@xxxxxxxxx>
> ---

Double checked all places where btf_type_is_type_tag() and
btf_type_kflag() are used. The changes look correct.

btf_type_is_type_tag() is used in 7 places, in 4 such places it is
used in conjunction with !btf_type_kflag(t). Not sure if embedding
btf_type_kflag(t) in btf_type_is_type_tag() makes sense.

Acked-by: Eduard Zingerman <eddyz87@xxxxxxxxx>

[...]






[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