BPF List
 help / color / mirror / Atom feed
* [PATCH bpf v2 2/3] bpf: Fix missing raw_tp_null_args masks for NFS and pNFS
@ 2026-11-19  7:20 Yingke Xiao
  2026-11-19 20:06 ` Jiri Olsa
  0 siblings, 1 reply; 2+ messages in thread
From: Yingke Xiao @ 2026-11-19  7:20 UTC (permalink / raw)
  To: bpf; +Cc: Trond Myklebust, anna, linux-nfs, ast, daniel, andrii, stable

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>
---
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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-19 20:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox