summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChenbo Feng <fengc@google.com>2019-04-09 12:04:33 -0700
committerChenbo Feng <fengc@google.com>2019-04-10 11:41:31 -0700
commitccf071ca076494ebebc27416ad3734cc05233bb9 (patch)
treec6106741964eee52bb6786bb223c54b1bf390a8c
parentd9c4dc24865be6758d46bcd76b50205391516963 (diff)
downloadandroid_system_bpf-ccf071ca076494ebebc27416ad3734cc05233bb9.tar.gz
android_system_bpf-ccf071ca076494ebebc27416ad3734cc05233bb9.tar.bz2
android_system_bpf-ccf071ca076494ebebc27416ad3734cc05233bb9.zip
Set bpfloader MEMLOCK rlimit to at least 8MB
Since bpfloader is only used to create the bpf maps and load bpf programs on android devices. It is okay to set the MEMLOCK rlimit of bpfloader to the proper size needed by bpf maps regardless of the global device values. It helps partner to adopt the bpf feature without changing the device configuration. Bug: 119279144 Bug: 129246448 Test: remove device specific rlimit and build and verify bpf maps created. Change-Id: Ib97d1d304f4ea9a6215afed76e1c1e28f1415221 Merged-In: Ib97d1d304f4ea9a6215afed76e1c1e28f1415221 (Cherry-pick from commit ee121646cf60988e69eb2c8b1e87e11f5e4932cc)
-rw-r--r--bpfloader/bpfloader.rc2
1 files changed, 2 insertions, 0 deletions
diff --git a/bpfloader/bpfloader.rc b/bpfloader/bpfloader.rc
index eb8bd25..7ac145d 100644
--- a/bpfloader/bpfloader.rc
+++ b/bpfloader/bpfloader.rc
@@ -1,4 +1,6 @@
service bpfloader /system/bin/bpfloader
class main
capabilities SYS_ADMIN
+ # Set RLIMIT_MEMLOCK to 8MB for bpfloader
+ rlimit memlock 8388608 8388608
oneshot