Merge "bpfloader: Android V requires kernel 4.19+" into main am: 61b8ba3611 am: fd80e33468 am: e8e0a7fbe7

Original change: https://android-review.googlesource.com/c/platform/system/bpf/+/2749573

Change-Id: I86e2dcfccbfb803825c7256ffad9360fc89cbb17
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/bpfloader/BpfLoader.cpp b/bpfloader/BpfLoader.cpp
index fe51ed5..e1dbd06 100644
--- a/bpfloader/BpfLoader.cpp
+++ b/bpfloader/BpfLoader.cpp
@@ -251,6 +251,11 @@
     (void)argc;
     android::base::InitLogging(argv, &android::base::KernelLogger);
 
+    if (!android::bpf::isAtLeastKernelVersion(4, 19, 0)) {
+        ALOGE("Android V requires kernel 4.19.");
+        return 1;
+    }
+
     // Ensure we can determine the Android build type.
     if (!android::bpf::isEng() && !android::bpf::isUser() && !android::bpf::isUserdebug()) {
         ALOGE("Failed to determine the build type: got %s, want 'eng', 'user', or 'userdebug'",