From 98ec8cf05b8a00bf94f6318850a4f8af77927699 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20=C5=BBenczykowski?= Date: Tue, 21 Jun 2022 09:41:59 -0700 Subject: [PATCH] Revert "disable bpfloader selinux_context support" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 8e5e239dd0a7856e486a9e2d772ef3a9e38021eb. No longer required now that selinux change has landed. (while we're at it bump the bpfloader version to v0.19 just to make sure we can tell these apart in the future) This is a cherrypick to tm-dev of reviewed/approved but unsubmitted: https://android-review.googlesource.com/c/platform/system/bpf/+/2132534 Ignore-AOSP-First: will be cherrypicked to aosp master Bug: 218408035 Test: TreeHugger Signed-off-by: Maciej Żenczykowski Change-Id: I0b3349ef908bbfd225b8b7f83b2a4a8870c1e409 --- libbpf_android/Loader.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/libbpf_android/Loader.cpp b/libbpf_android/Loader.cpp index e5eb29a..47cf4c9 100644 --- a/libbpf_android/Loader.cpp +++ b/libbpf_android/Loader.cpp @@ -30,9 +30,9 @@ #include #include -// This is BpfLoader v0.18 +// This is BpfLoader v0.19 #define BPFLOADER_VERSION_MAJOR 0u -#define BPFLOADER_VERSION_MINOR 18u +#define BPFLOADER_VERSION_MINOR 19u #define BPFLOADER_VERSION ((BPFLOADER_VERSION_MAJOR << 16) | BPFLOADER_VERSION_MINOR) #include "bpf/BpfUtils.h" @@ -792,8 +792,6 @@ static int createMaps(const char* elfPath, ifstream& elfFile, vector& ALOGI("map %s selinux_context [%32s] -> %d -> '%s' (%s)", mapNames[i].c_str(), md[i].selinux_context, selinux_context, lookupSelinuxContext(selinux_context), lookupPinSubdir(selinux_context)); - // temp disable until selinux grants bpfloader 'rename' priv - selinux_context = domain::unspecified; } domain pin_subdir = getDomainFromPinSubdir(md[i].pin_subdir); @@ -1020,8 +1018,6 @@ static int loadCodeSections(const char* elfPath, vector& cs, const ALOGI("prog %s selinux_context [%32s] -> %d -> '%s' (%s)", name.c_str(), cs[i].prog_def->selinux_context, selinux_context, lookupSelinuxContext(selinux_context), lookupPinSubdir(selinux_context)); - // temp disable until selinux grants bpfloader 'rename' priv - selinux_context = domain::unspecified; } if (specified(pin_subdir)) {