Thread (21 messages) 21 messages, 3 authors, 2026-01-10

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

From: Menglong Dong <hidden>
Date: 2026-01-10 03:38:35
Also in: bpf, lkml

On 2026/1/10 10:42, Alexei Starovoitov wrote:
On Wed, Jan 7, 2026 at 6:26 PM Menglong Dong [off-list ref] wrote:
quoted

+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.
Yeah, it make sense.


Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help