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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 24 Jun 2016 15:55:24 -0700
From:	William Tu <u9012063@...il.com>
To:	netdev@...r.kernel.org
Subject: [PATCH] samples/bpf: set resource limit to infinity.

Signed-off-by: William Tu <u9012063@...il.com>
---
 samples/bpf/test_maps.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/samples/bpf/test_maps.c b/samples/bpf/test_maps.c
index 47bf085..d2bc96e 100644
--- a/samples/bpf/test_maps.c
+++ b/samples/bpf/test_maps.c
@@ -16,6 +16,7 @@
 #include <assert.h>
 #include <sys/wait.h>
 #include <stdlib.h>
+#include <sys/resource.h>
 #include "libbpf.h"
 
 static int map_flags;
@@ -483,6 +484,9 @@ static void run_all_tests(void)
 
 int main(void)
 {
+	struct rlimit r = {RLIM_INFINITY, RLIM_INFINITY};
+
+	setrlimit(RLIMIT_MEMLOCK, &r);
 	map_flags = 0;
 	run_all_tests();
 	map_flags = BPF_F_NO_PREALLOC;
-- 
2.5.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