diff options
author | Yonghong Song <[email protected]> | 2022-11-20 11:54:32 -0800 |
---|---|---|
committer | Alexei Starovoitov <[email protected]> | 2022-11-20 15:43:37 -0800 |
commit | fd264ca020948a743e4c36731dfdecc4a812153c (patch) | |
tree | 9a615b76021a3dcebdd178438bab629077e14962 /tools/perf/scripts/python/sctop.py | |
parent | cfe1456440c8feaf6558577a400745d774418379 (diff) |
bpf: Add a kfunc to type cast from bpf uapi ctx to kernel ctx
Implement bpf_cast_to_kern_ctx() kfunc which does a type cast
of a uapi ctx object to the corresponding kernel ctx. Previously
if users want to access some data available in kctx but not
in uapi ctx, bpf_probe_read_kernel() helper is needed.
The introduction of bpf_cast_to_kern_ctx() allows direct
memory access which makes code simpler and easier to understand.
Signed-off-by: Yonghong Song <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/sctop.py')
0 files changed, 0 insertions, 0 deletions