BPF List
 help / color / mirror / Atom feed
From: Puranjay Mohan <puranjay@kernel.org>
To: bpf@vger.kernel.org
Cc: Puranjay Mohan <puranjay@kernel.org>,
	Puranjay Mohan <puranjay12@gmail.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Andrii Nakryiko <andrii@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Martin KaFai Lau <martin.lau@kernel.org>,
	Eduard Zingerman <eddyz87@gmail.com>,
	Kumar Kartikeya Dwivedi <memxor@gmail.com>,
	kernel-team@meta.com
Subject: [PATCH bpf-next 4/7] selftests: bpf: Update kfunc_param_nullable test for new error message
Date: Wed, 24 Dec 2025 11:24:33 -0800	[thread overview]
Message-ID: <20251224192448.3176531-5-puranjay@kernel.org> (raw)
In-Reply-To: <20251224192448.3176531-1-puranjay@kernel.org>

With trusted args now being the default, the NULL pointer check runs
before type-specific validation. Update test3 to expect the new error
message "Possibly NULL pointer passed to trusted arg0" instead of the
old dynptr-specific error message.

Signed-off-by: Puranjay Mohan <puranjay@kernel.org>
---
 tools/testing/selftests/bpf/progs/test_kfunc_param_nullable.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/bpf/progs/test_kfunc_param_nullable.c b/tools/testing/selftests/bpf/progs/test_kfunc_param_nullable.c
index 0ad1bf1ede8d..967081bbcfe1 100644
--- a/tools/testing/selftests/bpf/progs/test_kfunc_param_nullable.c
+++ b/tools/testing/selftests/bpf/progs/test_kfunc_param_nullable.c
@@ -29,7 +29,7 @@ int kfunc_dynptr_nullable_test2(struct __sk_buff *skb)
 }
 
 SEC("tc")
-__failure __msg("expected pointer to stack or const struct bpf_dynptr")
+__failure __msg("Possibly NULL pointer passed to trusted arg0")
 int kfunc_dynptr_nullable_test3(struct __sk_buff *skb)
 {
 	struct bpf_dynptr data;
-- 
2.47.3


  parent reply	other threads:[~2025-12-24 19:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-24 19:24 [PATCH bpf-next 0/7] bpf: Make KF_TRUSTED_ARGS default Puranjay Mohan
2025-12-24 19:24 ` [PATCH bpf-next 1/7] bpf: Make KF_TRUSTED_ARGS the default for all kfuncs Puranjay Mohan
2025-12-30 23:49   ` Eduard Zingerman
2025-12-30 23:56     ` Alexei Starovoitov
2025-12-31  0:08     ` Puranjay Mohan
2025-12-31  0:29       ` Eduard Zingerman
2025-12-31 12:34         ` Puranjay Mohan
2025-12-31 16:45           ` Alexei Starovoitov
2025-12-24 19:24 ` [PATCH bpf-next 2/7] bpf: net: netfilter: Mark kfuncs accurately Puranjay Mohan
2025-12-24 19:24 ` [PATCH bpf-next 3/7] bpf: Remove redundant KF_TRUSTED_ARGS flag from all kfuncs Puranjay Mohan
2025-12-24 19:24 ` Puranjay Mohan [this message]
2025-12-24 19:24 ` [PATCH bpf-next 5/7] selftests: bpf: Update failure message for rbtree_fail Puranjay Mohan
2025-12-24 19:24 ` [PATCH bpf-next 6/7] selftests: bpf: fix test_kfunc_dynptr_param Puranjay Mohan
2025-12-31  2:04   ` Alexei Starovoitov
2025-12-24 19:24 ` [PATCH bpf-next 7/7] selftests: bpf: fix cgroup_hierarchical_stats Puranjay Mohan

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=20251224192448.3176531-5-puranjay@kernel.org \
    --to=puranjay@kernel.org \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=kernel-team@meta.com \
    --cc=martin.lau@kernel.org \
    --cc=memxor@gmail.com \
    --cc=puranjay12@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