Commit graph android_packages_modules_Co.../staticlibs/native
Message SHA1
bpf: attach a *bunch* more cgroup hooks
We attach trivial programs to:
  {connect,recvmsg,sendmsg}{4,6}
  inet_release
  {g,s}etsockopt

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ifd3a6dff20a5881f4fdb5d1b4b7b03a55988fd74

Maciej Żenczykowski   commited 2024-06-16 10:04:35 -07:00
22db590580
BpfRingbuf.h - use exclusively locked map
As currently implemented, it is not safe to open (and mmap) the
same kernel -> userspace ringbuffer multiple times.

Note: it's likely, that as implemented, even a single instance
is not thread safe without external locking.

Test: TreeHugger, atest bpf_existence_test bpf_module_test bpf-time-in-state-tests libbpf_android_test
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Iea6908746a58e7412c0ce89da29a764aefeaef47

Maciej Żenczykowski   commited 2024-06-15 03:58:24 -07:00
fbaa3c9890
introduce mapRetrieveLocklessRW()
the clat verifyPerms() checker only wants to check the
existence and accessibility of the maps.

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I3079ab316bcd88370d774fec5e88c1b5ff438266

Maciej Żenczykowski   commited 2024-06-15 03:54:09 -07:00
0fff839ae6
Add BPF_MAP_LOCKLESS_FOR_TEST hack for root resolver tests
Per commit description of https://android-review.git.corp.google.com/c/platform/packages/modules/Connectivity/+/3109108 "Use SingleWriterBpfMap in BpfNetMaps":

- firewall.cpp writes to sConfigurationMap, sUidOwnerMap, and
  sDataSaverEnabledMap, but that code only runs in tests because
  it requires root privileges.

So either those maps need to not use SingleWriterBpfMap
in the BpfNetMaps (which would affect performance),
or we need to prevent the tests from grabbing the locks,
or the tests will (presumably) fail.

This avoids grabbing the locks from the test, even though
this is absolutely terrible and likely breaks things...
But in general the entire firewall.cpp file (and libconnectivity_native_test_utils target) are just one
large modularization violation in need of major escalation...

Test via:
  atest resolv_{gold,stress,integration,unit}_test

Without this patch:
  resolv_gold_test: Passed: 16
  resolv_integration_test: Passed: 53, Failed: 2, Ignored: 118, Assumption Failed: 0 (Completed With ERRORS)
  resolv_stress_test: Passed: 2
  resolv_unit_test: Passed: 124, Failed: 2

  4 tests failed
  --------------
  ResolverMultinetworkTest#DnsWithVpn
  PrivateDns/TransportParameterizedTest#BlockDnsQuery/DoT
  CallbackTest#tagSocketCallback
  ResolvGetAddrInfoTest#InvalidParameters

With this patch:
  resolv_gold_test: Passed: 16
  resolv_integration_test: Passed: 178
  resolv_stress_test: Passed: 2
  resolv_unit_test: Passed: 126

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ie97d015ef66c3864a23484e7ed190fe7d091af5c

Maciej Żenczykowski   commited 2024-06-14 17:35:29 -07:00
04fb3862a9
make java maps grab locks
The java bpfmap fd cache has some implications:
- this won't protect against two SingleWriterBpfMap instantiations
  for the same map (path) in the same process
- we don't release any locks on BpfMap destruction.

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ibb0b1f57974c307ea5e0fa699ce8d598c59f456e

Maciej Żenczykowski   commited 2024-06-14 15:56:01 -07:00
9eca02a8fa
make mapRetrieveWO take exclusive lock
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I4929bbc3490350fc4c57e909109d2ec36eb0359c

Maciej Żenczykowski   commited 2024-06-14 15:56:01 -07:00
7eb7d67279
NetBpfLoad: gently enable mainline
Only the non-CRITICAL test@mainline.o is loaded from netbpfload
on T and U < QPR3, everything else is loaded by platform bpfloader

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ic07a57cf93851d3a1411b62c97d8ce057507360b

