Skip to content

Commit

Permalink
selftests/bpf: Rename ARG_PTR_TO_LONG test description
Browse files Browse the repository at this point in the history
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
  torvalds#489/1   verifier_int_ptr/arg pointer to long uninitialized:OK
  torvalds#489/2   verifier_int_ptr/arg pointer to long half-uninitialized:OK
  torvalds#489/3   verifier_int_ptr/arg pointer to long misaligned:OK
  torvalds#489/4   verifier_int_ptr/arg pointer to long size < sizeof(long):OK
  torvalds#489/5   verifier_int_ptr/arg pointer to long initialized:OK
  torvalds#489     verifier_int_ptr:OK
  Summary: 1/5 PASSED, 0 SKIPPED, 0 FAILED

Signed-off-by: Daniel Borkmann <[email protected]>
  • Loading branch information
borkmann authored and intel-lab-lkp committed Sep 5, 2024
1 parent f3798b3 commit ad3966d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tools/testing/selftests/bpf/progs/verifier_int_ptr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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)
{
Expand Down

0 comments on commit ad3966d

Please sign in to comment.