Skip to content

Commit ade92ad

Browse files
committed
rhel-only: Fix up kfunc definitions in filter.c
JIRA: https://issues.redhat.com/browse/RHEL-65787 Upstream status: RHEL only The kfunc definitions were updated by commits: 6f3189f ("bpf: treewide: Annotate BPF kfuncs in BTF") 391145b ("bpf: Add __bpf_kfunc_{start,end}_defs macros") which were both applied upstream after the commits backported in this series, but were subsequently backported. Add this RHEL-only commit to fix up the kfunc definitions to the new syntax. Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
1 parent c522ffd commit ade92ad

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

net/core/filter.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11892,10 +11892,7 @@ static int __init bpf_kfunc_init(void)
1189211892
}
1189311893
late_initcall(bpf_kfunc_init);
1189411894

11895-
/* Disables missing prototype warnings */
11896-
__diag_push();
11897-
__diag_ignore_all("-Wmissing-prototypes",
11898-
"Global functions as their definitions will be in vmlinux BTF");
11895+
__bpf_kfunc_start_defs();
1189911896

1190011897
/* bpf_sock_destroy: Destroy the given socket with ECONNABORTED error code.
1190111898
*
@@ -11929,11 +11926,11 @@ __bpf_kfunc int bpf_sock_destroy(struct sock_common *sock)
1192911926
return sk->sk_prot->diag_destroy(sk, ECONNABORTED);
1193011927
}
1193111928

11932-
__diag_pop()
11929+
__bpf_kfunc_end_defs();
1193311930

11934-
BTF_SET8_START(bpf_sk_iter_kfunc_ids)
11931+
BTF_KFUNCS_START(bpf_sk_iter_kfunc_ids)
1193511932
BTF_ID_FLAGS(func, bpf_sock_destroy, KF_TRUSTED_ARGS)
11936-
BTF_SET8_END(bpf_sk_iter_kfunc_ids)
11933+
BTF_KFUNCS_END(bpf_sk_iter_kfunc_ids)
1193711934

1193811935
static int tracing_iter_filter(const struct bpf_prog *prog, u32 kfunc_id)
1193911936
{

0 commit comments

Comments
 (0)