rlimits: increase memlock limit [1/1]
authorHanjie Lin <hanjie.lin@amlogic.com>
Fri, 26 Oct 2018 08:23:34 +0000 (16:23 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Sat, 27 Oct 2018 15:28:25 +0000 (08:28 -0700)
PD#SWPL-982

Problem:
CtsHostsideNetworkTests module 22 fail
netd can't create bpf map because of memlock limit

Solution:
increase memlock limit

Verify:
p212

Change-Id: Ia770fce7d826c639b171f8e8807425202de58320
Signed-off-by: Hanjie Lin <hanjie.lin@amlogic.com>
include/uapi/linux/resource.h

index 36fb3b5..71eecd3 100644 (file)
@@ -64,11 +64,15 @@ struct rlimit64 {
  */
 #define _STK_LIM       (8*1024*1024)
 
+#ifdef CONFIG_AMLOGIC_MODIFY
+#define MLOCK_LIMIT    (8*1024*1024)
+#else
 /*
  * GPG2 wants 64kB of mlocked memory, to make sure pass phrases
  * and other sensitive information are never written to disk.
  */
 #define MLOCK_LIMIT    ((PAGE_SIZE > 64*1024) ? PAGE_SIZE : 64*1024)
+#endif
 
 /*
  * Due to binary compatibility, the actual resource numbers