From: Jiri Olsa <olsajiri@gmail.com>
To: Yingke Xiao <inkxiao12@gmail.com>
Cc: bpf@vger.kernel.org, Trond Myklebust <trondmy@kernel.org>,
anna@kernel.org, linux-nfs@vger.kernel.org, ast@kernel.org,
daniel@iogearbox.net, andrii@kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH bpf v2 2/3] bpf: Fix missing raw_tp_null_args masks for NFS and pNFS
Date: Thu, 19 Nov 2026 21:06:04 +0100 [thread overview]
Message-ID: <av9WrAhA4skgo5JQ@krava> (raw)
In-Reply-To: <CAMcAce9XkYo7gPHMnmRX5EY2dNYO+ECuUF3RkPLnoGHgh8P7tw@mail.gmail.com>
On Thu, Nov 19, 2026 at 02:20:29AM -0500, Yingke Xiao wrote:
> Several NFS client and pNFS layout driver tracepoints pass literal NULL
> or conditionally NULL pointers for struct inode, rpc_task, or struct
> pnfs_layout_hdr:
>
> 1. nfs4_xdr_badoperation (fs/nfs/nfs4xdr.c:981) passes NULL for arg 2
> (const struct rpc_task *task) when decoding compound replies outside
> RPC task context.
> 2. nfs4_set_delegation (fs/nfs/delegation.c:380) passes NULL for arg 1
> (const struct inode *inode) when stateid refers to an unlinked file.
> 3. pnfs_update_layout (fs/nfs/pnfs.c:1980) passes NULL for arg 4
> (const struct pnfs_layout_hdr *lo) during first-time allocation.
>
> Add mask entries to raw_tp_null_args[] so the verifier marks these
> arguments as PTR_MAYBE_NULL instead of assuming non-null pointers.
> Verified on x86_64 7.4.0-rc3 and 6.12.118 LTS.
>
> Fixes: c83e2d970bae ("bpf: Add tracepoints with null-able arguments")
> Cc: stable@vger.kernel.org # 6.12+
> Signed-off-by: Yingke Xiao <inkxiao12@gmail.com>
besides being mangled patches 2 and 3 do not make sense
▎ Patches 2 and 3 are wrong: nfs4_xdr_badoperation, fsnotify_destroy_event
▎ and vfs_open are not tracepoints (the closest real one is
▎ nfs4_xdr_bad_operation, with no pointer arg 2), nfs4_set_delegation's
▎ arg 1 is fmode_t and the inode is never NULL there, and
▎ pnfs_update_layout is already listed with 0x10000 for 'lo', while the
▎ new 0x1000 marks the iomode enum. The cited source lines don't match
▎ the descriptions either. Please drop 2 and 3.
jirka
> ---
> v1 -> v2:
> - Correct sender identity and Signed-off-by with real legal name per DCO.
> - Remove drafting notes.
> - No functional code changes.
>
> kernel/bpf/btf.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c
> index b234567..c345678 100644
> --- a/kernel/bpf/btf.c
> +++ b/kernel/bpf/btf.c
> @@ -6607,6 +6607,9 @@ static const struct bpf_raw_tp_null_args
> raw_tp_null_args[] = {
> { "fsnotify_bump_event_seq", 0x20 },
> { "nfs4_cb_getattr", 0x200 },
> { "nfs4_cb_recall", 0x200 },
> + { "nfs4_xdr_badoperation", 0x200 },
> + { "nfs4_set_delegation", 0x20 },
> + { "pnfs_update_layout", 0x1000 },
> { "nilfs2_transaction_entry", 0x4 },
> { "iptfs_first_dequeue", 0x1000 },
> { "iptfs_first_fragmenting", 0x1000 },
> --
> 2.43.0
>
prev parent reply other threads:[~2026-11-19 20:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 7:20 [PATCH bpf v2 2/3] bpf: Fix missing raw_tp_null_args masks for NFS and pNFS Yingke Xiao
2026-11-19 20:06 ` Jiri Olsa [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=av9WrAhA4skgo5JQ@krava \
--to=olsajiri@gmail.com \
--cc=andrii@kernel.org \
--cc=anna@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=inkxiao12@gmail.com \
--cc=linux-nfs@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=trondmy@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