diff options
| author | Amery Hung <ameryhung@gmail.com> | 2025-12-03 15:37:47 -0800 |
|---|---|---|
| committer | Andrii Nakryiko <andrii@kernel.org> | 2025-12-05 16:17:58 -0800 |
| commit | 04fd12df4e05dd6fd3017b637f6fbc9da10b4e65 (patch) | |
| tree | 7c385a945e5f39875943c9b29473df20589f6b0f /include/linux | |
| parent | 33a165f9c2c1b9ddceaaccc356ce841baf1a08a2 (diff) | |
selftests/bpf: Test ambiguous associated struct_ops
Add a test to make sure implicit struct_ops association does not
break backward compatibility nor return incorrect struct_ops.
struct_ops programs should still be allowed to be reused in
different struct_ops map. The associated struct_ops map set implicitly
however will be poisoned. Trying to read it through the helper
bpf_prog_get_assoc_struct_ops() should result in a NULL pointer.
While recursion of test_1() cannot happen due to the associated
struct_ops being ambiguois, explicitly check for it to prevent stack
overflow if the test regresses.
Signed-off-by: Amery Hung <ameryhung@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20251203233748.668365-6-ameryhung@gmail.com
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions
