Skip to content

Commit 67785bf

Browse files
committed
selftests/bpf: Fix iters/task_vma test failure on arm32
Add support on arm32 for using the special VMA "[vectors]" to signal end of the proc/PID/maps list, rather than previous default "[vsyscall]". Signed-off-by: Tony Ambardar <[email protected]>
1 parent e3c5e9a commit 67785bf

File tree

1 file changed

+6
-0
lines changed
  • tools/testing/selftests/bpf/prog_tests

1 file changed

+6
-0
lines changed

tools/testing/selftests/bpf/prog_tests/iters.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,18 @@ static void subtest_task_vma_iters(void)
134134

135135
seen = 0;
136136
while (fscanf(f, "%lx-%lx %[^\n]\n", &start, &end, rest_of_line) == 3) {
137+
#if defined(__arm__)
138+
/* [vectors] is the terminal special VMA on ARM32 */
139+
if (strstr(rest_of_line, "[vectors]"))
140+
continue;
141+
#else
137142
/* [vsyscall] vma isn't _really_ part of task->mm vmas.
138143
* /proc/PID/maps returns it when out of vmas - see get_gate_vma
139144
* calls in fs/proc/task_mmu.c
140145
*/
141146
if (strstr(rest_of_line, "[vsyscall]"))
142147
continue;
148+
#endif
143149

144150
bpf_iter_start = skel->bss->vm_ranges[seen].vm_start;
145151
bpf_iter_end = skel->bss->vm_ranges[seen].vm_end;

0 commit comments

Comments
 (0)