NetBpfLoad: require 64-bit kernel 6.7+

Note that this is a no-op for everything before sdk=36+,
since V/sdk=35 only supports up to 6.6 LTS anyway.

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I701045074dfb7b0c586536634e210318b5af364b
This commit is contained in:
Maciej Żenczykowski 2024-09-03 16:08:35 -07:00
commit 9b6a994984

View file

@ -1460,6 +1460,12 @@ static int doLoad(char** argv, char * const envp[]) {
if (!isTV()) return 1;
}
// 6.6 is highest version supported by Android V, so this is effectively W+ (sdk=36+)
if (isKernel32Bit() && isAtLeastKernelVersion(6, 7, 0)) {
ALOGE("Android platform with 32 bit kernel version >= 6.7.0 is unsupported");
return 1;
}
// Various known ABI layout issues, particularly wrt. bpf and ipsec/xfrm.
if (isAtLeastV && isKernel32Bit() && isX86()) {
ALOGE("Android V requires X86 kernel to be 64-bit.");