Changes for May 2024, syncing up to 20240508
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
From 4b484de1b55acb758be89fbbdffd25a02b2dde5b Mon Sep 17 00:00:00 2001
|
||||
From f3e0b506e8e331083d1813d1da2f2e037da44ca0 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Wed, 13 Oct 2021 10:56:52 -0400
|
||||
Subject: [PATCH 1/2] Support no-bpf usecase
|
||||
Subject: [PATCH] Support no-bpf usecase
|
||||
|
||||
Change-Id: I75a427a2a41aa4ab1104ad88a891bef0dc2d9c91
|
||||
---
|
||||
@@ -9,10 +9,10 @@ Change-Id: I75a427a2a41aa4ab1104ad88a891bef0dc2d9c91
|
||||
1 file changed, 16 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/bpfloader/BpfLoader.cpp b/bpfloader/BpfLoader.cpp
|
||||
index e53669a..158dca6 100644
|
||||
index 29da777..37a2a19 100644
|
||||
--- a/bpfloader/BpfLoader.cpp
|
||||
+++ b/bpfloader/BpfLoader.cpp
|
||||
@@ -284,7 +284,9 @@ int main(int argc, char** argv) {
|
||||
@@ -206,7 +206,9 @@ int main(int argc, char** argv) {
|
||||
// which could otherwise fail with ENOENT during object pinning or renaming,
|
||||
// due to ordering issues)
|
||||
for (const auto& location : locations) {
|
||||
@@ -23,7 +23,7 @@ index e53669a..158dca6 100644
|
||||
}
|
||||
|
||||
// Note: there's no actual src dir for fs_bpf_loader .o's,
|
||||
@@ -292,18 +294,15 @@ int main(int argc, char** argv) {
|
||||
@@ -214,18 +216,15 @@ int main(int argc, char** argv) {
|
||||
// This is because this is primarily meant for triggering genfscon rules,
|
||||
// and as such this will likely always be the case.
|
||||
// Thus we need to manually create the /sys/fs/bpf/loader subdirectory.
|
||||
@@ -47,7 +47,7 @@ index e53669a..158dca6 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -321,5 +320,13 @@ int main(int argc, char** argv) {
|
||||
@@ -234,5 +233,13 @@ int main(int argc, char** argv) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -62,5 +62,5 @@ index e53669a..158dca6 100644
|
||||
return 0;
|
||||
}
|
||||
--
|
||||
2.25.1
|
||||
2.34.1
|
||||
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
From 059cfff8796aa45e138c67fc9cd6aa966cb8ef68 Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Wed, 19 Oct 2022 02:20:05 +0000
|
||||
Subject: [PATCH 2/2] Revert "detect inability to write to index != 0 of bpf
|
||||
map array"
|
||||
|
||||
This reverts commit ead9d83423877458023056f6ccf9390950d6726f.
|
||||
---
|
||||
bpfloader/BpfLoader.cpp | 9 ---------
|
||||
1 file changed, 9 deletions(-)
|
||||
|
||||
diff --git a/bpfloader/BpfLoader.cpp b/bpfloader/BpfLoader.cpp
|
||||
index 158dca6..0af23c9 100644
|
||||
--- a/bpfloader/BpfLoader.cpp
|
||||
+++ b/bpfloader/BpfLoader.cpp
|
||||
@@ -306,15 +306,6 @@ int main(int argc, char** argv) {
|
||||
}
|
||||
}
|
||||
|
||||
- int key = 1;
|
||||
- int value = 123;
|
||||
- android::base::unique_fd map(
|
||||
- android::bpf::createMap(BPF_MAP_TYPE_ARRAY, sizeof(key), sizeof(value), 2, 0));
|
||||
- if (android::bpf::writeToMapEntry(map, &key, &value, BPF_ANY)) {
|
||||
- ALOGE("Critical kernel bug - failure to write into index 1 of 2 element bpf map array.");
|
||||
- return 1;
|
||||
- }
|
||||
-
|
||||
if (android::base::SetProperty("bpf.progs_loaded", "1") == false) {
|
||||
ALOGE("Failed to set bpf.progs_loaded property");
|
||||
return 1;
|
||||
--
|
||||
2.25.1
|
||||
|
||||
Reference in New Issue
Block a user