All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alexei Starovoitov" <alexei.starovoitov@gmail.com>
To: "Jose Fernandez (Anthropic)" <jose.fernandez@linux.dev>,
	"KP Singh" <kpsingh@kernel.org>,
	"Matt Bobrowski" <matt@bobrowski.net>,
	"Daniel Borkmann" <daniel@iogearbox.net>,
	"Andrii Nakryiko" <andrii@kernel.org>,
	"Eduard Zingerman" <eddyz87@gmail.com>,
	"Kumar Kartikeya Dwivedi" <memxor@gmail.com>,
	"Anton Protopopov" <a.s.protopopov@gmail.com>
Cc: <bpf@vger.kernel.org>
Subject: Re: [PATCH bpf-next] bpf, lsm: Make bpf_lsm_get_retval_range() return void
Date: Tue, 24 Nov 2026 00:28:56 +0000	[thread overview]
Message-ID: <DN30L7T6638S.3GDFKZBDTI1CN@gmail.com> (raw)
In-Reply-To: <20261120-jf-bpf-lsm-retval-range-v1-1-d712e4090907@linux.dev>

On Thu, Nov 19, 2026 at 08:28 PM Jose Fernandez (Anthropic) <jose.fernandez@linux.dev> wrote:
> and make the function return void, so resolve_btfids no longer tags
> it and no fmod_ret program can attach to it.

Applied, but that closes one function. By the rules in fmodret.c the verifier,
helpers and kfuncs get tags too. A skip is worse there:

  target                 error    after the skip
  ---------------------  -------  ----------------------------------------
  bpf_find_subprog()     -ENOENT  jit_subprogs(): func[-2]->bpf_func
  bpf_iter_task_new()    -EINVAL  no kit->pos = NULL. bpf_iter_task_next()
                                  derefs what the prog left on its stack
  bpf_dynptr_from_mem()  -EINVAL  no bpf_dynptr_set_null(). The prog picks
                                  dst->data for bpf_dynptr_write()

We cannot make them all void.
Should we teach resolve_btfid to filter out all code in kernel/bpf/verifier.o
and/or funcs with "bpf_" prefix? and/or funcs that take 'bpf_*' types ?
btf_*() looks ok to stay as fmodretable.


  parent reply	other threads:[~2026-11-24  0:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-20  4:28 [PATCH bpf-next] bpf, lsm: Make bpf_lsm_get_retval_range() return void Jose Fernandez (Anthropic)
2026-11-23 13:08 ` Anton Protopopov
2026-11-24  0:28 ` Alexei Starovoitov [this message]
2026-11-24 14:15   ` Anton Protopopov
2026-11-24 19:46     ` Alexei Starovoitov
2026-11-24 19:50       ` Anton Protopopov
2026-11-24  0:30 ` 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=DN30L7T6638S.3GDFKZBDTI1CN@gmail.com \
    --to=alexei.starovoitov@gmail.com \
    --cc=a.s.protopopov@gmail.com \
    --cc=andrii@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=jose.fernandez@linux.dev \
    --cc=kpsingh@kernel.org \
    --cc=matt@bobrowski.net \
    --cc=memxor@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.