lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sun, 3 Apr 2022 14:42:54 +0000 From: Yafang Shao <laoar.shao@...il.com> To: ast@...nel.org, daniel@...earbox.net, andrii@...nel.org, kafai@...com, songliubraving@...com, yhs@...com, john.fastabend@...il.com, kpsingh@...nel.org Cc: netdev@...r.kernel.org, bpf@...r.kernel.org, Yafang Shao <laoar.shao@...il.com> Subject: [PATCH bpf-next v2 3/9] bpf: selftests: Use bpf strict all ctor in xdpxceiver Avoid using the deprecated RLIMIT_MEMLOCK. Signed-off-by: Yafang Shao <laoar.shao@...il.com> --- tools/testing/selftests/bpf/xdpxceiver.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tools/testing/selftests/bpf/xdpxceiver.c b/tools/testing/selftests/bpf/xdpxceiver.c index 5f8296d29e77..1be14e0c236e 100644 --- a/tools/testing/selftests/bpf/xdpxceiver.c +++ b/tools/testing/selftests/bpf/xdpxceiver.c @@ -90,13 +90,14 @@ #include <string.h> #include <stddef.h> #include <sys/mman.h> -#include <sys/resource.h> #include <sys/types.h> #include <sys/queue.h> #include <time.h> #include <unistd.h> #include <stdatomic.h> #include <bpf/xsk.h> + +#include "bpf_rlimit.h" #include "xdpxceiver.h" #include "../kselftest.h" @@ -1448,15 +1449,11 @@ static void ifobject_delete(struct ifobject *ifobj) int main(int argc, char **argv) { - struct rlimit _rlim = { RLIM_INFINITY, RLIM_INFINITY }; struct pkt_stream *pkt_stream_default; struct ifobject *ifobj_tx, *ifobj_rx; struct test_spec test; u32 i, j; - if (setrlimit(RLIMIT_MEMLOCK, &_rlim)) - exit_with_error(errno); - ifobj_tx = ifobject_create(); if (!ifobj_tx) exit_with_error(ENOMEM); -- 2.17.1
Powered by blists - more mailing lists