diff options
author | Lorenz Bauer <oss@lmb.io> | 2022-09-10 14:01:20 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2022-09-11 04:08:38 +0300 |
commit | a37a32583e282d8d815e22add29bc1e91e19951a (patch) | |
tree | ba0074b977458bb783dee669335420ad53bc3779 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 8a7d61bdc2fac2c460a2f32a062f5c6dbd21a764 (diff) | |
download | linux-a37a32583e282d8d815e22add29bc1e91e19951a.tar.xz |
bpf: btf: fix truncated last_member_type_id in btf_struct_resolve
When trying to finish resolving a struct member, btf_struct_resolve
saves the member type id in a u16 temporary variable. This truncates
the 32 bit type id value if it exceeds UINT16_MAX.
As a result, structs that have members with type ids > UINT16_MAX and
which need resolution will fail with a message like this:
[67414] STRUCT ff_device size=120 vlen=12
effect_owners type_id=67434 bits_offset=960 Member exceeds struct_size
Fix this by changing the type of last_member_type_id to u32.
Fixes: a0791f0df7d2 ("bpf: fix BTF limits")
Reviewed-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Lorenz Bauer <oss@lmb.io>
Link: https://lore.kernel.org/r/20220910110120.339242-1-oss@lmb.io
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions