bpf: add minimal support for sdk=36
Test: TreeHugger Signed-off-by: Maciej Żenczykowski <maze@google.com> Change-Id: Ib94ed340712b662072eee50d8f1deb9f6fe20b55
This commit is contained in:
parent
726b58fd19
commit
de7374d850
2 changed files with 8 additions and 3 deletions
|
|
@ -50,18 +50,21 @@
|
|||
// Note: this value (and the following +1u's) are hardcoded in NetBpfLoad.cpp
|
||||
#define BPFLOADER_MAINLINE_VERSION 42u
|
||||
|
||||
// Android Mainline BpfLoader when running on Android T
|
||||
// Android Mainline BpfLoader when running on Android T (sdk=33)
|
||||
#define BPFLOADER_MAINLINE_T_VERSION (BPFLOADER_MAINLINE_VERSION + 1u)
|
||||
|
||||
// Android Mainline BpfLoader when running on Android U
|
||||
// Android Mainline BpfLoader when running on Android U (sdk=34)
|
||||
#define BPFLOADER_MAINLINE_U_VERSION (BPFLOADER_MAINLINE_T_VERSION + 1u)
|
||||
|
||||
// Android Mainline BpfLoader when running on Android U QPR3
|
||||
#define BPFLOADER_MAINLINE_U_QPR3_VERSION (BPFLOADER_MAINLINE_U_VERSION + 1u)
|
||||
|
||||
// Android Mainline BpfLoader when running on Android V
|
||||
// Android Mainline BpfLoader when running on Android V (sdk=35)
|
||||
#define BPFLOADER_MAINLINE_V_VERSION (BPFLOADER_MAINLINE_U_QPR3_VERSION + 1u)
|
||||
|
||||
// Android Mainline BpfLoader when running on Android W (sdk=36)
|
||||
#define BPFLOADER_MAINLINE_W_VERSION (BPFLOADER_MAINLINE_V_VERSION + 1u)
|
||||
|
||||
/* For mainline module use, you can #define BPFLOADER_{MIN/MAX}_VER
|
||||
* before #include "bpf_helpers.h" to change which bpfloaders will
|
||||
* process the resulting .o file.
|
||||
|
|
|
|||
|
|
@ -1397,6 +1397,7 @@ static int doLoad(char** argv, char * const envp[]) {
|
|||
const bool isAtLeastT = (effective_api_level >= __ANDROID_API_T__);
|
||||
const bool isAtLeastU = (effective_api_level >= __ANDROID_API_U__);
|
||||
const bool isAtLeastV = (effective_api_level >= __ANDROID_API_V__);
|
||||
const bool isAtLeastW = (effective_api_level > __ANDROID_API_V__); // TODO: switch to W
|
||||
|
||||
// last in U QPR2 beta1
|
||||
const bool has_platform_bpfloader_rc = exists("/system/etc/init/bpfloader.rc");
|
||||
|
|
@ -1409,6 +1410,7 @@ static int doLoad(char** argv, char * const envp[]) {
|
|||
if (isAtLeastU) ++bpfloader_ver; // [44] BPFLOADER_MAINLINE_U_VERSION
|
||||
if (runningAsRoot) ++bpfloader_ver; // [45] BPFLOADER_MAINLINE_U_QPR3_VERSION
|
||||
if (isAtLeastV) ++bpfloader_ver; // [46] BPFLOADER_MAINLINE_V_VERSION
|
||||
if (isAtLeastW) ++bpfloader_ver; // [47] BPFLOADER_MAINLINE_W_VERSION
|
||||
|
||||
ALOGI("NetBpfLoad v0.%u (%s) api:%d/%d kver:%07x (%s) uid:%d rc:%d%d",
|
||||
bpfloader_ver, argv[0], android_get_device_api_level(), effective_api_level,
|
||||
|
|
|
|||
Loading…
Reference in a new issue