Skip to content

Commit e5f4986

Browse files
committed
TEST: use __bpf_md_ptr() in struct prog_test_ref_kfunc
Try same as b7df9ad ("bpf: fix pointer offsets in context for 32 bit") Fix for following but doesnt work...: - torvalds#128/p calls: invalid kfunc call: referenced arg needs refcounted PTR_TO_BTF_ID FAIL - torvalds#481/p map_kptr: unref: inherit PTR_UNTRUSTED on struct walk FAIL
1 parent 3093ca5 commit e5f4986

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

net/bpf/test_run.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ struct prog_test_ref_kfunc {
611611
int a;
612612
int b;
613613
struct prog_test_member memb;
614-
struct prog_test_ref_kfunc *next;
614+
__bpf_md_ptr(struct prog_test_ref_kfunc, *next);
615615
refcount_t cnt;
616616
};
617617

tools/testing/selftests/bpf/test_kmods/bpf_testmod_kfunc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ struct prog_test_ref_kfunc {
2121
int a;
2222
int b;
2323
struct prog_test_member memb;
24-
struct prog_test_ref_kfunc *next;
24+
__bpf_md_ptr(struct prog_test_ref_kfunc, *next);
2525
refcount_t cnt;
2626
};
2727
#endif

0 commit comments

Comments
 (0)