Re: [PATCH bpf-next v8 05/11] bpf: support fsession for bpf_session_cookie

From: Alexei Starovoitov

Date: Fri Jan 09 2026 - 21:42:41 EST


On Wed, Jan 7, 2026 at 6:26 PM Menglong Dong <menglong8.dong@xxxxxxxxx> wrote:
>
>
> +u64 *bpf_fsession_cookie(void *ctx)
> +{
> + /* This helper call is inlined by verifier. */
> + u64 off = (((u64 *)ctx)[-1] >> BPF_TRAMP_M_COOKIE) & 0xFF;
> +
> + return &((u64 *)ctx)[-off];
> +}

Same question... this can be a comment.
For some of the helpers earlier we kept C functions to make
things work on architectures where JIT is not available,
but kfuncs require JIT, so for kfuncs there is no fallback necessary.