Skip to content

CO-RE: BPF_FIELD_SIGNED may interpret arbitrary type data as BTF_INT_ENCODING #704

@lmb

Description

@lmb

Not a big issue, just something I found while comparing cilium/ebpf to what libbpf does. Based on my understanding, libbpf may interpret (mt + 1) as a u32 to pass it to BTF_INT_ENCODING without calling btf_is_int(mt):

(btf_int_encoding(mt) & BTF_INT_SIGNED);

I've experimented a bit and I think it might not be possible to get clang to even emit such a relocation, so this has limited impact.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions