Thread (36 messages) 36 messages, 4 authors, 2021-12-19

Re: [PATCH bpf-next v4 06/10] bpf: Track provenance for pointers formed from referenced PTR_TO_BTF_ID

From: Alexei Starovoitov <hidden>
Date: 2021-12-19 05:05:31
Also in: bpf, netfilter-devel

On Sat, Dec 18, 2021 at 8:33 PM Kumar Kartikeya Dwivedi
[off-list ref] wrote:
It is, but into parent_ref_obj_id, to match during release_reference.
quoted
Shouldn't r2 get a different ref_obj_id after r2 = r1->next ?
It's ref_obj_id is still 0.

Thinking about this more, we actually only need 1 extra bit of information in
reg_state, not even a new member. We can simply copy ref_obj_id and set this
bit, then we can reject this register during release but consider it during
release_reference.
It seems to me that this patch created the problem and it's trying
to fix it at the same time.

mark_btf_ld_reg() shouldn't be copying ref_obj_id.
If it keeps it as zero the problem will not happen, no?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help