support android-15.0.0_r1
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
From fc8e0b067c5c88ae518709586db9997407c5abc0 Mon Sep 17 00:00:00 2001
|
||||
From: Ziyang Zhou <ziyang.zhou@outlook.com>
|
||||
Date: Thu, 5 Oct 2023 22:18:09 +0800
|
||||
Subject: [PATCH 1/2] fix booting
|
||||
|
||||
---
|
||||
netbpfload/NetBpfLoad.cpp | 8 ++++++--
|
||||
.../com_android_server_connectivity_ClatCoordinator.cpp | 1 +
|
||||
2 files changed, 7 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/netbpfload/NetBpfLoad.cpp b/netbpfload/NetBpfLoad.cpp
|
||||
index e9c6d8a..27ce601 100644
|
||||
--- a/netbpfload/NetBpfLoad.cpp
|
||||
+++ b/netbpfload/NetBpfLoad.cpp
|
||||
@@ -435,12 +435,14 @@ static int doLoad(char** argv, char * const envp[]) {
|
||||
// kernel does not have CONFIG_BPF_JIT=y)
|
||||
// BPF_JIT is required by R VINTF (which means 4.14/4.19/5.4 kernels),
|
||||
// but 4.14/4.19 were released with P & Q, and only 5.4 is new in R+.
|
||||
- if (writeProcSysFile("/proc/sys/net/core/bpf_jit_enable", "1\n")) return 1;
|
||||
+ if (writeProcSysFile("/proc/sys/net/core/bpf_jit_enable", "1\n"))
|
||||
+ ALOGE("write 1 to /proc/sys/net/core/bpf_jit_enable FAILED");
|
||||
|
||||
// Enable JIT kallsyms export for privileged users only
|
||||
// (Note: this (open) will fail with ENOENT 'No such file or directory' if
|
||||
// kernel does not have CONFIG_HAVE_EBPF_JIT=y)
|
||||
- if (writeProcSysFile("/proc/sys/net/core/bpf_jit_kallsyms", "1\n")) return 1;
|
||||
+ if (writeProcSysFile("/proc/sys/net/core/bpf_jit_kallsyms", "1\n"))
|
||||
+ ALOGE("write 1 to /proc/sys/net/core/bpf_jit_kallsyms FAILED");
|
||||
}
|
||||
|
||||
// Create all the pin subdirectories
|
||||
@@ -465,9 +467,11 @@ static int doLoad(char** argv, char * const envp[]) {
|
||||
ALOGE("If this triggers reliably, you're probably missing kernel options or patches.");
|
||||
ALOGE("If this triggers randomly, you might be hitting some memory allocation "
|
||||
"problems or startup script race.");
|
||||
+ #if 0
|
||||
ALOGE("--- DO NOT EXPECT SYSTEM TO BOOT SUCCESSFULLY ---");
|
||||
sleep(20);
|
||||
return 2;
|
||||
+ #endif
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/service/jni/com_android_server_connectivity_ClatCoordinator.cpp b/service/jni/com_android_server_connectivity_ClatCoordinator.cpp
|
||||
index c0082bb..6144b21 100644
|
||||
--- a/service/jni/com_android_server_connectivity_ClatCoordinator.cpp
|
||||
+++ b/service/jni/com_android_server_connectivity_ClatCoordinator.cpp
|
||||
@@ -132,6 +132,7 @@ static void verifyClatPerms() {
|
||||
|
||||
#undef V2
|
||||
|
||||
+ fatal = false;
|
||||
if (fatal) abort();
|
||||
}
|
||||
|
||||
--
|
||||
2.45.1
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
From da6a3860532462775369a3ef376bce0e278ebfc8 Mon Sep 17 00:00:00 2001
|
||||
From: Ziyang Zhou <ziyang.zhou@outlook.com>
|
||||
Date: Thu, 5 Sep 2024 19:11:19 +0800
|
||||
Subject: [PATCH 2/2] ignore nativeSynchronizeKernelRCU error
|
||||
|
||||
---
|
||||
.../native/bpfmapjni/com_android_net_module_util_BpfMap.cpp | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/staticlibs/native/bpfmapjni/com_android_net_module_util_BpfMap.cpp b/staticlibs/native/bpfmapjni/com_android_net_module_util_BpfMap.cpp
|
||||
index 1923ceb..3c143f5 100644
|
||||
--- a/staticlibs/native/bpfmapjni/com_android_net_module_util_BpfMap.cpp
|
||||
+++ b/staticlibs/native/bpfmapjni/com_android_net_module_util_BpfMap.cpp
|
||||
@@ -141,7 +141,6 @@ static void com_android_net_module_util_BpfMap_nativeSynchronizeKernelRCU(JNIEnv
|
||||
const int pfSocket = socket(AF_KEY, SOCK_RAW | SOCK_CLOEXEC, PF_KEY_V2);
|
||||
|
||||
if (pfSocket < 0) {
|
||||
- jniThrowErrnoException(env, "nativeSynchronizeKernelRCU:socket", errno);
|
||||
return;
|
||||
}
|
||||
|
||||
--
|
||||
2.45.1
|
||||
|
||||
Reference in New Issue
Block a user