so that elf object related functions are next to each other
Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I159e4e7ad96e3764206546f9f8c69ff156bcf790
Maciej Żenczykowskicommited 2025-08-01 14:53:27 -07:00
We go to a lot of trouble to return error codes, but
we never actually care about anything besides pass/fail.
Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I8c0552246f1050813cca372a280b2302c701d617
Maciej Żenczykowskicommited 2025-08-01 14:53:18 -07:00
Sometimes *all* we see is the return code of the binary printed
out by init when we terminate with failure. Unique codes will
make debugging easier.
Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Icc93813674af2855b2d9f378a1accac48b403aa3
Maciej Żenczykowskicommited 2025-08-01 14:53:06 -07:00
RaParams is populated with the upstream IPv4 MTU, rather than the IPv6
or route MTU. This change clamps that value between 1280 and 1400. 1280
as it is the minimum IPv6 MTU and 1400 to keep QUIC working. A follow up
change could improve on this by either adding the IPv6 MTU to
LinkProperties, or (possibly better) binding and connecting a UDP socket
to determine the MTU. Note that at that point the MTU in the Tether6Key
should also be fixed.
Test: TH
Flag: EXEMPT low risk
Bug: 432676104
Change-Id: I1d900039caf84c58cd04fdb52bdeaf2d1b846268
Since these are equivalent, search and replace...
Test: TreeHugger
Flag: EXEMPT mainline/noop
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I358220f5db70fcde671ce2560086fc7a220f49c7
Maciej Żenczykowskicommited 2025-07-31 17:19:10 -07:00
The field is actually just a compile time calculate index into pin_location.
We add a C++ only helper to return the ASCIIZ string at this offset.
Temporary abort() added to show this is equivalent.
Test: TreeHugger
Flag: EXEMPT mainline/noop
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: If57390b99f348ab03b277e8f68e7f38636c751fc
Maciej Żenczykowskicommited 2025-07-31 17:17:41 -07:00
This reverts commit e7a349bec4.
Reason for revert: broke the build in b/435385483.
Low-Coverage-Reason: This change reverted the previous broken change and will not change testing coverage.
Change-Id: Ifcef4eca52f7a952127ad628627afa3d24248bf4
it doesn't work due to lack of sepolicy for 'rename' operation
Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ib660cbef2fc2dd0e3db8b842edefc6ad0c9a3018
Maciej Żenczykowskicommited 2025-07-31 13:01:12 -07:00
easy to do for maps now, but harder for programs
Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I0aedef7a8f28d8cc60ca4912f2666f920b9dbeb5
Maciej Żenczykowskicommited 2025-07-31 12:31:56 -07:00
as the name is no longer really appropriate and I want to add another use...
Generated via:
sed -i 's@BPF_PIN_SUBDIR_CHAR_ARRAY_SIZE@BPF_DEF_CHAR_ARRAY_SIZE@' bpf/progs/include/bpf_map_def.h
Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I972f8cababe79070aa62f728733c56f41e7a7a84
Maciej Żenczykowskicommited 2025-07-31 12:17:01 -07:00
Basically we can verify and precalculate this at build time.
Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ie4e336c6dc82a0e93a3e62c88c313a32cb245861
Maciej Żenczykowskicommited 2025-07-30 15:27:49 -07:00
as it looks akward, and makes little sense once we fully generate
the path at compile time...
Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I33a8015b787b41225ef8475accb68cea4467b21d
Maciej Żenczykowskicommited 2025-07-30 15:07:54 -07:00
No longer required now that we have compile time verification.
Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I5b18727e8ebf820a06ba647bb7349ba755d5d798
Maciej Żenczykowskicommited 2025-07-30 15:02:07 -07:00
will allow us to store full pin location, longest we currently have is 64 + NULL:
$ adb shell find /sys/fs/bpf | egrep net | egrep '.{64}'
/sys/fs/bpf/netd_shared/prog_netd_cgroupsockrelease_inet_release
$ adb shell find /sys/fs/bpf | egrep net | egrep '.{65}'
<nothing>
Choose small value so we don't needlessly bloat the .o's.
This can be trivially increased on demand.
Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I62015d2703fdee004fb7279d8f9ca83f7462a4df
Maciej Żenczykowskicommited 2025-07-30 12:49:04 -07:00
(prep work to eliminate a ton of NetBpfLoad complexity
wrt. map/program pin naming)
Test: TreeHugger
Flag: EXEMPT mainline/noop
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I9a3c452830b31593bfa1979193d6e823055faa1e
Maciej Żenczykowskicommited 2025-07-30 11:14:51 -07:00
Mocking the PackageManager while ConnectivityService is running
could throw an UnfinishedStubbingException. This change splits
the test into two distinct tests that don't need to change the
mocking value for PackageManager during testing.
Fix: 433600031
Test: atest ConnectivityServiceTest
Flag: TEST_ONLY
Change-Id: Ibcff2082d1e50e89c272573b4c719a7325c959fd