Home
last modified time | relevance | path

Searched refs:bpf (Results 1 – 25 of 61) sorted by relevance

123

/system/sepolicy/prebuilts/api/28.0/private/
Dbpfloader.te1 # bpf program loader
6 # Process need CAP_NET_ADMIN to run bpf programs as cgroup filter
11 # These permission is required for pin bpf program for netd.
18 # Use pinned bpf map files from netd.
19 allow bpfloader netd:bpf { map_read map_write };
20 allow bpfloader self:bpf { prog_load prog_run };
23 neverallow { domain -bpfloader } *:bpf prog_load;
24 neverallow { domain -bpfloader -netd -netutils_wrapper} *:bpf prog_run;
27 # only system_server, netd and bpfloader can read/write the bpf maps
28 neverallow { domain -system_server -netd -bpfloader} netd:bpf { map_read map_write };
Dnetd.te15 allow netd bpfloader:bpf prog_run;
Dnetutils_wrapper.te26 allow netutils_wrapper bpfloader:bpf prog_run;
/system/sepolicy/private/
Dbpfloader.te1 # bpf program loader
6 # These permission is required for pin bpf program for netd.
11 # Allow bpfloader to create bpf maps and programs. The map_read and map_write permission is needed
13 allow bpfloader self:bpf { prog_load prog_run map_read map_write map_create };
20 neverallow { domain -bpfloader } *:bpf { map_create prog_load };
21 neverallow { domain -bpfloader -netd -netutils_wrapper } *:bpf prog_run;
24 # only system_server, netd and bpfloader can read/write the bpf maps
25 neverallow { domain -system_server -netd -bpfloader} *:bpf { map_read map_write };
Dnetd.te13 allow netd bpfloader:bpf { prog_run map_read map_write };
Dnetutils_wrapper.te28 allow netutils_wrapper bpfloader:bpf prog_run;
/system/sepolicy/prebuilts/api/29.0/private/
Dbpfloader.te1 # bpf program loader
6 # These permission is required for pin bpf program for netd.
11 # Allow bpfloader to create bpf maps and programs. The map_read and map_write permission is needed
13 allow bpfloader self:bpf { prog_load prog_run map_read map_write map_create };
20 neverallow { domain -bpfloader } *:bpf { map_create prog_load };
21 neverallow { domain -bpfloader -netd -netutils_wrapper } *:bpf prog_run;
24 # only system_server, netd and bpfloader can read/write the bpf maps
25 neverallow { domain -system_server -netd -bpfloader} *:bpf { map_read map_write };
Dnetd.te13 allow netd bpfloader:bpf { prog_run map_read map_write };
Dnetutils_wrapper.te28 allow netutils_wrapper bpfloader:bpf prog_run;
/system/bpf/bpfloader/
DBpfLoader.cpp67 using android::bpf::BpfMapInfo;
68 using android::bpf::BpfProgInfo;
81 int ret = android::bpf::loadProg(progPath.c_str()); in loadAllElfObjects()
95 if (android::bpf::getBpfSupportLevel() != android::bpf::BpfLevel::NONE) { in main()
/system/bpf/libbpf_android/
DBpfUtils.cpp53 namespace bpf { namespace
74 int bpf(int cmd, Slice bpfAttr) { in bpf() function
88 return bpf(BPF_MAP_CREATE, Slice(&attr, sizeof(attr))); in createMap()
99 return bpf(BPF_MAP_UPDATE_ELEM, Slice(&attr, sizeof(attr))); in writeToMapEntry()
109 return bpf(BPF_MAP_LOOKUP_ELEM, Slice(&attr, sizeof(attr))); in findMapEntry()
118 return bpf(BPF_MAP_DELETE_ELEM, Slice(&attr, sizeof(attr))); in deleteMapEntry()
128 return bpf(BPF_MAP_GET_NEXT_KEY, Slice(&attr, sizeof(attr))); in getNextMapKey()
138 return bpf(BPF_MAP_GET_NEXT_KEY, Slice(&attr, sizeof(attr))); in getFirstMapKey()
153 int ret = bpf(BPF_PROG_LOAD, Slice(&attr, sizeof(attr))); in bpfProgLoad()
171 return bpf(BPF_OBJ_PIN, Slice(&attr, sizeof(attr))); in bpfFdPin()
[all …]
DBpfLoadTest.cpp33 namespace bpf { namespace
46 EXPECT_EQ(android::bpf::loadProg("/system/etc/bpf/bpf_load_tp_prog.o"), 0); in SetUp()
70 android::bpf::BpfMap<uint32_t, uint32_t> m(mMapFd); in checkMapNonZero()
/system/netd/server/
DTrafficController.h34 using android::bpf::BpfMap;
35 using android::bpf::IfaceValue;
36 using android::bpf::StatsKey;
37 using android::bpf::StatsValue;
38 using android::bpf::UidTag;
88 bpf::BpfLevel getBpfLevel();
216 bpf::BpfLevel mBpfLevel;
DClatUtils.cpp66 const int fd = bpf::bpfFdGet(CLAT_INGRESS_MAP_PATH, 0); in getClatIngressMapFd()
71 const int fd = bpf::bpfFdGet( in getClatIngressProgFd()
222 const char bpf[] = BPF; in tcFilterAddDevBpf() local
224 #define ASCIIZ_LEN_BPF sizeof(bpf) in tcFilterAddDevBpf()
DFirewallController.h107 android::bpf::BpfLevel mUseBpfOwnerMatch;
DClatdController.cpp65 using android::bpf::BpfMap;
76 if (bpf::getBpfSupportLevel() == bpf::BpfLevel::NONE) { in init()
92 if (api_level > bpf::MINIMUM_API_REQUIRED) { in init()
DClatdController.h102 bpf::BpfMap<ClatIngressKey, ClatIngressValue> mClatIngressMap GUARDED_BY(mutex);
/system/bpf/libbpf_android/include/bpf/
DBpfUtils.h67 namespace bpf {
118 : BpfMapInfo(dummyFd, android::bpf::mapRetrieve(mapPath, 0)) {} in BpfMapInfo()
169 if (android::bpf::getBpfSupportLevel() == android::bpf::BpfLevel::NONE) { \
177 if (android::bpf::getBpfSupportLevel() != android::bpf::BpfLevel::NONE) return; \
/system/netd/bpf_progs/
DAndroid.bp18 // bpf kernel programs
20 bpf {
33 bpf {
/system/netd/tests/benchmarks/
Dbpf_benchmark.cpp26 using android::bpf::BpfMap;
61 int ret = android::bpf::synchronizeKernelRCU(); in BENCHMARK_DEFINE_F()
/system/bpf/libbpf_android/include/
Dlibbpf_android.h25 namespace bpf {
/system/netd/tests/
Dbpf_base_test.cpp44 namespace bpf { namespace
55 if (android::bpf::getBpfSupportLevel() != android::bpf::BpfLevel::EXTENDED) { \
/system/bpfprogs/
DAndroid.bp17 bpf {
/system/bpfprogs/test/
DAndroid.bp17 bpf {
/system/sepolicy/prebuilts/api/28.0/public/
Dnetd.te108 allow netd self:bpf { map_create map_read map_write };
135 # only netd can create the bpf maps
136 neverallow { domain -netd } netd:bpf { map_create };

123