Skip to content

Commit

Permalink
feat: sync with latest sources of TrebleDroid
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jul 26, 2024
1 parent 77f3c96 commit 559737d
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 57 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
From 0c62748ef5781c19f566a18fad343f262a6c28a0 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Wed, 26 Oct 2022 18:10:04 -0400
Subject: [PATCH 01/10] Allow failing to load bpf programs, for BPF-less
devices
Subject: [PATCH 1/9] Allow failing to load bpf programs, for BPF-less devices

Change-Id: I68ba3be2e15c188e56e32a6ecf844e1ca64d560f
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 4b95e8567c81493ded4ed9cd779b18e9846e9b5e Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Wed, 26 Oct 2022 18:11:10 -0400
Subject: [PATCH 02/10] Support non-working BPF maps on old BPF-less kernel
Subject: [PATCH 2/9] Support non-working BPF maps on old BPF-less kernel

---
.../src/android/net/BpfNetMapsReader.java | 13 +++++--
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 852e5615e27b645ff5c1f98599da328771652cf0 Mon Sep 17 00:00:00 2001
From: koron393 <koron393@gmail.com>
Date: Fri, 20 Jan 2023 05:41:13 +0900
Subject: [PATCH 03/10] Bring back traffic indicators for legacy devices
Subject: [PATCH 3/9] Bring back traffic indicators for legacy devices

Revert: "remove qtaguid parsing"
(commit 0b99c46bcde8e607d9233c474035da95ab68a6fe.)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
From 74a631969871db241b4f08b74e4b6729fbb70657 Mon Sep 17 00:00:00 2001
From: Peter Cai <peter@typeblog.net>
Date: Sat, 16 Mar 2024 15:27:27 -0400
Subject: [PATCH 04/10] Revert "drop support for V gsi on pixel 5 R base
kernel"
Subject: [PATCH 4/9] Revert "drop support for V gsi on pixel 5 R base kernel"

This reverts commit bbbd18a71368a80f689b924dcf82062c2ee351b2.
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From af33e578f83665061401e9a864b94d5df5d996c4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Maciej=20=C5=BBenczykowski?= <maze@google.com>
Date: Mon, 11 Mar 2024 12:40:06 +0000
Subject: [PATCH 05/10] netbpfload: add back support for 4.9-T kernels
Subject: [PATCH 5/9] netbpfload: add back support for 4.9-T kernels
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From f467002fa0316030a1cbaa2513dab689c84040e8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Maciej=20=C5=BBenczykowski?= <maze@google.com>
Date: Fri, 15 Mar 2024 19:03:13 +0000
Subject: [PATCH 06/10] NetBpfLoad: more 4.9-T support
Subject: [PATCH 6/9] NetBpfLoad: more 4.9-T support
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From f44fb054a761bf1c27efb863ddc7ab0848591a6c Mon Sep 17 00:00:00 2001
From 04b319ec7da6f356f8710e2b30c1061d7627e180 Mon Sep 17 00:00:00 2001
From: Michael Bestas <mkbestas@gmail.com>
Date: Fri, 15 Mar 2024 14:59:21 +0200
Subject: [PATCH 08/10] netd: Remove <4.14 kernel restrictions
Subject: [PATCH 7/9] netd: Remove <4.14 kernel restrictions

Change-Id: I4d4abbacd6b9589260de06663e2143bc37d8ea0f
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
From 3d84cebda12468a5a2b686b7167ce8b93fb010ae Mon Sep 17 00:00:00 2001
From 6bebcc5a2eb42e4d060f19219872beb716e08df8 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Wed, 15 May 2024 05:56:59 -0400
Subject: [PATCH 09/10] More bpf errors ignore -- there are some 4.14 without
the bpf jit file
Subject: [PATCH 8/9] More bpf errors ignore -- there are some 4.14 without the
bpf jit file

---
netbpfload/NetBpfLoad.cpp | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
netbpfload/NetBpfLoad.cpp | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/netbpfload/NetBpfLoad.cpp b/netbpfload/NetBpfLoad.cpp
index 9b71eaaa35..0484577a49 100644
index 6b9b8c5729..0484577a49 100644
--- a/netbpfload/NetBpfLoad.cpp
+++ b/netbpfload/NetBpfLoad.cpp
@@ -345,8 +345,7 @@ int main(int argc, char** argv, char * const envp[]) {
Expand All @@ -22,19 +22,17 @@ index 9b71eaaa35..0484577a49 100644

// Enable the eBPF JIT -- but do note that on 64-bit kernels it is likely
// already force enabled by the kernel config option BPF_JIT_ALWAYS_ON.
@@ -354,14 +353,12 @@ int main(int argc, char** argv, char * const envp[]) {
@@ -354,12 +353,12 @@ int main(int argc, 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") &&
- android::bpf::isAtLeastKernelVersion(4, 14, 0)) return 1;
- if (writeProcSysFile("/proc/sys/net/core/bpf_jit_enable", "1\n")) return 1;
+ writeProcSysFile("/proc/sys/net/core/bpf_jit_enable", "1\n");

// 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") &&
- android::bpf::isAtLeastKernelVersion(4, 14, 0)) return 1;
- if (writeProcSysFile("/proc/sys/net/core/bpf_jit_kallsyms", "1\n")) return 1;
+ writeProcSysFile("/proc/sys/net/core/bpf_jit_kallsyms", "1\n");
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From bc89782540891ee95727a8d1e2af772d586714f9 Mon Sep 17 00:00:00 2001
From d770a7eeca41db1832b0b0ea4bc218ed89449a77 Mon Sep 17 00:00:00 2001
From: Alberto Ponces <ponces26@gmail.com>
Date: Thu, 20 Jun 2024 12:38:58 +0100
Subject: [PATCH 10/10] Revert "netdupdatable: add back abort() on init() fail"
Subject: [PATCH 9/9] Revert "netdupdatable: add back abort() on init() fail"

This reverts commit ff845a642bc988f960c77ac60664560f8cdc7ee3.
---
Expand Down

0 comments on commit 559737d

Please sign in to comment.