[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAADnVQLFBJ5BKv_6UBk7Wrv=-5QxZfG=856uj+rUKRDcxGWbhQ@mail.gmail.com>
Date: Sun, 1 Feb 2026 08:34:05 -0800
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: chengkaitao <pilgrimtao@...il.com>
Cc: Alexei Starovoitov <ast@...nel.org>, Daniel Borkmann <daniel@...earbox.net>,
John Fastabend <john.fastabend@...il.com>, Andrii Nakryiko <andrii@...nel.org>,
Martin KaFai Lau <martin.lau@...ux.dev>, Eduard <eddyz87@...il.com>, Song Liu <song@...nel.org>,
Yonghong Song <yonghong.song@...ux.dev>, KP Singh <kpsingh@...nel.org>,
Stanislav Fomichev <sdf@...ichev.me>, Hao Luo <haoluo@...gle.com>, Jiri Olsa <jolsa@...nel.org>,
Shuah Khan <shuah@...nel.org>, Feng Yang <yangfeng@...inos.cn>,
LKML <linux-kernel@...r.kernel.org>, bpf <bpf@...r.kernel.org>,
"open list:KERNEL SELFTEST FRAMEWORK" <linux-kselftest@...r.kernel.org>, Chengkaitao <chengkaitao@...inos.cn>
Subject: Re: [PATCH v2 3/3] selftests/bpf: Add supplementary tests for bpf_kptr_xchg
On Sat, Jan 31, 2026 at 7:16 PM chengkaitao <pilgrimtao@...il.com> wrote:
>
> From: Chengkaitao <chengkaitao@...inos.cn>
>
> 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 <chengkaitao@...inos.cn>
Please use your full name. Like Feng did :
> Signed-off-by: Feng Yang <yangfeng@...inos.cn>
..
> +#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
Powered by blists - more mailing lists