Maciej Żenczykowski   commited 2024-06-14 15:09:41 -07:00
231598bc92
bpfLock: avoid using ifAtLeastKernelVersion()
Per inspection of:
  https://source.corp.google.com/h/prodkernel/kernel/upstream/torvalds/linux-2.6/+/master:kernel/bpf/syscall.c;drc=2884dc7d08d98a89d8d65121524bb7533183a63a;l=5786
bpf system call returns -EINVAL on unknown operations:

static int __sys_bpf(int cmd, bpfptr_t uattr, unsigned int size)
{
...
    switch (cmd) {
...
    case BPF_OBJ_GET_INFO_BY_FD:
	err = bpf_obj_get_info_by_fd(&attr, uattr.user);
	break;
..
    default:
	err = -EINVAL;
	break;
    }

    return err;
}

Equivalent logic is present in ACK 4.9-Q:
  SYSCALL_DEFINE3(bpf, int, cmd, union bpf_attr __user *, uattr, unsigned int, size)

This is what should thus be returned on 4.9-T devices.

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I124686ca360513f45e17afba23efa87acf1ce480

Maciej Żenczykowski   commited 2024-06-14 14:25:27 -07:00
4acfa1fc82
Merge "BpfSyscallWrappers: grab shared lock on writable map open" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2024-06-14 21:08:05 +00:00
e819e43eb2
BpfSyscallWrappers: grab shared lock on writable map open
and add an accessor to grab an exclusive lock on a R/W map open
(such a map could be accessed with a write-through cache)

Note: we can't grab a flock as that would occupy the full inode,
and all bpfmaps are actually (currently) the *same* anonymous inode.

As such we actually grab a lock on a range (a single byte),
the offset being determined by the unique bpf map id.

We include some very simple, but sufficient, correctness tests
in the critical boot path: this is to prevent any surprises
caused by kernel implementation changes.

$ adb root && sleep 1 && adb wait-for-device shell grep OFDLCK /proc/locks
id: OFDLCK ADVISORY [WRITE|READ] pid blkmaj:min:inode min_offset max_offset
11: OFDLCK ADVISORY  READ -1 00:0e:1048 36 36
14: OFDLCK ADVISORY  READ -1 00:0e:1048 35 35
15: OFDLCK ADVISORY  READ -1 00:0e:1048 41 41
16: OFDLCK ADVISORY  READ -1 00:0e:1048 40 40
22: OFDLCK ADVISORY  READ -1 00:0e:1048 24 24
23: OFDLCK ADVISORY  READ -1 00:0e:1048 17 17
24: OFDLCK ADVISORY  READ -1 00:0e:1048 16 16
25: OFDLCK ADVISORY  READ -1 00:0e:1048 13 13

OFDLCK probably means 'Open File Descriptor LoCK' since an OFDLCK
is associated with (held by) the file descriptor and not a process/pid,
on the given (anonymous in this case) block device + inode.

Where READ=shared and WRITE=exclusive.
There are (as yet) no exclusive locks held post boot.

The pid field is unfortunately always -1 (and cannot be manually set).

The 00:0e:1048 (or at least the inode portion) is random
(likely depends on boot ordering)

The final two fields (min and max offset) are the bpf map id.

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I208e3450da3fe4689ad5fd578539f401f25a4fef

Maciej Żenczykowski   commited 2024-06-14 10:51:25 +00:00
52018c821c
introduce BPFLOADER_MAINLINE_U_QPR3_VERSION
Note: this is technically a little bit early,
as U QPR3 still runs netbpfload as 'system' uid by virtue of
netbpfload.33rc overriding 'service bpfloader',
but this will change in a followup, at which point U QPR3
will become special by virtue of always using mainline netbpfload

See: https://android.googlesource.com/platform/packages/modules/Connectivity/+/refs/heads/android14-qpr3-release/netbpfload/NetBpfLoad.cpp#262

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I0f52d1e78652501c8601227c4740d9b34673bf5f

Maciej Żenczykowski   commited 2024-06-13 15:38:33 -07:00
1a3b54f005
Fix comment about U QPR2 vs V bpfloader version
See: https://android.googlesource.com/platform/system/bpf/+/refs/heads/android14-qpr2-release/libbpf_android/Loader.cpp#34

Test: N/A
Change-Id: I7ee4ce73efddd0259f0248fcb45d7544387cde7d
Signed-off-by: Maciej Żenczykowski <maze@google.com>

Maciej Żenczykowski   commited 2024-06-13 15:26:55 -07:00
bf6f928b2d
BpfSyscallWrappers: remove mapRetrieve()
(spurious)

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I642104fb08ffb73f7f409ac868b029962dc31979

Maciej Żenczykowski   commited 2024-06-04 13:49:06 +00:00
dfef229781
Use unique_fd in tcutils
Since libbase is available now, make use of it.

Test: m
Change-Id: I5676863f80f19913d68e95ebeef477c5ca399e35

Patrick Rohr   commited 2024-05-22 10:51:02 -07:00
6b84b40a29
Use scopeguard from libbase_headers and delete the copy
A recent change makes libbase_headers available to the tethering apex.

Test: m
Change-Id: Id4f30f48bd65175e17c419230a8e7ebf5339d713

Patrick Rohr   commited 2024-05-22 10:50:55 -07:00
15754248e8
prevent DscpPolicyTracker from printing big scary exception stack
when the program is missing due to too old kernel.
Program presence is already enforced by CRITICAL annotation and bpfloader.

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ic5f53636c833e65c611a7b8069f28c088c249158

Maciej Żenczykowski   commited 2024-04-26 22:48:30 +00:00
e950f6d39c
KernelUtils.h - add helpers
Change-Id: I03eff7e10a81f07d5e08fad49f753fa5b6be344e

Maciej Żenczykowski   commited 2024-04-25 14:19:39 -07:00
5016d6f801
NetBpfLoad: enable mainline on T+
Note:
   2 == BPFLOADER_S_VERSION
  19 == BPFLOADER_T_VERSION
  25 == BPFLOADER_OBJ_AT_VER_VERSION
  33 == BPFLOADER_IGNORED_ON_VERSION
  37 == BPFLOADER_U_VERSION [*]
  41 == BPFLOADER_V_VERSION [**]
and currently we have:
  42 == BPFLOADER_MAINLINE_VERSION
  43 == BPFLOADER_MAINLINE_T_VERSION
  44 == BPFLOADER_MAINLINE_U_VERSION
  45 == BPFLOADER_MAINLINE_V_VERSION

[*] udc-dev/udc-release are actually 38, as 37 was some earlier
    udc beta2 (2.1 ifirc), and beta3+ switched to 38

[**] 24Q{1,2}-release (ie. U QPR2+) are technically actually 41,
     but their platform bpfloader no longer even looks in /apex/com.android.tethering/etc/bpf/...
     so it doesn't really matter (although 24Q1's platform
     netbpfload still does, however that is obsoleted by
     this change)

Thus we need to (as minimum for NetBpfLoad):
  BPFLOADER_T_VERSION -> BPFLOADER_MAINLINE_T_VERSION
  BPFLOADER_IGNORED_ON_VERSION -> BPFLOADER_MAINLINE_U_VERSION
to cause these to load appropriately from mainline.

One would perhaps also expect (as minimum for NetBpfLoad):
  BPFLOADER_OBJ_AT_VERSION -> BPFLOADER_MAINLINE_U_VERSION
but (as maximum for platform bpfloader):
  BPFLOADER_OBJ_AT_VERSION -> BPFLOADER_MAINLINE_U_VERSION

