All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Anton Protopopov" <a.s.protopopov@gmail.com>, bpf@vger.kernel.org
Subject: Re: [PATCH v2 bpf-next 4/7] resolve_btfids: Exclude a set of functions by name
Date: Thu, 26 Nov 2026 14:26:40 +0000	[thread overview]
Message-ID: <sashiko-outbox-235699@kernel.org> (raw)
In-Reply-To: <20261126142915.1106330-5-a.s.protopopov@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] bpf: missing Fixes: trailer for fmodret_tag() function exclusion
  fix
--

commit 2fc421479a0ddf21d6c174ca83ce8384475f3b9a
Author: Anton Protopopov <a.s.protopopov@gmail.com>

> resolve_btfids: Exclude a set of functions by name
>
> ftrace reads the code it patches with copy_from_kernel_nofault(). A
> program which makes it fail breaks the detach of fentry on x86:
>
>   unregister_fentry()
>     update_ftrace_direct_del()    returns 0
>       ftrace_replace_code()       ftrace_bug(), no text poke
>         ftrace_verify_code()      -EFAULT
>     bpf_tramp_image_put()         the function still calls the freed image
>
> On arm64 ftrace reads and writes the code with aarch64_insn_read()
> and aarch64_insn_patch_text_nosync(), which calls
> aarch64_insn_write(). They are traceable without KPROBES. The same
> holds for them. Two more functions break BPF after a skip:
>
>   target                         error    after the skip
>   -----------------------------  -------  ---------------------------------
>   copy_to_kernel_nofault()       -EFAULT  arm64, with KPROBES too:
>                                           __aarch64_insn_write() fails.
>                                           ftrace_bug(), no text poke.
>                                           text_poke_memcpy() ignores it.
>                                           bpf_arch_text_copy() returns dst.
>                                           The new prog is all BRK insns
>   tracepoint_probe_unregister()  -ENOENT  bpf_raw_tp_link_release() ignores
>                                           it. __bpf_trace_run() reads the
>                                           freed link
>
> Do not tag these six.
>
> Signed-off-by: Anton Protopopov <a.s.protopopov@gmail.com>

[Severity: Low]
Since this fixes unsafe bpf_fmodret_retval tagging in fmodret_tag(), should
it include a Fixes: tag?

  Fixes: 4dd950adacad ("resolve_btfids: Tag the functions that return errors")

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261126142915.1106330-1-a.s.protopopov@gmail.com?part=4

  reply	other threads:[~2026-11-26 14:26 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-26 14:29 [PATCH v2 bpf-next 0/7] Do not tag selected functions as fmodret targets Anton Protopopov
2026-11-26 14:29 ` [PATCH v2 bpf-next 1/7] selftests/bpf: Test the tag of vmlinux with do_epoll_create() Anton Protopopov
2026-11-26 14:29 ` [PATCH v2 bpf-next 2/7] resolve_btfids: Do not tag functions which work on BPF objects Anton Protopopov
2026-11-26 14:27   ` sashiko-bot
2026-11-26 14:42     ` Anton Protopopov
2026-11-26 14:29 ` [PATCH v2 bpf-next 3/7] resolve_btfids: Do not tag kfuncs and helpers Anton Protopopov
2026-11-26 14:29 ` [PATCH v2 bpf-next 4/7] resolve_btfids: Exclude a set of functions by name Anton Protopopov
2026-11-26 14:26   ` sashiko-bot [this message]
2026-11-26 14:44     ` Anton Protopopov
2026-11-26 14:29 ` [PATCH v2 bpf-next 5/7] resolve_btfids: Exclude bpf_*() and __bpf_*() of vmlinux Anton Protopopov
2026-11-26 15:01   ` bot+bpf-ci
2026-11-26 15:26     ` Anton Protopopov
2026-11-26 14:29 ` [PATCH v2 bpf-next 6/7] resolve_btfids: Exclude the code of kernel/bpf and of the JIT Anton Protopopov
2026-11-26 14:29 ` [PATCH v2 bpf-next 7/7] selftests/bpf: Test functions which must have no fmod_ret tag Anton Protopopov
2026-11-26 14:27   ` sashiko-bot
2026-11-26 14:48     ` Anton Protopopov
2026-11-26 20:20 ` [PATCH v2 bpf-next 0/7] Do not tag selected functions as fmodret targets 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=sashiko-outbox-235699@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=a.s.protopopov@gmail.com \
    --cc=bpf@vger.kernel.org \
    --cc=sashiko-reviews@lists.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 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.