BPF List
 help / color / mirror / Atom feed
From: Eduard Zingerman <eddyz87@gmail.com>
To: Kumar Kartikeya Dwivedi <memxor@gmail.com>, bpf@vger.kernel.org
Cc: Sashiko <sashiko-bot@kernel.org>,
	Alexei Starovoitov <ast@kernel.org>,
	 Andrii Nakryiko <andrii@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Emil Tsalapatis <emil@etsalapatis.com>,
	 Nicholas Carlini	 <npc@anthropic.com>,
	kkd@meta.com, kernel-team@meta.com
Subject: Re: [PATCH bpf v1 3/8] bpf: Mark bpf_btf_find_by_name_kind() as sleepable
Date: Thu, 03 Sep 2026 15:15:06 -0700	[thread overview]
Message-ID: <f8bce8fab45388b3145eb069bca073c71db04973.camel@gmail.com> (raw)
In-Reply-To: <20260903214758.2727663-4-memxor@gmail.com>

On Thu, 2026-09-03 at 23:47 +0200, Kumar Kartikeya Dwivedi wrote:
> When bpf_btf_find_by_name_kind() finds a type in module BTF, it
> returns a new BTF object fd through __btf_new_fd(). This reaches
> anon_inode_getfd(), which can sleep while allocating or expanding the
> current task fd table.
> 
> The helper prototype does not set might_sleep, so the verifier allows
> the helper in non-sleepable contexts such as BPF timer callbacks. The
> fd allocation can then sleep in softirq context and install the fd into
> the interrupted task.
> 
> Mark the helper as sleepable. This preserves calls from the main body
> of a sleepable syscall program while rejecting calls from its
> non-sleepable regions.
> 
> Fixes: 3d78417b60fb ("bpf: Add bpf_btf_find_by_name_kind() helper.")
> Reported-by: Sashiko <sashiko-bot@kernel.org>
> Link: https://lore.kernel.org/bpf/20260903155150.D57251F000E9@smtp.kernel.org
> Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
> ---

Acked-by: Eduard Zingerman <eddyz87@gmail.com>

...

  reply	other threads:[~2026-09-03 22:15 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-03 21:47 [PATCH bpf v1 0/8] Misc bug fixes - part 2 Kumar Kartikeya Dwivedi
2026-09-03 21:47 ` [PATCH bpf v1 1/8] bpf: Check ancestor frames for rbtree callbacks Kumar Kartikeya Dwivedi
2026-09-03 22:40   ` Eduard Zingerman
2026-09-03 22:56   ` bot+bpf-ci
2026-09-03 21:47 ` [PATCH bpf v1 2/8] selftests/bpf: Check rbtree callback restrictions in subprogs Kumar Kartikeya Dwivedi
2026-09-03 22:56   ` bot+bpf-ci
2026-09-03 21:47 ` [PATCH bpf v1 3/8] bpf: Mark bpf_btf_find_by_name_kind() as sleepable Kumar Kartikeya Dwivedi
2026-09-03 22:15   ` Eduard Zingerman [this message]
2026-09-03 21:47 ` [PATCH bpf v1 4/8] selftests/bpf: Test btf lookup helper sleepability Kumar Kartikeya Dwivedi
2026-09-03 21:47 ` [PATCH bpf v1 5/8] bpf: Mark faultable stack helpers as sleepable Kumar Kartikeya Dwivedi
2026-09-03 22:00   ` Eduard Zingerman
2026-09-03 22:56   ` bot+bpf-ci
2026-09-03 21:47 ` [PATCH bpf v1 6/8] selftests/bpf: Check faultable stack helper contexts Kumar Kartikeya Dwivedi
2026-09-03 22:56   ` bot+bpf-ci
2026-09-03 21:47 ` [PATCH bpf v1 7/8] bpf: Reject legacy packet loads from callbacks Kumar Kartikeya Dwivedi
2026-09-03 21:58   ` Eduard Zingerman
2026-09-04  2:22     ` Alexei Starovoitov
2026-09-03 21:47 ` [PATCH bpf v1 8/8] selftests/bpf: " Kumar Kartikeya Dwivedi
2026-09-04  2:30 ` [PATCH bpf v1 0/8] Misc bug fixes - part 2 patchwork-bot+netdevbpf

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=f8bce8fab45388b3145eb069bca073c71db04973.camel@gmail.com \
    --to=eddyz87@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=emil@etsalapatis.com \
    --cc=kernel-team@meta.com \
    --cc=kkd@meta.com \
    --cc=memxor@gmail.com \
    --cc=npc@anthropic.com \
    --cc=sashiko-bot@kernel.org \
    /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