However, since the goal is actually for those to load via mainline on T+,
(with the 'old' version of the .o's loading on S via platform bpfloader)
thus one actually needs (as minimum for NetBpfLoad):
  BPFLOADER_OBJ_AT_VERSION -> BPFLOADER_MAINLINE_T_VERSION
and (as maximum for platform bpfloader):
  BPFLOADER_OBJ_AT_VERSION -> BPFLOADER_T_VERSION

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I4b688692ffca0db7ead20cefd9e7e892ca92c70a

Maciej Żenczykowski   commited 2024-03-19 21:33:55 +00:00
11141da623
NetBpfLoad: chose bpfloader version at runtime based on Android OS
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Iee55d9c6f828f05d4096dff2e874abc6c41eadeb

Maciej Żenczykowski   commited 2024-03-18 15:02:53 -07:00
65f7022461
Eliminate spurious COMPILE_FOR_BPFLOADER_VERSION macro
and make platform bpf.o's target V's platform bpfloader.

Note that all mainline shipped bpf.o's already manually
specify BPFLOADER_MIN_VER.

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I67b73969def24e1e169c70c5fb1a402bf6e8cabc

Maciej Żenczykowski   commited 2024-03-15 18:14:16 +00:00
0de80f1a9f
add #define BPFLOADER_MAINLINE_VERSION 42u
See: //packages/modules/Connectivity/netbpfload/loader.cpp
  // This is Network BpfLoader v0.42
  #define BPFLOADER_VERSION_MAJOR 0u
  #define BPFLOADER_VERSION_MINOR 42u

Test: N/A
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ieeed6d402de06d3f01e151c2c9ee44270c53323c

Maciej Żenczykowski   commited 2024-03-12 06:31:36 +00:00
84aa9ea83a
bpf_helpers: add #defines for next 2 LTS KVERs
Test: N/A
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Iac303578071ff5dd3848f63c7497180d7694874b

Maciej Żenczykowski   commited 2024-03-10 22:11:54 +00:00
978b3f2d9b
[DON'T BLOCK] Test ownership migration rules
This CL is created as a best effort to migrate test targets
to the new android ownership model. If you find incorrect or unnecessary
attribution in this CL, please create a separate CL to fix that.

For more details please refer to the link below,
<add g3 doc link>

Bug: 304529413
Test: N/A
Change-Id: I243f17b3f0ad7af9ffa15ca242456e36688733f5
Merged-In: I243f17b3f0ad7af9ffa15ca242456e36688733f5

Aditya Choudhary   commited 2024-01-31 12:34:50 +00:00
01b5ede2b2
Add missing libc++ includes
Bug: 175635923
Test: m MODULES-IN-packages-modules-Connectivity
Change-Id: I94dafe991ccd73450671ea68eaf65b787dc1d0fa

Tomasz Wasilczyk   commited 2024-01-09 11:01:22 -08:00
661ec166c7
BpfRingBuf.h - implement wait()
Test: TreeHugger, atest BpfRingbufTest
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I2696077caf4de27dd64e4af1c45a13844ed186c9

Maciej Żenczykowski   commited 2023-11-11 00:59:42 +00:00
ddb0ab8c61
Merge "BpfRingBuf.h - implement isEmpty()" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2023-11-09 23:20:01 +00:00
ca6cf094b9
BpfRingBuf.h - implement isEmpty()
Test: TreeHugger, atest BpfRingbufTest
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I23020869ab665c029c3219b1b39c3749be6e6992

Maciej Żenczykowski   commited 2023-11-09 19:13:40 +00:00
0b99c961bb
switch SynchronizeKernelRCU back to jni - but from BpfMap
we can't use java for this, because pre-U-QPR2 does not include:
  https://android-review.googlesource.com/c/platform/system/sepolicy/+/2821590
  system_server dontaudit key_socket getopt

so we'll spew lots of:
  11-08 07:52:43.776 1469 1469 I auditd : type=1400 audit(0.0:4): avc: denied { getopt } for comm="system_server" scontext=u:r:system_server:s0 tcontext=u:r:system_server:s0 tclass=key_socket permissive=0
  11-08 07:52:44.360 1469 1469 I auditd : type=1400 audit(0.0:5): avc: denied { getopt } for comm="NetworkStats" scontext=u:r:system_server:s0 tcontext=u:r:system_server:s0 tclass=key_socket permissive=0
  11-08 07:52:44.508 1469 1469 I auditd : type=1400 audit(0.0:7): avc: denied { getopt } for comm="android.bg" scontext=u:r:system_server:s0 tcontext=u:r:system_server:s0 tclass=key_socket permissive=0
and the like.

This is due to Java's Os.close() in:
  libcore/luni/src/main/java/libcore/io/BlockGuardOs.java;l=100
calling:
  if (fd.isSocket$()) if (isLingerSocket(fd)) ...

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ib87fa5e8f0dfd9fbbccb25fb58a9fa78d6a07111

Maciej Żenczykowski   commited 2023-11-09 11:08:58 +00:00
c350db788a
BpfMap.h - simplify error returns
Returning the number of the file descriptor isn't actually useful since
it doesn't really tell you anything once the program has terminated.
(most logs we look at are long after the fact)

However, it does involve a fair bit of string processing to generate
the errors.  This is particularly an issue for things we constantly
call and sometimes expect to fail.  For example it is normal for
getNextKey() to fail with ENOENT at the end of iteration...

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ib94037440b5fcaa34cc8aa01b165431efabeb377

Maciej Żenczykowski   commited 2023-11-08 18:36:42 -08:00
0ad252e03c
remove dead portions of BpfUtils.java
(mostly to improve code coverage)

We can always revert if it ever turns out this is useful,
but I'd prefer for cgroup attach to be a once-at-boot
thing and handled either from bpfloader or the netd updatable
which are both directly C++ code.

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I79b5ca8a47388cb6b9189234942e74ab6056aab9

Maciej Żenczykowski   commited 2023-10-25 17:40:35 +00:00
de9d367ab2
type safety for kernel version
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: If05c0c5383dceeb65964143f5574d2ee1a484907

Maciej Żenczykowski   commited 2023-10-06 15:54:38 -07:00
3a64568abb
type safety for bool ignore_on_{eng,user,userdebug}
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ia85e16d1a7f8d1b21e4ce4c306db6bbea06138e0

Maciej Żenczykowski   commited 2023-10-06 14:57:12 -07:00
6dec6e9374
type safety for bool optional
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I6f10395ca6f1c73f3513031f561fdf1b1dedf451

Maciej Żenczykowski   commited 2023-10-06 14:48:43 -07:00
f2466ef4bb
type safety for bool shared
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I4883eab734f47522fec718f0709475f7e6dd0a53

Maciej Żenczykowski   commited 2023-10-06 14:46:11 -07:00
a262bd3d1e
move PRIVATE/SHARED/MANDATORY/OPTIONAL/{LOAD,IGNORE}_ON_* into core headers
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I7053ab46e73b763f64f36baf5e7ab64b62421045

Maciej Żenczykowski   commited 2023-10-06 14:25:41 -07:00
10da6d4e61
BpfClassic.h - add missing commas
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ife32fa36808de13c5f37ace497395dcc381ca336

Maciej Żenczykowski   commited 2023-10-06 13:50:13 -07:00
1e32277fff
more classic bpf macros
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I5c7fd55301cd5aa44502f8481923c86bc49ea914

Maciej Żenczykowski   commited 2023-10-04 22:41:21 +00:00
d5bf2061f3
TcUtils jni: jobject clazz -> jclass clazz
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I0a06d2627ef06fe4606b3d1a6525af767d218945

Maciej Żenczykowski   commited 2023-10-04 19:15:53 +00:00
f24beefe55
BpfUtils jni: jobject clazz -> jclass clazz
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I3fd51ad129873782b74c7c47b50e16f1f1f0fa6e

Maciej Żenczykowski   commited 2023-10-04 19:15:44 +00:00
b0f8d31e7d
bpf jni: add native_getProgramIdFromCgroup
Test: TreeHugger
Bug: 292156770
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ib7b194b9cbf6519f9fbcfd1fcefcbe5d825f5c3a

Maciej Żenczykowski   commited 2023-10-04 19:14:43 +00:00
85ac050b35
BpfSyscallWrappers: add queryProgram()
Test: TreeHugger
Bug: 292156770
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I0f77220a6c4b13efb5630d7a5ade1db39c59901e

Maciej Żenczykowski   commited 2023-10-04 19:12:25 +00:00
340e2ff355
BpfClassic.h - more helpers
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ie0eb8895c2d887b71ba886735ad106c1118ebeac

Maciej Żenczykowski   commited 2023-10-02 20:03:41 +00:00
73df7414f1
rename BPF2_REJECT_IF_ANY_BITS_SET -> BPF2_REJECT_IF_ANY_MASKED_BITS_SET
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I54a189f0f7b73917aa3fd049fe2eca387aaca250

Maciej Żenczykowski   authored and   Patrick Rohr   commited 2023-10-02 16:09:05 +00:00
b900201ffe
reverse BpfMap & BpfMapRO inheritence to make sense
Bug: 235590615
Bug: 235907076
Bug: 286003437
Test: TreeHugger, m droid gpuservice_unittest libtimeinstate_test bpf_benchmark bpf_module_test libbpf_load_test && mma
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I020a898fe8b257040a100f146654d4a04b19f843

Maciej Żenczykowski   commited 2023-09-29 00:44:33 +00:00
7e2f53e762
use different log.h header file
Test: TreeHugger
Bug: 299653233
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I1e5c7bfc86d2ad61c0bad3b5ef2add94b4ce1481

Maciej Żenczykowski   commited 2023-09-21 22:11:43 +00:00
601d9f8b65
bump min_sdk_version from 29 (Q) to 30 (R)
Mainline no longer supports Q.
These files were recently moved into p/m/C as part of a refactor.

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I0f06ace921db6c79d63c0048bdb73d167ff606cf

Maciej Żenczykowski   commited 2023-09-19 23:22:58 +00:00
127a1441c3
Merge remote-tracking branch 'remotes/aosp/tmp_libs_net_move' into libs_net_move_merge
frameworks/libs/net/common ->
packages/modules/Connectivity/staticlibs

frameworks/libs/net/client-libs ->
packages/modules/Connectivity/staticlbs/client-libs

Test: TH
Bug: 296014682
Change-Id: I5dc78f0c4653e20312ab3d488b1e69262dbb9840

Motomu Utsumi   commited 2023-09-11 11:53:46 +09:00
c480039309
fix a compile warning about out of order field init
http://cs/h/prodkernel/kernel/upstream/torvalds/linux-2.6/+/master:tools/include/uapi/linux/bpf.h?l=1486

struct { /* anonymous struct used by BPF_PROG_TEST_RUN command */
		__u32		prog_fd;
		__u32		retval;
		__u32		data_size_in;
		__u32		data_size_out;
		__aligned_u64	data_in;
		__aligned_u64	data_out;
...

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I2c08b65bdcdbd7fb9872b6d4cbbf542fe28ef916

Maciej Żenczykowski   commited 2023-09-06 23:51:37 +00:00
325f675273
Merge "BpfMap.h - hide getMap()" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2023-08-22 00:32:09 +00:00
1ef814da95
BpfMap.h - hide getMap()
This leaks (what should be) an internal only fd.

There's still multiple uses of getMap() left in:
  common/native/bpf_headers/BpfMapTest.cpp

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I87a36f3f935ba9148ae4456fc6bf14b0e04f6038

Maciej Żenczykowski   commited 2023-08-21 19:53:04 +00:00
12c0ea929c