@@ -149,7 +149,7 @@ int ringbuf_release_uninit_dynptr(void *ctx)
149
149
150
150
/* A dynptr can't be used after it has been invalidated */
151
151
SEC ("?raw_tp" )
152
- __failure __msg ("Expected an initialized dynptr as arg #3 " )
152
+ __failure __msg ("Expected an initialized dynptr as arg #2 " )
153
153
int use_after_invalid (void * ctx )
154
154
{
155
155
struct bpf_dynptr ptr ;
@@ -428,7 +428,7 @@ int invalid_helper2(void *ctx)
428
428
429
429
/* A bpf_dynptr is invalidated if it's been written into */
430
430
SEC ("?raw_tp" )
431
- __failure __msg ("Expected an initialized dynptr as arg #1 " )
431
+ __failure __msg ("Expected an initialized dynptr as arg #0 " )
432
432
int invalid_write1 (void * ctx )
433
433
{
434
434
struct bpf_dynptr ptr ;
@@ -1407,7 +1407,7 @@ int invalid_slice_rdwr_rdonly(struct __sk_buff *skb)
1407
1407
1408
1408
/* bpf_dynptr_adjust can only be called on initialized dynptrs */
1409
1409
SEC ("?raw_tp" )
1410
- __failure __msg ("Expected an initialized dynptr as arg #1 " )
1410
+ __failure __msg ("Expected an initialized dynptr as arg #0 " )
1411
1411
int dynptr_adjust_invalid (void * ctx )
1412
1412
{
1413
1413
struct bpf_dynptr ptr = {};
@@ -1420,7 +1420,7 @@ int dynptr_adjust_invalid(void *ctx)
1420
1420
1421
1421
/* bpf_dynptr_is_null can only be called on initialized dynptrs */
1422
1422
SEC ("?raw_tp" )
1423
- __failure __msg ("Expected an initialized dynptr as arg #1 " )
1423
+ __failure __msg ("Expected an initialized dynptr as arg #0 " )
1424
1424
int dynptr_is_null_invalid (void * ctx )
1425
1425
{
1426
1426
struct bpf_dynptr ptr = {};
@@ -1433,7 +1433,7 @@ int dynptr_is_null_invalid(void *ctx)
1433
1433
1434
1434
/* bpf_dynptr_is_rdonly can only be called on initialized dynptrs */
1435
1435
SEC ("?raw_tp" )
1436
- __failure __msg ("Expected an initialized dynptr as arg #1 " )
1436
+ __failure __msg ("Expected an initialized dynptr as arg #0 " )
1437
1437
int dynptr_is_rdonly_invalid (void * ctx )
1438
1438
{
1439
1439
struct bpf_dynptr ptr = {};
@@ -1446,7 +1446,7 @@ int dynptr_is_rdonly_invalid(void *ctx)
1446
1446
1447
1447
/* bpf_dynptr_size can only be called on initialized dynptrs */
1448
1448
SEC ("?raw_tp" )
1449
- __failure __msg ("Expected an initialized dynptr as arg #1 " )
1449
+ __failure __msg ("Expected an initialized dynptr as arg #0 " )
1450
1450
int dynptr_size_invalid (void * ctx )
1451
1451
{
1452
1452
struct bpf_dynptr ptr = {};
@@ -1459,7 +1459,7 @@ int dynptr_size_invalid(void *ctx)
1459
1459
1460
1460
/* Only initialized dynptrs can be cloned */
1461
1461
SEC ("?raw_tp" )
1462
- __failure __msg ("Expected an initialized dynptr as arg #1 " )
1462
+ __failure __msg ("Expected an initialized dynptr as arg #0 " )
1463
1463
int clone_invalid1 (void * ctx )
1464
1464
{
1465
1465
struct bpf_dynptr ptr1 = {};
@@ -1493,7 +1493,7 @@ int clone_invalid2(struct xdp_md *xdp)
1493
1493
1494
1494
/* Invalidating a dynptr should invalidate its clones */
1495
1495
SEC ("?raw_tp" )
1496
- __failure __msg ("Expected an initialized dynptr as arg #3 " )
1496
+ __failure __msg ("Expected an initialized dynptr as arg #2 " )
1497
1497
int clone_invalidate1 (void * ctx )
1498
1498
{
1499
1499
struct bpf_dynptr clone ;
@@ -1514,7 +1514,7 @@ int clone_invalidate1(void *ctx)
1514
1514
1515
1515
/* Invalidating a dynptr should invalidate its parent */
1516
1516
SEC ("?raw_tp" )
1517
- __failure __msg ("Expected an initialized dynptr as arg #3 " )
1517
+ __failure __msg ("Expected an initialized dynptr as arg #2 " )
1518
1518
int clone_invalidate2 (void * ctx )
1519
1519
{
1520
1520
struct bpf_dynptr ptr ;
@@ -1535,7 +1535,7 @@ int clone_invalidate2(void *ctx)
1535
1535
1536
1536
/* Invalidating a dynptr should invalidate its siblings */
1537
1537
SEC ("?raw_tp" )
1538
- __failure __msg ("Expected an initialized dynptr as arg #3 " )
1538
+ __failure __msg ("Expected an initialized dynptr as arg #2 " )
1539
1539
int clone_invalidate3 (void * ctx )
1540
1540
{
1541
1541
struct bpf_dynptr ptr ;
@@ -1723,7 +1723,7 @@ __noinline long global_call_bpf_dynptr(const struct bpf_dynptr *dynptr)
1723
1723
}
1724
1724
1725
1725
SEC ("?raw_tp" )
1726
- __failure __msg ("arg#1 expected pointer to stack or const struct bpf_dynptr" )
1726
+ __failure __msg ("arg#0 expected pointer to stack or const struct bpf_dynptr" )
1727
1727
int test_dynptr_reg_type (void * ctx )
1728
1728
{
1729
1729
struct task_struct * current = NULL ;
0 commit comments