diff options
author | Amery Hung <amery.hung@bytedance.com> | 2025-02-17 11:06:38 -0800 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2025-02-17 18:47:27 -0800 |
commit | 6991ec6beb262b8c21ba3ee1992d7e81d8203769 (patch) | |
tree | 0e2c2700f53e83677b2822d745e448bd9a5a7c17 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | a687df2008f66669deec27f74d1793c8a537a4bd (diff) |
selftests/bpf: Test referenced kptr arguments of struct_ops programs
Test referenced kptr acquired through struct_ops argument tagged with
"__ref". The success case checks whether 1) a reference to the correct
type is acquired, and 2) the referenced kptr argument can be accessed in
multiple paths as long as it hasn't been released. In the fail cases,
we first confirm that a referenced kptr acquried through a struct_ops
argument is not allowed to be leaked. Then, we make sure this new
referenced kptr acquiring mechanism does not accidentally allow referenced
kptrs to flow into global subprograms through their arguments.
Signed-off-by: Amery Hung <amery.hung@bytedance.com>
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Acked-by: Martin KaFai Lau <martin.lau@kernel.org>
Link: https://lore.kernel.org/r/20250217190640.1748177-4-ameryhung@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions