NetBpfLoad: require 64-bit userspace on 6.7+ (sdk=36+)

This duplicates the previous check, but without the exceptions.

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Id83695689268baacd1112821fa3fd212c3aa0bb6
This commit is contained in:
Maciej Żenczykowski 2024-09-03 15:46:48 -07:00
commit 21b4a05c73

View file

@ -1523,6 +1523,12 @@ static int doLoad(char** argv, char * const envp[]) {
if (!isTV() && !(isWear() && isArm())) return 1;
}
// Note: 6.6 is highest version supported by Android V (sdk=35), so this is for sdk=36+
if (isUserspace32bit() && isAtLeastKernelVersion(6, 7, 0)) {
ALOGE("64-bit userspace required on 6.7+ kernels.");
return 1;
}
// Ensure we can determine the Android build type.
if (!isEng() && !isUser() && !isUserdebug()) {
ALOGE("Failed to determine the build type: got %s, want 'eng', 'user', or 'userdebug'",