diff options
| author | Menglong Dong <menglong8.dong@gmail.com> | 2026-01-24 09:19:59 +0300 |
|---|---|---|
| committer | Alexei Starovoitov <ast@kernel.org> | 2026-01-25 05:49:36 +0300 |
| commit | 27d89baa6da8e5e546585c53a959176d1302d46e (patch) | |
| tree | f178ab25c80a0d7b6ce4c8e6b649c0f26fffee2d /include/linux/debugobjects.h | |
| parent | 8fe4dc4f6456b3d2c9e6f8aeb1f978b7bff0f6c8 (diff) | |
| download | linux-27d89baa6da8e5e546585c53a959176d1302d46e.tar.xz | |
bpf: support fsession for bpf_session_is_return
If fsession exists, we will use the bit (1 << BPF_TRAMP_IS_RETURN_SHIFT)
in ((u64 *)ctx)[-1] to store the "is_return" flag.
The logic of bpf_session_is_return() for fsession is implemented in the
verifier by inline following code:
bool bpf_session_is_return(void *ctx)
{
return (((u64 *)ctx)[-1] >> BPF_TRAMP_IS_RETURN_SHIFT) & 1;
}
Signed-off-by: Menglong Dong <dongml2@chinatelecom.cn>
Co-developed-by: Leon Hwang <leon.hwang@linux.dev>
Signed-off-by: Leon Hwang <leon.hwang@linux.dev>
Link: https://lore.kernel.org/r/20260124062008.8657-5-dongml2@chinatelecom.cn
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions
