`base.evaluate()` can be interrupted by other rules in the chain, such
as DevSdkIgnoreRule, if an assumption fails. This prevents
SetFeatureFlagsRule from executing its flag value restoration logic,
leading to an inconsistent state. This change ensures the restoration
logic runs regardless of exceptions.
Flag: EXEMPT mainline
Bug: 440618747
Test: TH
Change-Id: Iba4483b45f11aeed8ae565f8080b2bebd299046c
Perhaps not the best example, but virtually free considering
a bitmap of 64K bits is 8KiB no matter what.
Kernel will allocate:
1 page for internal metadata (rounded up to a full page)
N pages rounded up from array size, which is:
number of elements (65536 bits / 64 bits per u64) = 1024
* element size (u64 rounded up to a multiple of 8) = 8
= 8192
This rounding up is unique to *mmapable* arrays.
thus on 4KiB page size: 12 KiB - waste is at most a few (<4) KiB
and on 16KiB page size: 32 KiB - which isn't great, but well that's 16KiB...
(presumably 16KiB is being used on devices with a lot of ram,
where performance matters more than a little ram waste)
Note: AFAICT a kernel bpf program R/W map cannot be mapped R/O
into userspace, as the permissions on the page mapping would conflict.
(and obviously you cannot map R/W if you have only R/O access)
I'm not sure if this is architecture specific,
or simply an implementation limitation, but it is what I observed.
I think it's likely a missing kernel feature (even on 6.12)...
Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I609ae61e17917ff441cac10a9b29af3fcacb53c5
Maciej Żenczykowskicommited 2025-08-07 15:54:01 -07:00
automatically fall back for older kernels
Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ice377331442f71fa69f086a3be8a8c10cbc6575f
Maciej Żenczykowskicommited 2025-08-07 15:53:42 -07:00
This is more legible then a series of if's,
although thus require manually adding support for new map types.
Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I8900eb8ced5e4a1cb161b49e5c68d2effe36af57
Maciej Żenczykowskicommited 2025-08-07 15:53:05 -07:00
(that this was missing appears to be an oversight)
Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Icd424324db11e56f820817f890985155d639175d
Maciej Żenczykowskicommited 2025-08-07 15:52:52 -07:00
(mostly autogenerated, with minor tweaks to make it build)
Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I2065c3fc6d4d37663a0a52281deb7624fd5c801d
Maciej Żenczykowskicommited 2025-08-07 15:52:35 -07:00
(mostly autogenerated, with minor tweaks to make it build)
Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Idb3706d022c3fbd86fd3abd800ff5eee8edda3cc
Maciej Żenczykowskicommited 2025-08-07 15:51:40 -07:00
(mostly autogenerated, with minor tweaks to make it build)
Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Id2ffe0df6526a6377806464e902b8e8f87a43c62
Maciej Żenczykowskicommited 2025-08-07 15:50:48 -07:00
(mostly autogenerated, with minor tweaks to make it build)
Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I5a5ba231cb38886b9b681b4c08d89a18ad418f23
Maciej Żenczykowskicommited 2025-08-07 15:48:28 -07:00
(mostly autogenerated, with minor tweaks to make it build)
Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I5a5ba231cb38886b9b681b4c08d89a18ad418f23
Maciej Żenczykowskicommited 2025-08-07 14:02:20 -07:00
Annotate APFv4 and APFv6 multi-device tests with `@VsrTest`.
This marks these tests for compliance with specific VSR requirements,
Flag: EXEMPT test only
Test: atest CtsConnectivityMultiDevicesTestCases:ApfV4Test
Test: atest CtsConnectivityMultiDevicesTestCases:ApfV6Test
Test: ./cts-tradefed run cts \
-m CtsConnectivityMultiDevicesTestCases \
-t ApfV4Test --shard-count 2
Test: ./cts-tradefed run cts \
-m CtsConnectivityMultiDevicesTestCases \
-t ApfV6Test --shard-count 2
Change-Id: I864aa65f6f4d584c4f8077f98aac0b0da8e501c8
This patch add *Proto suffix for some proto message in
NetworkConfigStoreProto to avoid name conflicts with names in
android.net package.
Test: atest ConnectivityCoverageTests
Bug: 397536853
Flag: EXEMPT mainline
Change-Id: I4f826511bcab0fcd3b154bbc349a062fd4841321
AServiceManager_waitForService sytem APIs currently only callable
via dlsym(): b/376759605. When built with sdk_version current,
the NDK stubs for "sdk" variants only include NDK APIs,
excluding #systemapi APIs.
Flag: EXEMPT Mechanical refactors
Test: atest ServiceManagerWrapperIntegrationTest
Change-Id: I48f690d771c7905e79e463617ded772f753cc854
Mark Chienauthored and Patrick Rohrcommited 2025-08-06 10:44:39 -07:00
ConnectivityService would be centralized location for deciding local
network so for this effort adding isLocalRoute parameter to RouteInfoParcel
Bug: 394308861
Test: Manually tested.
Test: atest ConnectivityCoverageTests
Flag: EXEMPT Using device config kill-switch
Change-Id: I3ed34f96af1cbd7d8645a6c19e696a75525ce68a
Some builds (e.g. MSVC) use `#define interface struct` which causes
issues with the field or argument name `interface`.
Change-Id: If18b00028818337c9fabe4a271c570f456d62a9a
Test: Build
Flag: EXEMPT PURE_REFACTOR
Introduce a 3-second delay in each packet send.
Before sending each packet, wait for 3 seconds to give the
firmware time to turn on the APF.
The firmware may have throughput calculation logic that
depends on a certain time window.
Flag: EXEMPT test only
Bug: 434614102
Test: atest CtsConnectivityMultiDevicesTestCases:ApfV6Test
Test: ./cts-tradefed run commandAndExit cts \
-m CtsConnectivityMultiDevicesTestCases \
-t ApfV6Test --shard-count 2
Change-Id: I0807562cd87cbfe90c90d48cf2d0e41673c153b0
RoutingCoordinatorService's {add,remove,update}Route methods
all end up calling netd's *RouteParcel methods.
Make callers explicitly generate and pass in the parcel to the
manager class instead of having them pass in a RouteInfo and
having the service class convert the RouteInfo to a parcel.
Also remove the {add,remove,update}Route methods from
RoutingCoordinatorManager since they are unused.
This is a no-op refactor that simplifies upcoming changes.
RoutingCoordinator is not a stable interface and is not used
across the platform/mainline boundary, so there are no version
skew considerations.
Bug: 394308861
Test: atest ConnectivityCoverageTests
Flag: EXEMPT no-op refactor
Change-Id: Iedf4c9bc28c3fc8c289db421857acddc8c694990
Lorenzo Colitticommited 2025-08-06 15:57:36 +09:00
Currently, NET_CAPABILITY_NOT_VCN_MANAGED is implicited added for
NetworkRequest built by normal apps.
However, the tethering network agent doesn't have this capability,
which makes the agent being exposed to VcnManager and cannot be
seen by normal apps.
Add NET_CAPABILITY_NOT_VCN_MANAGED to tethering NetworkAgent. Include
NET_CAPABILITY_NOT_VCN_MANAGED in local network capabilities for
metrics and API utilities to ensure correct evaluation of local
network connectivity. Update unit tests to reflect the new capability.
Flag: EXEMPT bug fix
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.CSSatisfiedByLocalNetworkMetricsTest \
ConnectivityCoverageTests:android.net.connectivity.com.android.metrics.SatisfiedByLocalNetworkMetricsTest \
--update-device
Test: manual generate request by CTS and statsd_testdrive -e 10247
Bug: 428098173
Change-Id: Ifa9ce0827abd22d887a0e8a2ab6f4d7391b2b8ed
This is both shorter and allows us to use the stringified
version of these as the automatic section suffix.
Tested: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Icf1b55f1a8f79c517631e121cf4aed6513948957
Maciej Żenczykowskicommited 2025-08-05 19:18:04 -07:00
(mostly autogenerated, with minor tweaks to make it build)
Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I718fca9ed8a4329cc53b0479159c35601e2f20d6
Maciej Żenczykowskicommited 2025-08-05 19:15:35 -07:00
We require 4.9+ for S, and M-2025-11 requires S+.
Generated via:
removal of #define KVER_NONE then:
for f in clatd.c netd.c offload.c include/bpf_helpers.h; do sed -r -i 's/KVER_NONE/KVER_4_9/' $f; done
plus addition of space to make things line up
Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I0661974304163a880a6cc8178f0db1173c1ef22f
Maciej Żenczykowskicommited 2025-08-05 19:15:35 -07:00
(mostly autogenerated, with minor tweaks to make it build)
Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ieb2be6e5515fe2b9077b1ffeb1c07628213595b3
Maciej Żenczykowskicommited 2025-08-05 19:15:35 -07:00
It's superfluous - we never use any other value, and it's unlikely we ever will.
We only run code in:
- NetBpfLoad/netd/dnsresolver which all run as uid AID_ROOT,
- System Server which runs as uid AID_SYSTEM,
- Network Stack which runs as uid AID_NETWORK_STACK,
so any other values would seem wrong.
However, groups serve the purpose better (hence why the programs are group readable),
and we have pre-existing groups to cover the combinations we care about.
Furthermore we already have sepolicy labels in place as well...
Tested: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I9535eac7eb365735fb3a9769c47ffa7067854dad
Maciej Żenczykowskicommited 2025-08-05 19:15:35 -07:00
(mostly autogenerated, with minor tweaks to make it build)
Test: TreeHugger, manually
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Iab85fc8e035d77347f4b4fd1cd5ecaf94174d997
Maciej Żenczykowskicommited 2025-08-05 19:15:35 -07:00
as we always pass in all of them in a well defined order
Test: TreeHugger, manually
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I93c4a9883983645cbe7d11101aa749dc2faf9d6d
Maciej Żenczykowskicommited 2025-08-05 12:15:03 -07:00
32-bit x86 has a crazy networking calling convention and instead of using
individual system calls has a single multiplexed socketcall()
bionic hasn't finished transitioning to the individual calls yet
which were added to Linux kernels around the 4.10-4.14-ish timeframe.
This does open a bit of security hole, since it effectively allows
all 20-ish networking system calls, but oh well, better than constantly
allowing & logging.
I don't think we'll ever want to enable KILL mode on x86-32 any way.
Test: TreeHugger
Flag: EXEMPT mainline & disabled code
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I7228132cfbf716592607d010f64d5adeeb4419aa
Maciej Żenczykowskicommited 2025-08-05 12:14:42 -07:00