From ccf071ca076494ebebc27416ad3734cc05233bb9 Mon Sep 17 00:00:00 2001 From: Chenbo Feng Date: Tue, 9 Apr 2019 12:04:33 -0700 Subject: 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) --- bpfloader/bpfloader.rc | 2 ++ 1 file changed, 2 insertions(+) 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 -- cgit v1.2.3