Merge "BpfLoader v0.28 - if (map.zero != 0) abort()"

This commit is contained in:
Treehugger Robot 2022-07-21 23:52:07 +00:00 committed by Gerrit Code Review
commit 15f1bf8928

View file

@ -30,9 +30,9 @@
#include <sys/wait.h> #include <sys/wait.h>
#include <unistd.h> #include <unistd.h>
// This is BpfLoader v0.27 // This is BpfLoader v0.28
#define BPFLOADER_VERSION_MAJOR 0u #define BPFLOADER_VERSION_MAJOR 0u
#define BPFLOADER_VERSION_MINOR 27u #define BPFLOADER_VERSION_MINOR 28u
#define BPFLOADER_VERSION ((BPFLOADER_VERSION_MAJOR << 16) | BPFLOADER_VERSION_MINOR) #define BPFLOADER_VERSION ((BPFLOADER_VERSION_MAJOR << 16) | BPFLOADER_VERSION_MINOR)
#include "bpf/BpfUtils.h" #include "bpf/BpfUtils.h"
@ -737,6 +737,8 @@ static int createMaps(const char* elfPath, ifstream& elfFile, vector<unique_fd>&
} }
for (int i = 0; i < (int)mapNames.size(); i++) { for (int i = 0; i < (int)mapNames.size(); i++) {
if (md[i].zero != 0) abort();
if (BPFLOADER_VERSION < md[i].bpfloader_min_ver) { if (BPFLOADER_VERSION < md[i].bpfloader_min_ver) {
ALOGI("skipping map %s which requires bpfloader min ver 0x%05x", mapNames[i].c_str(), ALOGI("skipping map %s which requires bpfloader min ver 0x%05x", mapNames[i].c_str(),
md[i].bpfloader_min_ver); md[i].bpfloader_min_ver);