There's been some reports that this can cause process termination due
to gc/sleep logic thinking the thread is stuck for >4s.
While this implies that RCU is stuck for >4s, maybe this is something
that can happen on lower power devices.
It seems prudent to (at least temporarily) revert back to the old
non-CriticalNative behaviour.
Test: TreeHugger
Flag: EXEMPT mainline, bugfix
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I56b2802132f252a02411a9a8f762d98ab2f336ad
Maciej Żenczykowskicommited 2025-09-11 13:01:08 -07:00
Vendor/OEM reports of some of their code failing to build due
to larger key/value sizes.
I'd make this check mainline only, but I can't seem to find
a way to actually make that (reliably) work.
So let's just lower the minimum from 256 to 64 - this should
I think still be enough for significant performance benefits
from using bulk operations. Indeed probably even 10 would be
enough for that.
Bug: 442996907
Test: TreeHugger
Flag: EXEMPT mainline/trivial
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I69d53293dd5bb2174af7c814f531a08eba590310
Maciej Żenczykowskicommited 2025-09-11 13:01:08 -07:00
It turns out this doesn't work anyway:
Both our Java and C++ higher level map opening logic on 4.14+
kernels will check key/value sizes match, which will fail due to
the kernel uapi mismatch.
(Note: that the fixup was only ever applied/enabled inside of
the NetBpfLoad process itself, not in any later .so/Java/JNI)
This removes the fixup and simply chooses to not even attempt to
load bpf. This will result in the mainline bpf provided
maps and programs simply not existing. This would/will cause
a failure of 'bpf_existence_test' - but who cares, so long
as things keep on booting.
We need to transition to libbpf, and clearly making this work
isn't worth the considerable effort it would be, since S ebpf
functionality (ie. tethering offload) hasn't worked on the
affected devices in years.
Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ic93a5a9d5b3ba8078500e20dfdf00ef68256874c
Maciej Żenczykowskicommited 2025-09-11 13:01:01 -07:00
by joining two log lines into one with effectively the same info
(the kernel version is already printed during startup)
Test: TreeHugger
Flag: EXEMPT mainline / logging
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ide066edf2d54ffd6a61fdcb115a249bff80cdff9
Maciej Żenczykowskicommited 2025-09-11 11:34:49 -07:00
Currently we have the following failure:
TetheringPrivilegedTests: Passed: 43, Failed: 1, Ignored: 0, Assumption Failed: 1
android.net.ip.RouterAdvertisementDaemonTest#testSolicitRouterAdvertisement
this is due to netd's NetdNativeService::networkAddRoute being DEPRECATED
Test: TreeHugger
Flag: EXEMPT test
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: If98ebc87bbdec590f0ef166683a590381fabd285
Maciej Żenczykowskicommited 2025-09-11 11:20:17 -07:00
This change refactors the creation of `RtNetlinkNeighborMessage` instances by introducing a new `Builder` class. The `newGetNeighborsRequest` and `newNewNeighborMessage` methods now use this builder to construct the messages, improving readability and maintainability.
Bug: 395153629
Test: atest RtNetlinkNeighborMessageTest
Flag: EXEMPT PURE_REFACTOR
Change-Id: I60c277a736266ca0b61f138dd8ef5272c6aa9e5b
This commit addresses an issue where the VPN bypass feature was not
functioning correctly. The VPN filter has been updated to properly
handle bypass rules, ensuring that designated traffic can now bypass the
VPN as intended.
Test: TH, manual
Flag: EXEMPT guarded by default-off legacy flag
Change-Id: Ie6073db4e23a3132042da21c25b696fa3abc4c91
Lorenzo Colittiauthored and Yuyang Huangcommited 2025-09-11 11:50:05 +09:00
This patch adds util methods to convert StaticIpConfiguration from its
proto equivalent, and also adds unit tests to test the conversion.
Test: atest ConnectivityCoverageTests
Bug: 397536853
Flag: EXEMPT mainline
Change-Id: Iba4955efac3b854684f0d0f32b6d5667cebdc265
This patch adds util methods to convert StaticIpConfiguration to its
proto equivalent, and also adds unit tests to test the conversion.
Test: atest ConnectivityCoverageTests
Bug: 397536853
Flag: EXEMPT mainline
Change-Id: I1bd5683202bc0e144e195b4915721e7f414c95cf
Note that disconnected events are also important for getting correct validated duration metrics. Since they are whenever we teardown the network or VcnConnectionConfig, they will mark the end duration for network validated state also.
Flag: EXEMPT METRICS
Test: atest FrameworksVcnTests, CtsVcnTestCases
Bug: 288600040
Change-Id: I34401568287700e6ab356cff029620b6372354d0
This is a pure refactor to move handling of switch cases in separate
methods. This should make the code easier to follow and reduce
indentation.
Test: atest
Flag: EXEMPT pure refactor
Change-Id: Ie4803ff4de9975314529e4bd3bb92465b2cb7c10
The assertion that the app was removed from the list was due to
the fact that when adding the same UID twice, the code first
removes it and then re-adds it.
Add a bit more test coverage.
Test: test-only change
Flag: EXEMPT TEST_ONLY
Change-Id: I1eda5be93668ebda7fe2049a2d1ace4e744948e7
Lorenzo Colitticommited 2025-09-05 19:10:51 +09:00
This is currently very simple, but should be easy to extend.
Test: test-only change
Flag: EXEMPT TEST_ONLY
Change-Id: Ibcb286dcef0b159f01faf3dd0a17c977a7d60a52
Lorenzo Colittiauthored and Yuyang Huangcommited 2025-09-05 15:13:23 +09:00
This change adds logging for when a VcnGatewayConnection enters and
exits safe mode.
Flag: EXEMPT METRICS
Test: atest FrameworksVcnTests, CtsVcnTestCases. go/atomtester
Bug: 288600040
Change-Id: I6423b9fe7a1785fe31b363c8acb0b99f8d5f7df3
This change simplifies the code by calling `SdkUtil.isAtLeast25Q4()`
instead of having redundant check in
ConnectivityService.Dependencies#isAtLeast25Q4.
Test: Existing tests pass.
Bug: 443099706
Flag: EXEMPT PURE_REFACTOR
Change-Id: I2c581e24982f8f0df0cb023e2e3e4f37015d2f4a
libbpf ignores BTF load error but this causes boot failure only when BTF
is required for some reasons (e.g. SK_STORAGE).
This CL makes boot fails regardless of the necessity of BTF on 4.19+
kernel
Test: boot kernel on 4.14, 4.19, 5.10, 6.1
Flag: EXEMPT mainline
Change-Id: I0af1e7eedcbea803c22c064ff157700a01307691
The symbol name of a static const variable defined within a function
includes a '.' and old kernel BTF ferifier rejects it.
"""
08-29 15:11:27.825 0 0 W : c3 1287 NetBpfLoad: [377] STRUCT _rodata size=64 vlen=3
08-29 15:11:27.825 0 0 W : c3 1287 NetBpfLoad: tcp_option type_id=343 bits_offset=0
08-29 15:11:27.825 0 0 W : c3 1287 NetBpfLoad: schedcls_ingress_accecn_eth_.new_cnt type_id=346 bits_offset=128 Invalid name
"""
This verifier limitation was relaxed in later kernels by
https://lore.kernel.org/bpf/20230615145607.3469985-1-revest@chromium.org/
Test: Boot on 4.19 kernel && logcat
Bug: 440448408
Bug: 442710894
Flag: EXEMPT tcpAccECN program is not used
Change-Id: If3c993bb6abb1ff8688932d682d909d335f84ca2
Motomu Utsumiauthored and Maciej Żenczykowskicommited 2025-09-04 04:50:13 -07:00
Updated Tether4Value.java to utilize
java.net.InetAddress for relevant IP address fields.
These fields are correspondingly annotated with
Type.IpAddress for BPF map interactions.
Bug: 392509494
Test: atest TetheringTests
Flag: EXEMPT refactor
Change-Id: I6b5b1e176a47b55ad7482be15e4e2d8ee95ab1d1
Sarup Dalwaniauthored and Maciej Żenczykowskicommited 2025-09-04 00:52:31 -07:00
This patch adds util methods to convert EthernetPortSelector to and from
its proto equivalent, and also adds unit tests to test the conversion.
Test: atest ConnectivityCoverageTests
Bug: 397536853
Flag: EXEMPT mainline
Change-Id: I0603c7a4004a83448c3d6ec4c1d0c6149708fd9d