Commit graph

1494 commits

Author SHA1 Message Date
Peter Collingbourne
694712b5d8 Merge "Remove fs_config lines for /data/*test*." into main 2024-05-24 17:45:56 +00:00
Peter Collingbourne
01edc0939f Remove fs_config lines for /data/*test*.
These lines were originally added to avoid needing to manually chmod
+x files pushed to these directories on the device, but adb push now
automatically copies the x bit from the host for paths without an
fs_config, so they should no longer be necessary.

Bug: 341415989
Change-Id: I83007dfe05de7b86c26373460af1f199a6d21147
2024-05-23 14:26:14 -07:00
Kiyoung Kim
110308e5ab Merge "Remove VNDK definition(s)" into main 2024-05-23 00:38:19 +00:00
Peter Collingbourne
4a57c8f4f2 adb: Do not use fs_config unless we are root (try 3).
This enables fs_config for /data when pushing files as root. Also,
without this, adb push to /tmp fails as the shell user.

When pushing to a directory that does not have an explicit
fs_config, such as /data/local/tmp or /tmp, use the original
file mode. Because adb copies u permissions into g and o
(and in general because the umask on the host may have
made these files world writable), this requires adding more
fs_config entries to cover directories that may contain dex files
i.e. /{odm,product,system,system_ext,vendor}/{framework,app,priv-app}
to avoid hitting a SecurityException caused by writable dex files, e.g.

04-01 21:22:16.980 10110  4815  4815 E AndroidRuntime: FATAL EXCEPTION: main
04-01 21:22:16.980 10110  4815  4815 E AndroidRuntime: Process: android.test.app.system_priv, PID: 4815
04-01 21:22:16.980 10110  4815  4815 E AndroidRuntime: java.lang.SecurityException: Writable dex file '/system/priv-app/loadlibrarytest_system_priv_app/loadlibrarytest_system_priv_app.apk' is not allowed.
04-01 21:22:16.980 10110  4815  4815 E AndroidRuntime:  at dalvik.system.DexFile.openDexFileNative(Native Method)
04-01 21:22:16.980 10110  4815  4815 E AndroidRuntime:  at dalvik.system.DexFile.openDexFile(DexFile.java:406)

Bug: 171233429
Bug: 311263616
Change-Id: I18f70095c793d08a25ff59e1851f6dc7648ce4dc
2024-04-01 15:18:49 -07:00
Kiyoung Kim
ad8cf52c4c Remove VNDK definition(s)
As of VNDK deprecation, any libraries that defines vndk is no longer
valid anymore. This change removes all VNDK definition(s) from modules
which was VNDK. Any former VNDK-SP libraries will be marked as double-loadable,
so it can keep be able to be referenced by LLNDK libraries.

Bug: 328994089
Test: AOSP CF build succeeded
Change-Id: I1662f16e5e446bb28167b0bb278cd63997267d2a
2024-03-15 08:19:44 +00:00
Xin Li
ba485e7f71 Merge "Merge Android 14 QPR2 to AOSP main" into main 2024-03-07 06:10:51 +00:00
Michael Hoisie
1140355bde Merge "Remove the redundant libcutils_sockets_test" into main 2024-03-07 06:01:19 +00:00
Michael Hoisie
d1e4c263c4 Remove the redundant libcutils_sockets_test
'sockets_test.cpp' also runs as part of libcutils_test and
libcutils_static_test, so it is redundant to have it be a separate
target.

Test: libcutils_test
Test: libcutils_static_test
Bug: 317884162
Change-Id: Ib2c2f74feb79d1436ca67ae9aca18d3eb7acf5a0
2024-03-06 22:18:58 +00:00
Vilas Bhat
89482bd443 Merge "ashmem: Remove hardcoded PAGE_SIZE usage in ashmem_test" into main am: 89fa277dcb
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2954211

Change-Id: I5bbb4901353724821d7a1c06bf1df37986f804b4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-14 01:11:32 +00:00
Vilas Bhat
89fa277dcb Merge "ashmem: Remove hardcoded PAGE_SIZE usage in ashmem_test" into main 2024-02-14 00:51:11 +00:00
Vilas Bhat
f791b99628 ashmem: Remove hardcoded PAGE_SIZE usage in ashmem_test
Bug: 323061793
Test: atest libcutils_test
Change-Id: I8defd5225859b52a1b96a638d418188b328a23bc
2024-02-13 20:50:00 +00:00
David Dai
f3337f69df Merge "Add AID for Virtual Machines" into main am: 161b80bd02
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2945529

Change-Id: I92a8f7a1c8d8fc5e0fe2c0ae39ac0b018e4cb462
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-06 01:59:21 +00:00
David Dai
851c9c825f Add AID for Virtual Machines
Add a new AID for Virtual Machines so we can grant
capabilities such as CAP_SYS_NICE.

Bug: 322197421
Test: Build and boots, and verified capabilities

Change-Id: Ie893ba8ed6956a554bccfbd00e4e6fe9212ea77d
Signed-off-by: David Dai <davidai@google.com>
2024-02-05 23:38:44 +00:00
Xin Li
7f41fd4852 Merge Android 24Q1 Release (ab/11220357)
Bug: 319669529
Merged-In: I856c812d22363cc1d1e8aa88706d4d3b89044f52
Change-Id: I9ef2aa7496bbf81f7f0da6b0ea46dc2157ad91f1
2024-01-29 21:19:57 -08:00
Yu-Ting Tseng
38cb94d32a Add AID_UPROBESTATS and set up its config dir.
Test: m, flash and reboot
Bug: 296108553
Change-Id: Ied5e688db8e93874ad66610c4d98c39d892d268b
2023-11-29 10:56:37 -08:00
Sophia Coldren
6221f6ed75 Merge "Add an include" into main am: d32b562ee9 am: b9a6391c7a am: b8b6762c0f am: c975c6ef4d am: 4111484a92
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2776100

Change-Id: I366cccdc8e54130db1d9bbde2957956b631bbf02
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-07 00:48:01 +00:00
Sophia Coldren
5880692ae2 Add an include
Change-Id: I0a6c64d9f1ddd9211de994fd4c6c44d53499775f
2023-10-06 18:46:17 +00:00
Elliott Hughes
aef90ea853 Merge "s/master/main/" into main am: b533f531df am: 5cc875126a am: 061a92c8ae am: fc090e5055 am: 01a560055c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2772867

Change-Id: I4db6a0255b074444014e4116961e3b4df40c1dbf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-05 18:46:11 +00:00
Elliott Hughes
716ff7b55a s/master/main/
Test: treehugger
Change-Id: Iabb23436d92686b934f2f2609217714b64ae75de
2023-10-04 23:31:09 +00:00
Elliott Hughes
6ec6769f03 Merge "Stop duplicating <linux/capabilities.h>." into main am: 8d983ee878 am: a441e2ef67 am: edb21216e2 am: 798327b6a4 am: 952aa920a0
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2760169

Change-Id: I1112912c33b2d94ab841fd1cad0f3a0ce61fc71d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-26 23:24:51 +00:00
Elliott Hughes
8d983ee878 Merge "Stop duplicating <linux/capabilities.h>." into main 2023-09-26 17:59:53 +00:00
Elliott Hughes
94ccdc06d0 Stop duplicating <linux/capabilities.h>.
This doesn't help the person who wants CAP_BPF, but we can fix that
better by adding it to our stale glibc (and our future switch to musl
will mean we'll never have similar problems again).

I think this just dates from when we still supported building the OS on
darwin, but those days are long gone, and I think this hack can be put
to rest now...

Test: treehugger
Change-Id: I3c2e56c68a5b00c1ad0aed422c6ce60886063f50
2023-09-25 20:33:02 +00:00
Treehugger Robot
19c054cc4f Merge "Do not check with vendor vndk version" into main am: 6d01651ab9 am: 9062abf0e5 am: fcdbce7f33 am: 3147ebc654 am: b94f5ee99f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2758806

Change-Id: I6380bec21baec416a9e9bd53b8e88610447d5db7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-23 17:50:46 +00:00
Kiyoung Kim
45d88d496e Do not check with vendor vndk version
Current libcutils checks if memfd is supported with vendor VNDK version,
but this is no longer valid if VNDK is deprecated. As we can assume that
any vendor using this code is supported as long as it is treblelized,
simplify logic to check if memfd is valid to vendor only with
'ro.treble.enabled' property.

Bug: 290159430
Test: Cuttlefish with VNDK deprecated worked without error from
libcutils

Change-Id: I351f0798da99cb4827bc3e424b63a2eaee5c7461
2023-09-23 21:06:57 +09:00
Elliott Hughes
7318616f3a Merge "Remove Windows workaround in file not built for Windows." into main am: d091aa44b3 am: 503121ccea am: c1342bc826 am: 00f9682031 am: c358a91207
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2760267

Change-Id: I21d5323b5949195da985bddd8b868045dded6f9a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-23 02:20:43 +00:00
Elliott Hughes
d091aa44b3 Merge "Remove Windows workaround in file not built for Windows." into main 2023-09-22 22:56:38 +00:00
Treehugger Robot
525030f42e Merge "Remove unused files." into main am: 59a2cde894 am: 1a262a11d4 am: e2145d2fbb am: 510fd0f2b5 am: c9670bd7e0
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2759693

Change-Id: Iefd09423e207ca318d2bc95c1e7fc1e2691e2a00
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-22 22:44:48 +00:00
Treehugger Robot
c5851eded9 Merge "Don't duplicate uapi ioprio constants." into main am: 46c366b0ed am: de1aeee88d am: ab62e7d3b0 am: f2c81fdd01 am: 239978de62
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2759694

Change-Id: I7f6efb219fa48302f3d759cf686a5a696210b78a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-22 22:44:39 +00:00
Treehugger Robot
d4eca869d6 Merge "Remove redefinition of uapi constant added in R." into main am: d5b09b4b97 am: c3bbf8237a am: 7a1d3efb41 am: 5c30491a99 am: 73f83e22f9
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2760268

Change-Id: I784e9d263d970a94f3305776bb9505aba7c4cab0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-22 22:41:25 +00:00
Treehugger Robot
59a2cde894 Merge "Remove unused files." into main 2023-09-22 18:01:48 +00:00
Treehugger Robot
46c366b0ed Merge "Don't duplicate uapi ioprio constants." into main 2023-09-22 18:00:19 +00:00
Elliott Hughes
f6a84e4462 Remove Windows workaround in file not built for Windows.
Test: treehugger
Change-Id: I311cfbc9245cbe90ed6fc4fa379ff5b9abdf21e7
2023-09-22 15:44:42 +00:00
Elliott Hughes
3369fe9cbb Don't duplicate uapi ioprio constants.
This code is only used in init and vold, so I suspect all the
conditional compilation could be moved into the .bp file instead, but
I'm just trying to clean up duplication today...

Test: treehugger
Change-Id: I97013f5de41e109a0cc377400c396145aed569db
2023-09-22 14:51:26 +00:00
Elliott Hughes
1faedd02a3 Remove redefinition of uapi constant added in R.
Test: treehugger
Change-Id: If0ef9c36b2f54eb59d222dedc6bf575d46c9db1d
2023-09-22 14:45:20 +00:00
Elliott Hughes
7107c582fa Remove unused files.
Test: treehugger
Change-Id: I7ea71395b87eb12044fb3e7d19c171149f4cc90b
2023-09-22 14:33:47 +00:00
Keith Mok
f83c5c8fec Add seal if ashmem-dev is backed by memfd
Need to seal the buffer size in align with ashmem if set to PROT_READ
only to prevent untrusted remote process to shrink the buffer size and
crash it.

Bug: 294609150
Test: build
Ignore-AOSP-First: Security
Change-Id: I9288cf30b41e84ad8d3247c204e20482912bff69
2023-09-05 22:06:21 +00:00
Tomasz Wasilczyk
6cf9cd0123 Revert "Revert "Remove cutils threads.h header completely.""
This reverts commit c37838eec8.

Reason for revert: b/296247274 root-cause fixed

Change-Id: I859e7500a1dd09e3a66986cda9e62adf5d7a524a
2023-08-16 22:37:14 +00:00
Bruce Po
c37838eec8 Revert "Remove cutils threads.h header completely."
This reverts commit d3550e3314.

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=git_tm-qpr-dev-plus-aosp&target=aosp_sunfish-userdebug&lkgb=10667572&lkbb=10667604&fkbb=10667601, bug http://b/296247274

Change-Id: I3f3864dc21fcb34cbb2ff524c43c3d92bd260ff6
BUG: 296247274
2023-08-16 17:38:09 +00:00
Tomasz Wasilczyk
d3550e3314 Remove cutils threads.h header completely.
Bug: 289414897
Test: it builds
Change-Id: Ifcde5849923f19f1c898a6a95811eea55be0d276
2023-08-10 15:12:05 +00:00
Treehugger Robot
0c0dafae8d Merge "Remove gettid symbol from cutils" into main 2023-08-10 04:13:24 +00:00
Treehugger Robot
a981d58972 Merge "Remove sub-includes from libcutils/threads.h" into main 2023-08-09 16:43:32 +00:00
Treehugger Robot
a28b62e0c7 Merge "Add snapuserd_ramdisk execute permission" into main 2023-08-07 18:46:33 +00:00
Tomasz Wasilczyk
8b0160868e Remove gettid symbol from cutils
Bug: 289414897
Test: it builds
Change-Id: I3b4c8b35dbf47e41d1fb0912fedc05e6545bd3d7
2023-08-03 22:16:30 +00:00
Tomasz Wasilczyk
d22098f65d Remove sub-includes from libcutils/threads.h
This will drop any incentive to use this header

Bug: 289414897
Test: it builds
Change-Id: I3d7f56ac027f59794cb4cf533847c5fda5529906
2023-08-03 22:16:23 +00:00
Tomasz Wasilczyk
21a0716613 Remove gettid declaration from cutils
Bug: 289414897
Test: it builds
Change-Id: I22d93406cf065c0e3c7d94e800763974d228ee21
2023-08-03 22:16:12 +00:00
Ray-cy.lee
d865493814 Add snapuserd_ramdisk execute permission
Bug: 294192189
Test: th
Change-Id: I42ff176ffb7eae0ac05e7f9cc54090c82df982b5
2023-08-02 16:27:50 +00:00
Tomasz Wasilczyk
8fe4f073c2 Add bug component to cutils
Bug: 289414897
Test: N/A
Change-Id: Ic7122e52c3847beba3891b121b723d19bf2076de
2023-07-27 10:16:05 -07:00
Hao Chen
8dad4b2b8a Merge "threads.h: avoid defining gettid on glibc >= 2.30" into main 2023-07-18 21:38:34 +00:00
Hao Chen
253445ce3a threads.h: avoid defining gettid on glibc >= 2.30
The issue in https://bugs.chromium.org/p/chromium/issues/detail?id=1182060 also
exists on glibc 2.30 and 2.31 since `gettid` was Introduced in glibc 2.30.

See https://man7.org/linux/man-pages/man2/gettid.2.html

Bug: 285204695
Test: Build
Change-Id: I7e534edf8c0a20c415232bcfffabbf2c1d6eec98
2023-07-18 19:52:19 +00:00
Kiyoung Kim
a4648c2be0 Enable ABI dump for libcutils
Enable ABI dump for libcutils, so ABI can be stabilized from any update
after official release.

Bug: 254141417
Test: abidiff intermediates found from libcutils.vendor build
Change-Id: Ic27c82b908b7836c7bc538a24202ed8adba4d048
2023-07-13 07:23:39 +00:00