diff options
| author | Dave Marchevsky <[email protected]> | 2023-10-13 20:44:25 +0000 |
|---|---|---|
| committer | Andrii Nakryiko <[email protected]> | 2023-10-13 22:48:58 +0000 |
| commit | e0e1a7a5fc377d54bd792c6368a375d41fc316ef (patch) | |
| tree | f8e5d4265acfb8d1a0d074ca8188cbd8e86c4105 /tools/testing/selftests/bpf/prog_tests/sockmap_basic.c | |
| parent | bpf: Introduce task_vma open-coded iterator kfuncs (diff) | |
| download | kernel-e0e1a7a5fc377d54bd792c6368a375d41fc316ef.tar.gz kernel-e0e1a7a5fc377d54bd792c6368a375d41fc316ef.zip | |
selftests/bpf: Add tests for open-coded task_vma iter
The open-coded task_vma iter added earlier in this series allows for
natural iteration over a task's vmas using existing open-coded iter
infrastructure, specifically bpf_for_each.
This patch adds a test demonstrating this pattern and validating
correctness. The vma->vm_start and vma->vm_end addresses of the first
1000 vmas are recorded and compared to /proc/PID/maps output. As
expected, both see the same vmas and addresses - with the exception of
the [vsyscall] vma - which is explained in a comment in the prog_tests
program.
Signed-off-by: Dave Marchevsky <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/sockmap_basic.c')
0 files changed, 0 insertions, 0 deletions
