Commit b968ac3
committed
selftests/bpf: Fix test_verifier atomic test on 32-bit
torvalds#20/p Can't use ATM_FETCH_ADD on kernel memory FAIL
Unexpected verifier log!
EXP: only read is supported
RES:
FAIL
Unexpected error message!
EXP: only read is supported
RES: 0: R1=ctx() R10=fp0
0: (79) r2 = *(u64 *)(r1 +0)
func 'bpf_fentry_test7' arg0 has btf_id 30402 type STRUCT 'bpf_fentry_test_t'
1: R1=ctx() R2_w=ptr_bpf_fentry_test_t()
1: (b7) r3 = 1 ; R3_w=1
2: (db) r3 = atomic64_fetch_add((u64 *)(r2 +0), r3)
access beyond struct bpf_fentry_test_t at off 0 size 8
verification time 2173 usec
stack depth 0
Fixes: 98d666d ("bpf: Add tests for new BPF atomic operations")
Signed-off-by: Tony Ambardar <[email protected]>1 parent 8dc6110 commit b968ac3
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
| |||
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
96 | | - | |
| 97 | + | |
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
| |||
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
| 108 | + | |
0 commit comments