Commit 2b8dd873 authored by Daniel Xu's avatar Daniel Xu Committed by Alexei Starovoitov

bpf: Make bpf_session_cookie() kfunc return long *

We will soon be generating kfunc prototypes from BTF. As part of that,
we need to align the manual signatures in bpf_kfuncs.h with the actual
kfunc definitions. There is currently a conflicting signature for
bpf_session_cookie() w.r.t. return type.

The original intent was to return long * and not __u64 *. You can see
evidence of that intent in a3a51133 ("selftests/bpf: Add kprobe
session cookie test").

Fix conflict by changing kfunc definition.

Fixes: 5c919ace ("bpf: Add support for kprobe session cookie")
Signed-off-by: default avatarDaniel Xu <dxu@dxuuu.xyz>
Link: https://lore.kernel.org/r/7043e1c251ab33151d6e3830f8ea1902ed2604ac.1718207789.git.dxu@dxuuu.xyzSigned-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent ac42f636
...@@ -3527,7 +3527,7 @@ __bpf_kfunc bool bpf_session_is_return(void) ...@@ -3527,7 +3527,7 @@ __bpf_kfunc bool bpf_session_is_return(void)
return session_ctx->is_return; return session_ctx->is_return;
} }
__bpf_kfunc __u64 *bpf_session_cookie(void) __bpf_kfunc long *bpf_session_cookie(void)
{ {
struct bpf_session_run_ctx *session_ctx; struct bpf_session_run_ctx *session_ctx;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment