The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Anton Protopopov <a.s.protopopov@gmail.com>
To: "Jose Fernandez (Anthropic)" <jose.fernandez@linux.dev>
Cc: KP Singh <kpsingh@kernel.org>,
	Matt Bobrowski <matt@bobrowski.net>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	Eduard Zingerman <eddyz87@gmail.com>,
	Kumar Kartikeya Dwivedi <memxor@gmail.com>,
	bpf@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH bpf-next] bpf, lsm: Make bpf_lsm_get_retval_range() return void
Date: Mon, 23 Nov 2026 13:08:51 +0000	[thread overview]
Message-ID: <awQ642Ko94a255rT@mail.gmail.com> (raw)
In-Reply-To: <20261120-jf-bpf-lsm-retval-range-v1-1-d712e4090907@linux.dev>

On 26/11/20 04:28AM, Jose Fernandez (Anthropic) wrote:
> With CONFIG_BPF_FMODRET_SCAN=y, fmod_ret programs can attach to tagged
> functions, so a program on bpf_lsm_get_retval_range() can make it fail
> for an LSM hook that returns a value. get_func_retval_range() then
> reports no range, and do_refine_retval_range() and check_helper_call()
> ignore the error and use a range the call did not set.
> 
> The function fails only for a void hook, which every caller but
> get_func_retval_range() already rules out. Check for a void hook there
> and make the function return void, so resolve_btfids no longer tags
> it and no fmod_ret program can attach to it.
> 
> Fixes: bc45414d1690 ("bpf: Allow fmod_ret on tagged functions and check the return value")
> Signed-off-by: Jose Fernandez (Anthropic) <jose.fernandez@linux.dev>

The change looks ok, makes sense for this function.

I am not sure if the topic should be 'bpf, lsm',
I see no lsm part here. Otherwise,

Acked-by: Anton Protopopov <a.s.protopopov@gmail.com>

> ...

      reply	other threads:[~2026-11-23 12:57 UTC|newest]

Thread overview: 2+ 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 [this message]

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=awQ642Ko94a255rT@mail.gmail.com \
    --to=a.s.protopopov@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@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=linux-kernel@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox