Re: [PATCH bpf v2 1/2] btf: fix resolving BTF_KIND_VAR after ARRAY, STRUCT, UNION, PTR

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

 



On 3/6/23 12:21 PM, Lorenz Bauer wrote:
btf_datasec_resolve contains a bug that causes the following BTF
to fail loading:

     [1] DATASEC a size=2 vlen=2
         type_id=4 offset=0 size=1
         type_id=7 offset=1 size=1
     [2] INT (anon) size=1 bits_offset=0 nr_bits=8 encoding=(none)
     [3] PTR (anon) type_id=2
     [4] VAR a type_id=3 linkage=0
     [5] INT (anon) size=1 bits_offset=0 nr_bits=8 encoding=(none)
     [6] TYPEDEF td type_id=5
     [7] VAR b type_id=6 linkage=0

[...]
The fix is to reset resolve_mode to RESOLVE_TBD before attempting to
resolve a VAR from a DATASEC.

Fixes: 1dc92851849c ("bpf: kernel side support for BTF Var and DataSec")
Signed-off-by: Lorenz Bauer <lmb@xxxxxxxxxxxxx>

Looks like patchbot is on strike, the series got applied to bpf, thanks!



[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