From: Daniel Borkmann <daniel@iogearbox.net>
To: bpf@vger.kernel.org
Cc: shung-hsi.yu@suse.com, andrii@kernel.org, ast@kernel.org,
kongln9170@gmail.com, Daniel Borkmann <daniel@iogearbox.net>
Subject: [PATCH bpf-next v4 7/8] selftests/bpf: Rename ARG_PTR_TO_LONG test description
Date: Fri, 6 Sep 2024 15:56:07 +0200 [thread overview]
Message-ID: <20240906135608.26477-7-daniel@iogearbox.net> (raw)
In-Reply-To: <20240906135608.26477-1-daniel@iogearbox.net>
Given we got rid of ARG_PTR_TO_LONG, change the test case description to
avoid potential confusion:
# ./vmtest.sh -- ./test_progs -t verifier_int_ptr
[...]
./test_progs -t verifier_int_ptr
[ 1.610563] bpf_testmod: loading out-of-tree module taints kernel.
[ 1.611049] bpf_testmod: module verification failed: signature and/or required key missing - tainting kernel
#489/1 verifier_int_ptr/arg pointer to long uninitialized:OK
#489/2 verifier_int_ptr/arg pointer to long half-uninitialized:OK
#489/3 verifier_int_ptr/arg pointer to long misaligned:OK
#489/4 verifier_int_ptr/arg pointer to long size < sizeof(long):OK
#489/5 verifier_int_ptr/arg pointer to long initialized:OK
#489 verifier_int_ptr:OK
Summary: 1/5 PASSED, 0 SKIPPED, 0 FAILED
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
---
v1 -> v2:
- new patch
tools/testing/selftests/bpf/progs/verifier_int_ptr.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/tools/testing/selftests/bpf/progs/verifier_int_ptr.c b/tools/testing/selftests/bpf/progs/verifier_int_ptr.c
index 87206803c025..5f2efb895edb 100644
--- a/tools/testing/selftests/bpf/progs/verifier_int_ptr.c
+++ b/tools/testing/selftests/bpf/progs/verifier_int_ptr.c
@@ -6,7 +6,7 @@
#include "bpf_misc.h"
SEC("socket")
-__description("ARG_PTR_TO_LONG uninitialized")
+__description("arg pointer to long uninitialized")
__success
__naked void arg_ptr_to_long_uninitialized(void)
{
@@ -34,7 +34,7 @@ __naked void arg_ptr_to_long_uninitialized(void)
}
SEC("socket")
-__description("ARG_PTR_TO_LONG half-uninitialized")
+__description("arg pointer to long half-uninitialized")
__success
__retval(0)
__naked void ptr_to_long_half_uninitialized(void)
@@ -64,7 +64,7 @@ __naked void ptr_to_long_half_uninitialized(void)
}
SEC("cgroup/sysctl")
-__description("ARG_PTR_TO_LONG misaligned")
+__description("arg pointer to long misaligned")
__failure __msg("misaligned stack access off 0+-20+0 size 8")
__naked void arg_ptr_to_long_misaligned(void)
{
@@ -95,7 +95,7 @@ __naked void arg_ptr_to_long_misaligned(void)
}
SEC("cgroup/sysctl")
-__description("ARG_PTR_TO_LONG size < sizeof(long)")
+__description("arg pointer to long size < sizeof(long)")
__failure __msg("invalid indirect access to stack R4 off=-4 size=8")
__naked void to_long_size_sizeof_long(void)
{
@@ -124,7 +124,7 @@ __naked void to_long_size_sizeof_long(void)
}
SEC("cgroup/sysctl")
-__description("ARG_PTR_TO_LONG initialized")
+__description("arg pointer to long initialized")
__success
__naked void arg_ptr_to_long_initialized(void)
{
--
2.43.0
next prev parent reply other threads:[~2024-09-06 13:56 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-06 13:56 [PATCH bpf-next v4 1/8] bpf: Fix bpf_strtol and bpf_strtoul helpers for 32bit Daniel Borkmann
2024-09-06 13:56 ` [PATCH bpf-next v4 2/8] bpf: Remove truncation test in bpf_strtol and bpf_strtoul helpers Daniel Borkmann
2024-09-06 21:03 ` Andrii Nakryiko
2024-09-06 13:56 ` [PATCH bpf-next v4 3/8] bpf: Fix helper writes to read-only maps Daniel Borkmann
2024-09-06 21:03 ` Andrii Nakryiko
2024-09-06 22:36 ` Alexei Starovoitov
2024-09-09 11:51 ` Shung-Hsi Yu
2024-09-06 13:56 ` [PATCH bpf-next v4 4/8] bpf: Improve check_raw_mode_ok test for MEM_UNINIT-tagged types Daniel Borkmann
2024-09-06 21:03 ` Andrii Nakryiko
2024-09-09 12:24 ` Shung-Hsi Yu
2024-09-06 13:56 ` [PATCH bpf-next v4 5/8] bpf: Zero former ARG_PTR_TO_{LONG,INT} args in case of error Daniel Borkmann
2024-09-06 21:03 ` Andrii Nakryiko
2024-09-06 22:35 ` Alexei Starovoitov
2024-09-09 12:16 ` Daniel Borkmann
2024-09-12 9:47 ` Daniel Borkmann
2024-09-12 17:59 ` Andrii Nakryiko
2024-09-12 22:47 ` Daniel Borkmann
2024-09-06 13:56 ` [PATCH bpf-next v4 6/8] selftests/bpf: Fix ARG_PTR_TO_LONG {half-,}uninitialized test Daniel Borkmann
2024-09-06 21:03 ` Andrii Nakryiko
2024-09-06 13:56 ` Daniel Borkmann [this message]
2024-09-06 13:56 ` [PATCH bpf-next v4 8/8] selftests/bpf: Add a test case to write into .rodata Daniel Borkmann
2024-09-06 21:02 ` Andrii Nakryiko
2024-09-06 21:02 ` [PATCH bpf-next v4 1/8] bpf: Fix bpf_strtol and bpf_strtoul helpers for 32bit Andrii Nakryiko
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=20240906135608.26477-7-daniel@iogearbox.net \
--to=daniel@iogearbox.net \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=kongln9170@gmail.com \
--cc=shung-hsi.yu@suse.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