On Sat, Jan 31, 2026 at 7:16 PM chengkaitao <[email protected]> wrote: > > From: Chengkaitao <[email protected]> > > 1. Allow using bpf_kptr_xchg under lock-held context. > 2. The rb_node contains a __kptr pointer, eliminating the need to > perform the remove-read-readd operation sequence.
typo > This patch implements the following workflow: > 1. Construct a rbtree with 16 elements. > 2. Traverse the rbtree, locate the kptr pointer in the target node, > and read the content pointed to by the pointer. > 3. Remove all nodes from the rbtree. > > Signed-off-by: Chengkaitao <[email protected]> Please use your full name. Like Feng did : > Signed-off-by: Feng Yang <[email protected]> .. > +#define private(name) (SEC(".data." #name) __hidden __aligned(8)) > + > +private(A) struct bpf_rb_root root __contains(tree_node, node); > +private(A) struct bpf_spin_lock lock; It doesn't even build :( progs/rbtree_search_kptr.c:23:1: error: expected parameter declarator 23 | private(A) struct bpf_rb_root root __contains(tree_node, node); | ^ pw-bot: cr

