android-12.0.0_r32 patches
This commit is contained in:
27
android-12.0.0_r32/system/bpf/0001-fix-booting.patch
Normal file
27
android-12.0.0_r32/system/bpf/0001-fix-booting.patch
Normal file
@@ -0,0 +1,27 @@
|
||||
From 78c4b1ca9a702262ceff38a9976c17148b2aa084 Mon Sep 17 00:00:00 2001
|
||||
From: Ziyang Zhou <ziyang.zhou@outlook.com>
|
||||
Date: Sat, 26 Jun 2021 05:22:01 +0800
|
||||
Subject: [PATCH] fix booting
|
||||
|
||||
---
|
||||
bpfloader/BpfLoader.cpp | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/bpfloader/BpfLoader.cpp b/bpfloader/BpfLoader.cpp
|
||||
index 7a68894..072f153 100644
|
||||
--- a/bpfloader/BpfLoader.cpp
|
||||
+++ b/bpfloader/BpfLoader.cpp
|
||||
@@ -121,8 +121,10 @@ int main() {
|
||||
ALOGE("If this triggers randomly, you might be hitting some memory allocation "
|
||||
"problems or startup script race.");
|
||||
ALOGE("--- DO NOT EXPECT SYSTEM TO BOOT SUCCESSFULLY ---");
|
||||
+#if 0 // HACKED
|
||||
sleep(20);
|
||||
return 2;
|
||||
+#endif
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.34.1
|
||||
|
||||
135
android-12.0.0_r32/system/core/0001-fix-booting.patch
Normal file
135
android-12.0.0_r32/system/core/0001-fix-booting.patch
Normal file
@@ -0,0 +1,135 @@
|
||||
From 5f2ace364ccf3b8f444673b6b6d02c8fb0faab82 Mon Sep 17 00:00:00 2001
|
||||
From: Ziyang Zhou <ziyang.zhou@outlook.com>
|
||||
Date: Sun, 9 May 2021 23:09:00 +0800
|
||||
Subject: [PATCH 1/8] fix booting
|
||||
|
||||
---
|
||||
init/first_stage_init.cpp | 20 ++++++++++++++++----
|
||||
init/init.cpp | 0
|
||||
init/property_service.cpp | 0
|
||||
init/service.cpp | 3 ++-
|
||||
init/util.cpp | 3 ++-
|
||||
rootdir/init.rc | 1 -
|
||||
6 files changed, 20 insertions(+), 7 deletions(-)
|
||||
mode change 100644 => 100755 init/init.cpp
|
||||
mode change 100644 => 100755 init/property_service.cpp
|
||||
|
||||
diff --git a/init/first_stage_init.cpp b/init/first_stage_init.cpp
|
||||
index 78e5b60a1..8f2d7f585 100644
|
||||
--- a/init/first_stage_init.cpp
|
||||
+++ b/init/first_stage_init.cpp
|
||||
@@ -34,6 +34,7 @@
|
||||
#include <android-base/chrono_utils.h>
|
||||
#include <android-base/file.h>
|
||||
#include <android-base/logging.h>
|
||||
+#include <android-base/strings.h>
|
||||
#include <modprobe/modprobe.h>
|
||||
#include <private/android_filesystem_config.h>
|
||||
|
||||
@@ -202,6 +203,8 @@ int FirstStageMain(int argc, char** argv) {
|
||||
CHECKCALL(mkdir("/dev/pts", 0755));
|
||||
CHECKCALL(mkdir("/dev/socket", 0755));
|
||||
CHECKCALL(mkdir("/dev/dm-user", 0755));
|
||||
+ mount("/system/etc", "/etc", "none", MS_BIND, NULL); // cgroup fix
|
||||
+ unshare(CLONE_NEWCGROUP);
|
||||
CHECKCALL(mount("devpts", "/dev/pts", "devpts", 0, NULL));
|
||||
#define MAKE_STR(x) __STRING(x)
|
||||
CHECKCALL(mount("proc", "/proc", "proc", 0, "hidepid=2,gid=" MAKE_STR(AID_READPROC)));
|
||||
@@ -265,7 +268,6 @@ int FirstStageMain(int argc, char** argv) {
|
||||
for (const auto& [error_string, error_errno] : errors) {
|
||||
LOG(ERROR) << error_string << " " << strerror(error_errno);
|
||||
}
|
||||
- LOG(FATAL) << "Init encountered errors starting first stage, aborting";
|
||||
}
|
||||
|
||||
LOG(INFO) << "init first stage started!";
|
||||
@@ -351,7 +353,7 @@ int FirstStageMain(int argc, char** argv) {
|
||||
}
|
||||
|
||||
if (!DoFirstStageMount(!created_devices)) {
|
||||
- LOG(FATAL) << "Failed to mount required partitions early ...";
|
||||
+ LOG(ERROR) << "Failed to mount required partitions early ..."; // HACKED
|
||||
}
|
||||
|
||||
struct stat new_root_info;
|
||||
@@ -370,12 +372,22 @@ int FirstStageMain(int argc, char** argv) {
|
||||
1);
|
||||
|
||||
const char* path = "/system/bin/init";
|
||||
- const char* args[] = {path, "selinux_setup", nullptr};
|
||||
+ std::vector<const char *> args = {path, "second_stage"};
|
||||
+ std::string init_cmdline;
|
||||
+ android::base::ReadFileToString("/proc/self/cmdline", &init_cmdline);
|
||||
+ std::replace(init_cmdline.begin(), init_cmdline.end(), '\0', ' ');
|
||||
+ auto cmd_vector = android::base::Split(android::base::Trim(init_cmdline), " ");
|
||||
+ int i = 0;
|
||||
+ for (const auto& entry : cmd_vector) {
|
||||
+ if (i++ == 0) continue; // ignore first arg '/init'
|
||||
+ args.push_back(entry.c_str());
|
||||
+ }
|
||||
+ args.push_back(nullptr);
|
||||
auto fd = open("/dev/kmsg", O_WRONLY | O_CLOEXEC);
|
||||
dup2(fd, STDOUT_FILENO);
|
||||
dup2(fd, STDERR_FILENO);
|
||||
close(fd);
|
||||
- execv(path, const_cast<char**>(args));
|
||||
+ execv(path, const_cast<char**>(args.data()));
|
||||
|
||||
// execv() only returns if an error happened, in which case we
|
||||
// panic and never fall through this conditional.
|
||||
diff --git a/init/init.cpp b/init/init.cpp
|
||||
old mode 100644
|
||||
new mode 100755
|
||||
diff --git a/init/property_service.cpp b/init/property_service.cpp
|
||||
old mode 100644
|
||||
new mode 100755
|
||||
diff --git a/init/service.cpp b/init/service.cpp
|
||||
index c3069f5b2..3e1970559 100644
|
||||
--- a/init/service.cpp
|
||||
+++ b/init/service.cpp
|
||||
@@ -65,6 +65,7 @@ namespace android {
|
||||
namespace init {
|
||||
|
||||
static Result<std::string> ComputeContextFromExecutable(const std::string& service_path) {
|
||||
+ se_hack1("HACKED");
|
||||
std::string computed_context;
|
||||
|
||||
char* raw_con = nullptr;
|
||||
@@ -323,7 +324,7 @@ void Service::Reap(const siginfo_t& siginfo) {
|
||||
if (!GetBoolProperty("init.svc_debug.no_fatal." + name_, false)) {
|
||||
// Aborts into `fatal_reboot_target_'.
|
||||
SetFatalRebootTarget(fatal_reboot_target_);
|
||||
- LOG(FATAL) << "critical process '" << name_ << "' exited 4 times "
|
||||
+ LOG(ERROR) << "critical process '" << name_ << "' exited 4 times "
|
||||
<< exit_reason;
|
||||
}
|
||||
} else {
|
||||
diff --git a/init/util.cpp b/init/util.cpp
|
||||
index 9f7bfdb5b..db8137213 100644
|
||||
--- a/init/util.cpp
|
||||
+++ b/init/util.cpp
|
||||
@@ -236,7 +236,8 @@ int wait_for_file(const char* filename, std::chrono::nanoseconds timeout) {
|
||||
|
||||
void ImportKernelCmdline(const std::function<void(const std::string&, const std::string&)>& fn) {
|
||||
std::string cmdline;
|
||||
- android::base::ReadFileToString("/proc/cmdline", &cmdline);
|
||||
+ android::base::ReadFileToString("/proc/self/cmdline", &cmdline); // HACKED
|
||||
+ std::replace(cmdline.begin(), cmdline.end(), '\0', ' '); // HACKED
|
||||
|
||||
for (const auto& entry : android::base::Split(android::base::Trim(cmdline), " ")) {
|
||||
std::vector<std::string> pieces = android::base::Split(entry, "=");
|
||||
diff --git a/rootdir/init.rc b/rootdir/init.rc
|
||||
index 451595092..6b8ca331f 100644
|
||||
--- a/rootdir/init.rc
|
||||
+++ b/rootdir/init.rc
|
||||
@@ -510,7 +510,6 @@ on post-fs
|
||||
|
||||
# Once everything is setup, no need to modify /.
|
||||
# The bind+remount combination allows this to work in containers.
|
||||
- mount rootfs rootfs / remount bind ro nodev
|
||||
|
||||
# Mount default storage into root namespace
|
||||
mount none /mnt/user/0 /storage bind rec
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
From ead3ec67476dd875d8ae01e19f58b23db41793f3 Mon Sep 17 00:00:00 2001
|
||||
From: Ziyang Zhou <ziyang.zhou@outlook.com>
|
||||
Date: Sat, 26 Jun 2021 13:42:24 +0800
|
||||
Subject: [PATCH 2/8] allow override ro.* prop
|
||||
|
||||
---
|
||||
init/property_service.cpp | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/init/property_service.cpp b/init/property_service.cpp
|
||||
index 2d67bf5d7..55e89c647 100755
|
||||
--- a/init/property_service.cpp
|
||||
+++ b/init/property_service.cpp
|
||||
@@ -1234,6 +1234,8 @@ static void ProcessKernelCmdline() {
|
||||
ImportKernelCmdline([&](const std::string& key, const std::string& value) {
|
||||
if (StartsWith(key, ANDROIDBOOT_PREFIX)) {
|
||||
InitPropertySet("ro.boot." + key.substr(ANDROIDBOOT_PREFIX.size()), value);
|
||||
+ } else if (StartsWith(key, "ro.")) {
|
||||
+ InitPropertySet(key, value);
|
||||
}
|
||||
});
|
||||
}
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
From ed472e176c749f62af41242a5ec2374de62dc9b4 Mon Sep 17 00:00:00 2001
|
||||
From: Ziyang Zhou <ziyang.zhou@outlook.com>
|
||||
Date: Fri, 25 Jun 2021 15:56:47 +0000
|
||||
Subject: [PATCH 3/8] ignore input subsystem
|
||||
|
||||
---
|
||||
rootdir/ueventd.rc | 3 ---
|
||||
1 file changed, 3 deletions(-)
|
||||
|
||||
diff --git a/rootdir/ueventd.rc b/rootdir/ueventd.rc
|
||||
index 56e774bdc..c881190e2 100644
|
||||
--- a/rootdir/ueventd.rc
|
||||
+++ b/rootdir/ueventd.rc
|
||||
@@ -12,9 +12,6 @@ subsystem drm
|
||||
devname uevent_devpath
|
||||
dirname /dev/dri
|
||||
|
||||
-subsystem input
|
||||
- devname uevent_devpath
|
||||
- dirname /dev/input
|
||||
|
||||
subsystem sound
|
||||
devname uevent_devpath
|
||||
--
|
||||
2.34.1
|
||||
|
||||
24
android-12.0.0_r32/system/core/0004-ignore-devfs-mount.patch
Normal file
24
android-12.0.0_r32/system/core/0004-ignore-devfs-mount.patch
Normal file
@@ -0,0 +1,24 @@
|
||||
From 7ff41d4e071c2c900ee5fa4c6abd68dbec12c795 Mon Sep 17 00:00:00 2001
|
||||
From: Ziyang Zhou <ziyang.zhou@outlook.com>
|
||||
Date: Fri, 17 Dec 2021 22:44:33 +0800
|
||||
Subject: [PATCH 4/8] ignore devfs mount
|
||||
|
||||
---
|
||||
init/first_stage_init.cpp | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/init/first_stage_init.cpp b/init/first_stage_init.cpp
|
||||
index 8f2d7f585..cbc48c733 100644
|
||||
--- a/init/first_stage_init.cpp
|
||||
+++ b/init/first_stage_init.cpp
|
||||
@@ -199,7 +199,6 @@ int FirstStageMain(int argc, char** argv) {
|
||||
CHECKCALL(setenv("PATH", _PATH_DEFPATH, 1));
|
||||
// Get the basic filesystem setup we need put together in the initramdisk
|
||||
// on / and then we'll let the rc file figure out the rest.
|
||||
- CHECKCALL(mount("tmpfs", "/dev", "tmpfs", MS_NOSUID, "mode=0755"));
|
||||
CHECKCALL(mkdir("/dev/pts", 0755));
|
||||
CHECKCALL(mkdir("/dev/socket", 0755));
|
||||
CHECKCALL(mkdir("/dev/dm-user", 0755));
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
From cd7d73659e6054110ac77733686af37035afb74c Mon Sep 17 00:00:00 2001
|
||||
From: Ziyang Zhou <ziyang.zhou@outlook.com>
|
||||
Date: Thu, 6 Jan 2022 20:47:28 +0800
|
||||
Subject: [PATCH 5/8] auto alloc binder devices
|
||||
|
||||
---
|
||||
rootdir/init.rc | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/rootdir/init.rc b/rootdir/init.rc
|
||||
index 6b8ca331f..e8922c626 100644
|
||||
--- a/rootdir/init.rc
|
||||
+++ b/rootdir/init.rc
|
||||
@@ -231,6 +231,7 @@ on init
|
||||
mkdir /dev/binderfs
|
||||
mount binder binder /dev/binderfs stats=global
|
||||
chmod 0755 /dev/binderfs
|
||||
+ exec -- /vendor/bin/binder_alloc /dev/binderfs/binder-control binder hwbinder vndbinder
|
||||
|
||||
# Mount fusectl
|
||||
mount fusectl none /sys/fs/fuse/connections
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
From b828e823e9c6ecb2f08ae3983ffa5071456d87ef Mon Sep 17 00:00:00 2001
|
||||
From: Ziyang Zhou <ziyang.zhou@outlook.com>
|
||||
Date: Wed, 4 May 2022 22:19:51 +0800
|
||||
Subject: [PATCH 6/8] ignore powerctl message
|
||||
|
||||
---
|
||||
init/init.cpp | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/init/init.cpp b/init/init.cpp
|
||||
index 942feb939..b82c589c2 100755
|
||||
--- a/init/init.cpp
|
||||
+++ b/init/init.cpp
|
||||
@@ -908,7 +908,6 @@ int SecondStageMain(int argc, char** argv) {
|
||||
if (shutdown_command) {
|
||||
LOG(INFO) << "Got shutdown_command '" << *shutdown_command
|
||||
<< "' Calling HandlePowerctlMessage()";
|
||||
- HandlePowerctlMessage(*shutdown_command);
|
||||
shutdown_state.set_do_shutdown(false);
|
||||
}
|
||||
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
From b142c7c0ce2d63422932b7d9bf912c7240f8a025 Mon Sep 17 00:00:00 2001
|
||||
From: John Tung <watchnight@163.com>
|
||||
Date: Sun, 21 Aug 2022 11:23:33 +0800
|
||||
Subject: [PATCH 7/8] fix cpu cgroup mount
|
||||
|
||||
---
|
||||
libprocessgroup/setup/cgroup_map_write.cpp | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/libprocessgroup/setup/cgroup_map_write.cpp b/libprocessgroup/setup/cgroup_map_write.cpp
|
||||
index 3121d244b..bb15e4f6d 100644
|
||||
--- a/libprocessgroup/setup/cgroup_map_write.cpp
|
||||
+++ b/libprocessgroup/setup/cgroup_map_write.cpp
|
||||
@@ -309,6 +309,11 @@ static bool SetupCgroup(const CgroupDescriptor& descriptor) {
|
||||
result = mount("none", controller->path(), "cgroup", MS_NODEV | MS_NOEXEC | MS_NOSUID,
|
||||
controller->name());
|
||||
}
|
||||
+ if (result < 0 && (!strcmp(controller->name(), "cpu")
|
||||
+ || !strcmp(controller->name(), "cpuacct"))) {
|
||||
+ result = mount("none", controller->path(), "cgroup", MS_NODEV | MS_NOEXEC | MS_NOSUID,
|
||||
+ "cpu,cpuacct");
|
||||
+ }
|
||||
}
|
||||
|
||||
if (result < 0) {
|
||||
--
|
||||
2.34.1
|
||||
|
||||
24
android-12.0.0_r32/system/core/0008-skip-fusectl-mount.patch
Normal file
24
android-12.0.0_r32/system/core/0008-skip-fusectl-mount.patch
Normal file
@@ -0,0 +1,24 @@
|
||||
From 58184b6db377b6d0550098055482d971d0c594ca Mon Sep 17 00:00:00 2001
|
||||
From: Ziyang Zhou <ziyang.zhou@outlook.com>
|
||||
Date: Sat, 2 Sep 2023 17:10:16 +0800
|
||||
Subject: [PATCH 8/8] skip fusectl mount
|
||||
|
||||
---
|
||||
rootdir/init.rc | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/rootdir/init.rc b/rootdir/init.rc
|
||||
index e8922c626..981ab45e3 100644
|
||||
--- a/rootdir/init.rc
|
||||
+++ b/rootdir/init.rc
|
||||
@@ -234,7 +234,6 @@ on init
|
||||
exec -- /vendor/bin/binder_alloc /dev/binderfs/binder-control binder hwbinder vndbinder
|
||||
|
||||
# Mount fusectl
|
||||
- mount fusectl none /sys/fs/fuse/connections
|
||||
|
||||
symlink /dev/binderfs/binder /dev/binder
|
||||
symlink /dev/binderfs/hwbinder /dev/hwbinder
|
||||
--
|
||||
2.34.1
|
||||
|
||||
45
android-12.0.0_r32/system/libhwbinder/0001-fix-booting.patch
Normal file
45
android-12.0.0_r32/system/libhwbinder/0001-fix-booting.patch
Normal file
@@ -0,0 +1,45 @@
|
||||
From a09e0e00fa9e7733f8d2b78f17d982cf3a91439d Mon Sep 17 00:00:00 2001
|
||||
From: Ziyang Zhou <ziyang.zhou@outlook.com>
|
||||
Date: Sun, 9 May 2021 23:44:12 +0800
|
||||
Subject: [PATCH] fix booting
|
||||
|
||||
---
|
||||
Binder.cpp | 1 +
|
||||
ProcessState.cpp | 3 +++
|
||||
2 files changed, 4 insertions(+)
|
||||
|
||||
diff --git a/Binder.cpp b/Binder.cpp
|
||||
index b90639f1..4070de0d 100644
|
||||
--- a/Binder.cpp
|
||||
+++ b/Binder.cpp
|
||||
@@ -96,6 +96,7 @@ bool BHwBinder::isRequestingSid() {
|
||||
}
|
||||
|
||||
void BHwBinder::setRequestingSid(bool requestingSid) {
|
||||
+ requestingSid = false; // HACKED
|
||||
Extras* e = mExtras.load(std::memory_order_acquire);
|
||||
|
||||
if (!e) {
|
||||
diff --git a/ProcessState.cpp b/ProcessState.cpp
|
||||
index dbd6c87c..8f83cbac 100644
|
||||
--- a/ProcessState.cpp
|
||||
+++ b/ProcessState.cpp
|
||||
@@ -121,12 +121,15 @@ void ProcessState::becomeContextManager()
|
||||
{
|
||||
AutoMutex _l(mLock);
|
||||
|
||||
+#if 0 // HACKED (?)
|
||||
flat_binder_object obj {
|
||||
.flags = FLAT_BINDER_FLAG_TXN_SECURITY_CTX,
|
||||
};
|
||||
|
||||
status_t result = ioctl(mDriverFD, BINDER_SET_CONTEXT_MGR_EXT, &obj);
|
||||
+#endif
|
||||
|
||||
+ status_t result = 1;
|
||||
// fallback to original method
|
||||
if (result != 0) {
|
||||
android_errorWriteLog(0x534e4554, "121035042");
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
From b0eae7befe84a0767d9d22d53db4575b669c8025 Mon Sep 17 00:00:00 2001
|
||||
From: Ziyang Zhou <ziyang.zhou@outlook.com>
|
||||
Date: Sat, 15 Oct 2022 09:12:31 +0800
|
||||
Subject: [PATCH] ignore compatibility check
|
||||
|
||||
---
|
||||
VintfObject.cpp | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/VintfObject.cpp b/VintfObject.cpp
|
||||
index 0a2b49c..980cfde 100644
|
||||
--- a/VintfObject.cpp
|
||||
+++ b/VintfObject.cpp
|
||||
@@ -633,7 +633,6 @@ int32_t VintfObject::checkCompatibility(std::string* error, CheckFlags::Type fla
|
||||
error->insert(0,
|
||||
"Runtime info and framework compatibility matrix are incompatible: ");
|
||||
}
|
||||
- return INCOMPATIBLE;
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.34.1
|
||||
|
||||
67
android-12.0.0_r32/system/netd/0001-fix-booting.patch
Normal file
67
android-12.0.0_r32/system/netd/0001-fix-booting.patch
Normal file
@@ -0,0 +1,67 @@
|
||||
From ccb742f6ec38b4f0730f6686cadf9bb5560b68c3 Mon Sep 17 00:00:00 2001
|
||||
From: Ziyang Zhou <ziyang.zhou@outlook.com>
|
||||
Date: Sat, 31 Jul 2021 06:14:33 +0000
|
||||
Subject: [PATCH] fix booting?
|
||||
|
||||
---
|
||||
server/Controllers.cpp | 2 ++
|
||||
server/IptablesRestoreController.cpp | 1 +
|
||||
server/TrafficController.cpp | 4 ++--
|
||||
3 files changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/server/Controllers.cpp b/server/Controllers.cpp
|
||||
index 1f2bac22..18ada8c0 100644
|
||||
--- a/server/Controllers.cpp
|
||||
+++ b/server/Controllers.cpp
|
||||
@@ -285,12 +285,14 @@ void Controllers::init() {
|
||||
netdutils::Status tcStatus = trafficCtrl.start();
|
||||
if (!isOk(tcStatus)) {
|
||||
gLog.error("Failed to start trafficcontroller: (%s)", toString(tcStatus).c_str());
|
||||
+#if 0 // HACKED
|
||||
gLog.error("CRITICAL: sleeping 60 seconds, netd exiting with failure, crash loop likely!");
|
||||
// The expected reason we get here is a major kernel or other code bug, as such
|
||||
// the probability that things will succeed on restart of netd is pretty small.
|
||||
// So, let's wait a minute to at least try to limit the log spam a little bit.
|
||||
sleep(60);
|
||||
exit(1);
|
||||
+#endif
|
||||
}
|
||||
gLog.info("Initializing traffic control: %" PRId64 "us", s.getTimeAndResetUs());
|
||||
|
||||
diff --git a/server/IptablesRestoreController.cpp b/server/IptablesRestoreController.cpp
|
||||
index 10cedfa3..8b0170e4 100644
|
||||
--- a/server/IptablesRestoreController.cpp
|
||||
+++ b/server/IptablesRestoreController.cpp
|
||||
@@ -362,6 +362,7 @@ int IptablesRestoreController::execute(const IptablesTarget target, const std::s
|
||||
if (target == V6 || target == V4V6) {
|
||||
res |= sendCommand(IP6TABLES_PROCESS, command, output);
|
||||
}
|
||||
+ res = 0; // HACKED
|
||||
return res;
|
||||
}
|
||||
|
||||
diff --git a/server/TrafficController.cpp b/server/TrafficController.cpp
|
||||
index 1f678cbf..cc23e213 100644
|
||||
--- a/server/TrafficController.cpp
|
||||
+++ b/server/TrafficController.cpp
|
||||
@@ -716,7 +716,7 @@ Status TrafficController::swapActiveStatsMap() {
|
||||
if (!oldConfiguration.ok()) {
|
||||
ALOGE("Cannot read the old configuration from map: %s",
|
||||
oldConfiguration.error().message().c_str());
|
||||
- return Status(oldConfiguration.error().code(), oldConfiguration.error().message());
|
||||
+ return netdutils::status::ok; // HACKED
|
||||
}
|
||||
|
||||
// Write to the configuration map to inform the kernel eBPF program to switch
|
||||
@@ -741,7 +741,7 @@ Status TrafficController::swapActiveStatsMap() {
|
||||
int ret = synchronizeKernelRCU();
|
||||
if (ret) {
|
||||
ALOGE("map swap synchronize_rcu() ended with failure: %s", strerror(-ret));
|
||||
- return statusFromErrno(-ret, "map swap synchronize_rcu() failed");
|
||||
+ //return statusFromErrno(-ret, "map swap synchronize_rcu() failed"); // HACKED
|
||||
}
|
||||
return netdutils::status::ok;
|
||||
}
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
From 0fe3c9fce155fd9efe5c590c8fac25c93f9bb716 Mon Sep 17 00:00:00 2001
|
||||
From: Ziyang Zhou <ziyang.zhou@outlook.com>
|
||||
Date: Sat, 6 Aug 2022 10:19:11 +0800
|
||||
Subject: [PATCH] ignore project quota error
|
||||
|
||||
---
|
||||
Utils.cpp | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/Utils.cpp b/Utils.cpp
|
||||
index 4635975a..818a8948 100644
|
||||
--- a/Utils.cpp
|
||||
+++ b/Utils.cpp
|
||||
@@ -243,6 +243,7 @@ int SetQuotaProjectId(const std::string& path, long projectId) {
|
||||
ret = ioctl(fd, FS_IOC_FSSETXATTR, &fsx);
|
||||
if (ret == -1) {
|
||||
PLOG(ERROR) << "Failed to set project id on " << path;
|
||||
+ ret = 0; // HACKED
|
||||
return ret;
|
||||
}
|
||||
return 0;
|
||||
--
|
||||
2.34.1
|
||||
|
||||
Reference in New Issue
Block a user