The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Leon Hwang <hffilwlqm@gmail.com>
To: Kumar Kartikeya Dwivedi <memxor@gmail.com>,
	Kaitao Cheng <kaitao.cheng@linux.dev>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	Eduard Zingerman <eddyz87@gmail.com>,
	Martin KaFai Lau <martin.lau@linux.dev>,
	Song Liu <song@kernel.org>,
	Yonghong Song <yonghong.song@linux.dev>,
	Jiri Olsa <jolsa@kernel.org>,
	Emil Tsalapatis <emil@etsalapatis.com>,
	John Fastabend <john.fastabend@gmail.com>,
	Ihor Solodrai <ihor.solodrai@linux.dev>
Cc: bpf@vger.kernel.org, linux-kernel@vger.kernel.org,
	Kaitao Cheng <chengkaitao@kylinos.cn>
Subject: Re: [PATCH] bpf: add KF_SPIN_LOCK flag for kfuncs under bpf_spin_lock
Date: Tue, 4 Aug 2026 20:42:54 +0800	[thread overview]
Message-ID: <8d256ca9-9291-4151-a329-d0b9bf101a72@gmail.com> (raw)
In-Reply-To: <DKG32J18PN0J.OP1J3RRHOU13@gmail.com>

On 2026/8/4 18:22, Kumar Kartikeya Dwivedi wrote:
> On Tue Aug 4, 2026 at 12:09 PM CEST, Kaitao Cheng wrote:
[...]
>>
>> Alternatively, following the naming of GFP_ATOMIC, could we call it KF_ATOMIC?
> 
> I think that is also confusing, every kfunc is allowed in atomic context in
> general. E.g. bpf_map_update_elem() in spin lock critical section would be
> problematic (due to embedded bpf_spin_lock in map value surfacing a deadlock
> opportunity). KF_OK_IN_SPIN_LOCK_CS is another option, but slightly longer than
> the previous proposal.
> 
> In any case, let's choose this or the former one, and not fret too much about
> the naming. We can also choose a better name later on.
> 

KF_LOCK_SAFE? Since other kfuncs are lock-unsafe for verifier.

Thanks,
Leon


  reply	other threads:[~2026-08-04 12:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-04  8:32 [PATCH] bpf: add KF_SPIN_LOCK flag for kfuncs under bpf_spin_lock Kaitao Cheng
2026-08-04  8:43 ` Kumar Kartikeya Dwivedi
2026-08-04  9:37   ` Kaitao Cheng
2026-08-04  9:42     ` Kumar Kartikeya Dwivedi
2026-08-04 10:09       ` Kaitao Cheng
2026-08-04 10:22         ` Kumar Kartikeya Dwivedi
2026-08-04 12:42           ` Leon Hwang [this message]
2026-08-04 13:05             ` Kumar Kartikeya Dwivedi
2026-08-04  9:15 ` Leon Hwang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8d256ca9-9291-4151-a329-d0b9bf101a72@gmail.com \
    --to=hffilwlqm@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=chengkaitao@kylinos.cn \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=emil@etsalapatis.com \
    --cc=ihor.solodrai@linux.dev \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kaitao.cheng@linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=memxor@gmail.com \
    --cc=song@kernel.org \
    --cc=yonghong.song@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox