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/5] resolve_btfids: Do not tag functions whose callers break on a skip
Date: Mon, 30 Nov 2026 18:02:46 +0000	[thread overview]
Message-ID: <sashiko-outbox-241768@kernel.org> (raw)
In-Reply-To: <20261130180425.150703-5-a.s.protopopov@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] resolve_btfids: excluded_by_name() omits d_obtain_alias() and
  d_obtain_root()
--

commit 479ac467ac3a9800596af92b0a8c1b53839d7fc5
Author: Anton Protopopov <a.s.protopopov@gmail.com>

resolve_btfids: Do not tag functions whose callers break on a skip

This commit adds functions to excluded_by_name() in resolve_btfids so they
are not tagged for fmod_ret when skipping them breaks their callers.

> diff --git a/tools/bpf/resolve_btfids/fmodret.c b/tools/bpf/resolve_btfids/fmodret.c
> index 8fa63cbfd3037..401c9b7d3d80c 100644
> --- a/tools/bpf/resolve_btfids/fmodret.c
> +++ b/tools/bpf/resolve_btfids/fmodret.c
> @@ -122,6 +122,15 @@ static bool excluded_by_name(const char *name)
>  		"aarch64_insn_write",
>  		"aarch64_insn_patch_text_nosync",
>  		"tracepoint_probe_unregister",
> +		/* The error is right, but a skip breaks the caller */
> +		"vfs_mkdir",
> +		"lock_two_directories",
> +		"btrfs_lookup_csum",
> +		"ipc_obtain_object_idr",
> +		"idle_thread_get",
> +		"pidfd_pid",
> +		"ksm_get_folio",
> +		"__d_obtain_alias",

[Severity: Medium]
Should d_obtain_alias() and d_obtain_root() also be excluded here?

__d_obtain_alias() is a static helper in fs/dcache.c whose only callers
are the exported one-line wrappers d_obtain_alias() and d_obtain_root(),
both of which consume the caller's struct inode reference on entry.  When
the compiler inlines __d_obtain_alias() into d_obtain_alias() and
d_obtain_root(), its clean ERR_PTR(-ESTALE) return for a NULL inode is
emitted directly in the wrappers, causing resolve_btfids to tag them and
allowing an fmod_ret skip to leak the caller's inode reference.

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

  reply	other threads:[~2026-11-30 18:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30 18:04 [PATCH v2 bpf-next 0/5] Tag fmod_ret functions that return ERR_PTR() Anton Protopopov
2026-11-30 18:04 ` [PATCH v2 bpf-next 1/5] resolve_btfids: Do not count errors translated to NULL Anton Protopopov
2026-11-30 18:06   ` sashiko-bot
2026-11-30 20:02     ` Anton Protopopov
2026-11-30 18:04 ` [PATCH v2 bpf-next 2/5] resolve_btfids: Tag the functions that return ERR_PTR() Anton Protopopov
2026-11-30 18:04 ` [PATCH v2 bpf-next 3/5] resolve_btfids: Do not tag seq_file operations Anton Protopopov
2026-11-30 18:04 ` [PATCH v2 bpf-next 4/5] resolve_btfids: Do not tag functions whose callers break on a skip Anton Protopopov
2026-11-30 18:02   ` sashiko-bot [this message]
2026-11-30 20:10     ` Anton Protopopov
2026-11-30 18:04 ` [PATCH v2 bpf-next 5/5] selftests/bpf: Test fmod_ret on functions that return a pointer Anton Protopopov
2026-12-01  3:20 ` [PATCH v2 bpf-next 0/5] Tag fmod_ret functions that return ERR_PTR() 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-241768@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.