netbpfload: remove support for 'platform'
Test: N/A Signed-off-by: Maciej Żenczykowski <maze@google.com> Change-Id: Ia0c1f55aa78435737699e0dec0bfddbd977e7392
This commit is contained in:
parent
20556ef70a
commit
0e4802df20
3 changed files with 0 additions and 24 deletions
|
@ -93,18 +93,6 @@ constexpr bpf_prog_type kTetheringApexAllowedProgTypes[] = {
|
|||
BPF_PROG_TYPE_XDP,
|
||||
};
|
||||
|
||||
// Networking-related program types are limited to the Tethering Apex
|
||||
// to prevent things from breaking due to conflicts on mainline updates
|
||||
// (exception made for socket filters, ie. xt_bpf for potential use in iptables,
|
||||
// or for attaching to sockets directly)
|
||||
constexpr bpf_prog_type kPlatformAllowedProgTypes[] = {
|
||||
BPF_PROG_TYPE_KPROBE,
|
||||
BPF_PROG_TYPE_PERF_EVENT,
|
||||
BPF_PROG_TYPE_SOCKET_FILTER,
|
||||
BPF_PROG_TYPE_TRACEPOINT,
|
||||
BPF_PROG_TYPE_UNSPEC, // Will be replaced with fuse bpf program type
|
||||
};
|
||||
|
||||
// see b/162057235. For arbitrary program types, the concern is that due to the lack of
|
||||
// SELinux access controls over BPF program attachpoints, we have no way to control the
|
||||
// attachment of programs to shared resources (or to detect when a shared resource
|
||||
|
@ -157,14 +145,6 @@ const android::bpf::Location locations[] = {
|
|||
.allowedProgTypes = kTetheringApexAllowedProgTypes,
|
||||
.allowedProgTypesLength = arraysize(kTetheringApexAllowedProgTypes),
|
||||
},
|
||||
// Core operating system
|
||||
{
|
||||
.dir = "/system/etc/bpf/",
|
||||
.prefix = "",
|
||||
.allowedDomainBitmask = domainToBitmask(domain::platform),
|
||||
.allowedProgTypes = kPlatformAllowedProgTypes,
|
||||
.allowedProgTypesLength = arraysize(kPlatformAllowedProgTypes),
|
||||
},
|
||||
// Vendor operating system
|
||||
{
|
||||
.dir = "/vendor/etc/bpf/",
|
||||
|
|
|
@ -98,7 +98,6 @@ static unsigned int page_size = static_cast<unsigned int>(getpagesize());
|
|||
constexpr const char* lookupSelinuxContext(const domain d, const char* const unspecified = "") {
|
||||
switch (d) {
|
||||
case domain::unspecified: return unspecified;
|
||||
case domain::platform: return "fs_bpf";
|
||||
case domain::tethering: return "fs_bpf_tethering";
|
||||
case domain::net_private: return "fs_bpf_net_private";
|
||||
case domain::net_shared: return "fs_bpf_net_shared";
|
||||
|
@ -130,7 +129,6 @@ domain getDomainFromSelinuxContext(const char s[BPF_SELINUX_CONTEXT_CHAR_ARRAY_S
|
|||
constexpr const char* lookupPinSubdir(const domain d, const char* const unspecified = "") {
|
||||
switch (d) {
|
||||
case domain::unspecified: return unspecified;
|
||||
case domain::platform: return "/";
|
||||
case domain::tethering: return "tethering/";
|
||||
case domain::net_private: return "net_private/";
|
||||
case domain::net_shared: return "net_shared/";
|
||||
|
|
|
@ -39,7 +39,6 @@ namespace bpf {
|
|||
enum class domain : int {
|
||||
unrecognized = -1, // invalid for this version of the bpfloader
|
||||
unspecified = 0, // means just use the default for that specific pin location
|
||||
platform, // fs_bpf /sys/fs/bpf
|
||||
tethering, // (S+) fs_bpf_tethering /sys/fs/bpf/tethering
|
||||
net_private, // (T+) fs_bpf_net_private /sys/fs/bpf/net_private
|
||||
net_shared, // (T+) fs_bpf_net_shared /sys/fs/bpf/net_shared
|
||||
|
@ -52,7 +51,6 @@ enum class domain : int {
|
|||
// Note: this does not include domain::unrecognized, but does include domain::unspecified
|
||||
static constexpr domain AllDomains[] = {
|
||||
domain::unspecified,
|
||||
domain::platform,
|
||||
domain::tethering,
|
||||
domain::net_private,
|
||||
domain::net_shared,
|
||||
|
|
Loading…
Reference in a new issue