NetBpfLoad: on 25Q2+ force 64-bit kernel

This intentionally does not block 32-bit userspace,
but it does mean existing 32-on-32 devices will need to
upgrade to 32-on-64 to upgrade to 25Q2+.  Even Wear/TV.

This will allow us to unconditionally start using 64-bit
cli binaries for network admin tasks and avoid the entire
insanity that is 32-bit kernel net admin ABI of
iptables/netfilter & xfrm/ipsec.

Note: on at least x86 there's already code in netd that is outright incorrect if the kernel is not 64-bit.

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I9c18f82b38adeb223ffe3c6aebda50f057f3c818
diff --git a/bpf/loader/NetBpfLoad.cpp b/bpf/loader/NetBpfLoad.cpp
index 04d7492..1e088a6 100644
--- a/bpf/loader/NetBpfLoad.cpp
+++ b/bpf/loader/NetBpfLoad.cpp
@@ -1490,6 +1490,11 @@
         if (!isTV()) return 1;
     }
 
+    if (isKernel32Bit() && isAtLeast25Q2) {
+        ALOGE("Android 25Q2 requires 64 bit kernel.");
+        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");