[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAWJmAaiFAyK+PDLStoR_0sGAH6TeeekPMdOjhKwQ07rUm_oSA@mail.gmail.com>
Date: Tue, 3 Feb 2026 09:14:07 +0800
From: Chengkaitao <pilgrimtao@...il.com>
To: Alexei Starovoitov <alexei.starovoitov@...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 v4 1/3] bpf/verifier: allow calling bpf_kptr_xchg while
holding a lock
On Tue, Feb 3, 2026 at 1:57 AM Alexei Starovoitov
<alexei.starovoitov@...il.com> wrote:
>
> On Mon, Feb 2, 2026 at 1:01 AM Chengkaitao <pilgrimtao@...il.com> wrote:
> >
> > From: Chengkaitao <chengkaitao@...inos.cn>
> >
> > For the following scenario:
> > struct tree_node {
> > struct bpf_rb_node node;
> > struct request __kptr *req;
> > u64 key;
> > };
> > struct bpf_rb_root tree_root __contains(tree_node, node);
> > struct bpf_spin_lock tree_lock;
> >
> > If we need to traverse all nodes in the rbtree, retrieve the __kptr
> > pointer from each node, and read kernel data from the referenced
> > object, using bpf_kptr_xchg appears unavoidable.
> >
> > This patch skips the BPF verifier checks for bpf_kptr_xchg when
> > called while holding a lock.
> >
> > Signed-off-by: Chengkaitao <chengkaitao@...inos.cn>
>
> You ignored earlier feedback. This is not ok.
>
It's my full name. Every region has its own customs and traditions,
so this isn't an essential change.
--
Yours,
Chengkaitao
Powered by blists - more mailing lists