summaryrefslogtreecommitdiff
path: root/tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorMenglong Dong <menglong8.dong@gmail.com>2026-01-24 14:20:00 +0800
committerAlexei Starovoitov <ast@kernel.org>2026-01-24 18:49:36 -0800
commiteeee4239dbb155a98f8ba737324ac081acde8417 (patch)
treee08fd21e3c1bb4e9f15d5214f5d8988b032128b3 /tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git
parent27d89baa6da8e5e546585c53a959176d1302d46e (diff)
bpf: support fsession for bpf_session_cookie
Implement session cookie for fsession. The session cookies will be stored in the stack, and the layout of the stack will look like this: return value -> 8 bytes argN -> 8 bytes ... arg1 -> 8 bytes nr_args -> 8 bytes ip (optional) -> 8 bytes cookie2 -> 8 bytes cookie1 -> 8 bytes The offset of the cookie for the current bpf program, which is in 8-byte units, is stored in the "(((u64 *)ctx)[-1] >> BPF_TRAMP_COOKIE_INDEX_SHIFT) & 0xFF". Therefore, we can get the session cookie with ((u64 *)ctx)[-offset]. Implement and inline the bpf_session_cookie() for the fsession in the verifier. Signed-off-by: Menglong Dong <dongml2@chinatelecom.cn> Link: https://lore.kernel.org/r/20260124062008.8657-6-dongml2@chinatelecom.cn Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions