summaryrefslogtreecommitdiff
path: root/tools/bpf
diff options
context:
space:
mode:
authorTiezhu Yang <yangtiezhu@loongson.cn>2023-02-24 13:36:55 +0300
committerAndrii Nakryiko <andrii@kernel.org>2023-02-27 20:49:40 +0300
commit84c22fa83f9cb97061359f97d85f53a9ccde02c4 (patch)
treed18ee042f73734922ffa12a06bc8aee96e359e13 /tools/bpf
parent29c66ad1c3ad1698becf81182f73fb4bd50bceb2 (diff)
downloadlinux-84c22fa83f9cb97061359f97d85f53a9ccde02c4.tar.xz
selftests/bpf: Use __NR_prlimit64 instead of __NR_getrlimit in user_ringbuf test
After commit 80d7da1cac62 ("asm-generic: Drop getrlimit and setrlimit syscalls from default list"), new architectures won't need to include getrlimit and setrlimit, they are superseded with prlimit64. In order to maintain compatibility for the new architectures, such as LoongArch which does not define __NR_getrlimit, it is better to use __NR_prlimit64 instead of __NR_getrlimit in user_ringbuf test to fix the following build error: TEST-OBJ [test_progs] user_ringbuf.test.o tools/testing/selftests/bpf/prog_tests/user_ringbuf.c: In function 'kick_kernel_cb': tools/testing/selftests/bpf/prog_tests/user_ringbuf.c:593:17: error: '__NR_getrlimit' undeclared (first use in this function) 593 | syscall(__NR_getrlimit); | ^~~~~~~~~~~~~~ tools/testing/selftests/bpf/prog_tests/user_ringbuf.c:593:17: note: each undeclared identifier is reported only once for each function it appears in make: *** [Makefile:573: tools/testing/selftests/bpf/user_ringbuf.test.o] Error 1 make: Leaving directory 'tools/testing/selftests/bpf' Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/1677235015-21717-4-git-send-email-yangtiezhu@loongson.cn
Diffstat (limited to 'tools/bpf')
0 files changed, 0 insertions, 0 deletions