Commit d5994bd
committed
WIP: bpf, arm: Fix up bpf_user_pt_regs_t
This type by default uses struct pt_regs and embeds 'unsigned long' elems
which don't play nicely between 32-bit kernel and 64-bit BPF space. Try
creating a custom version for arm32.
Also hoping to fix following test error:
tester_init:PASS:tester_log_buf 0 nsec
process_subtest:PASS:obj_open_mem 0 nsec
process_subtest:PASS:specs_alloc 0 nsec
run_subtest:PASS:obj_open_mem 0 nsec
libbpf: prog 'kprobe_resolved_ctx': BPF program load failed: -EINVAL
libbpf: prog 'kprobe_resolved_ctx': failed to load: -EINVAL
libbpf: failed to load object 'test_global_func_ctx_args'
run_subtest:FAIL:unexpected_load_failure unexpected error: -22 (errno 22)
VERIFIER LOG:
=============
arg#0 reference type('UNKNOWN ') size cannot be determined: -22
0: R1=ctx() R10=fp0
; return kprobe_struct_ctx_subprog(ctx); @ test_global_func_ctx_args.c:57
0: (85) call pc+1
invalid bpf_context access off=71 size=1 is_valid_access=kprobe_prog_is_valid_access
Caller passes invalid args into func#1 ('kprobe_struct_ctx_subprog')
processed 1 insns (limit 1000000) max_states_per_insn 0 total_states 0 peak_states 0 mark_read 0
=============
kernel-patches#444/20 test_global_funcs/kprobe_resolved_ctx:FAIL
Signed-off-by: Tony Ambardar <[email protected]>1 parent 07371b9 commit d5994bd
File tree
3 files changed
+17
-0
lines changed- arch/arm/include
- asm
- uapi/asm
- tools/include/uapi/asm
3 files changed
+17
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
| |||
0 commit comments