Commit graph

1439 commits

Author SHA1 Message Date
Elliott Hughes
22e082e87a Split up the system/core/ TEST_MAPPING.
A lot of things had moved out of system/core/ without their TEST_MAPPING
entries having gone with them, reducing the amount of presubmit coverage
for those things.

In order to reduce the likelihood of that happening again, I've pushed
all that remained in the system/core/ TEST_MAPPING down into the
individual subdirectories.

Test: treehugger
Change-Id: Ib75d65f9200fa64ae1552471da6fbe5b7023cf94
2021-08-16 16:37:10 -07:00
Joel Galenson
b1f70d5eaa Migrate Rust libcutils bindings into librustutils.
Bug: 182498247
Test: Build
Change-Id: I535091d1afaa9225f824a3fde8bcffb867f64da8
2021-07-30 07:40:24 -07:00
Bowgo Tsai
ebb79debcc Revert "Add systrace tag for system property"
Revert "Add systrace tag for system property"

Revert "Add systrace tag for system property"

Revert "Adding system property tracing"

Revert submission 1403568-sysprop_trace

Reason for revert: makes property get/set non-reentrant
Reverted Changes:
I6f85f3f52:Add systrace tag for system property
Id2b93acb2:Adding system property tracing
Id78992d23:Add systrace tag for system property
I1ba9fc7bd:Add systrace tag for system property

Ignore-AOSP-First: b/193050299#comment17

Bug: 193050299
Change-Id: I9305003531c6a86194d55dc72c613337d213b53d
Merged-In: I9305003531c6a86194d55dc72c613337d213b53d
Test: build and boot a device
(cherry picked from commit 18e0f65cbf)
2021-07-21 09:22:27 +08:00
Andrew Walbran
3aedc7edc8 Rename VirtManager to VirtualizationService.
Bug: 188042280
Test: atest VirtualizationTestCases
Change-Id: I0e549ef02c7327f57c3d04853b3eefed7403d8e8
2021-05-24 11:41:13 +00:00
Roshan Pius
e85201bbeb filesystem_config: Add a aid/uid for UWB subsystem
Bug: 186788640
Test: Compiles
Change-Id: Ib3d1b064e8e68e7b9e59b26f356ac7c4da2eaaf8
2021-04-29 14:57:07 -07:00
Christian Wailes
8ef7d82213 Merge "Added ARTD user" 2021-04-28 16:41:09 +00:00
Joel Galenson
a29a23a466 Use the new more inclusive command-line options.
Test: Compile
Change-Id: I574334b0c12759774b2d8c1671eb4ebc25d160b5
2021-04-19 09:20:30 -07:00
Paul Crowley
37a413d1c3 Revert^2 "Expose AID_KEYSTORE"
Revert submission revert-1660531-max-boot-level-crypto-KFMCEDKSIV

Reason for revert: topic:vold-use-keystore2 has landed fixing the bug

Reverted changes:
Ibf63734a: Revert "Set earlyBootEnded before apex starts"
Id02f63a7: Revert "Expose AID_KEYSTORE"
Ibcedeff4: Revert "Cryptographic security for MAX_BOOT_LEVEL"

Restored changes:
Ia3b968afc:Set earlyBootEnded before apex starts
Ia69891291:Expose AID_KEYSTORE
I12530cd13:Cryptographic security for MAX_BOOT_LEVEL

Reverted-SHA1: a801eabe11

Original commit message:
Keystore uses this as the user ID for keys that it creates for its
own use.

Bug: 176450483
Test: atest com.android.tests.odsign.OnDeviceSigningHostTest#verifyArtUpgradeSignsFiles
Change-Id: I0e2baa8807281ec9e5cc0a9ff8daff191285a600
2021-04-08 11:23:32 -07:00
Ulyana Trafimovich
a801eabe11 Revert "Expose AID_KEYSTORE"
Revert "Cryptographic security for MAX_BOOT_LEVEL"

Revert submission 1660531-max-boot-level-crypto

Reason for revert: broken test com.android.tests.odsign.OnDeviceSigningHostTest#verifyArtUpgradeSignsFiles on aosp-master on aosp_cf_x86_64_phone-userdebug at 7261517

Reverted Changes:
Ia3b968afc:Set earlyBootEnded before apex starts
Ia69891291:Expose AID_KEYSTORE
I12530cd13:Cryptographic security for MAX_BOOT_LEVEL

Bug: 184635938
Change-Id: Id02f63a794544d650abb95c8e7f201eea03391eb
Test: forrest run for the broken test
2021-04-06 16:07:07 +00:00
Chris Wailes
9fd4627645 Added ARTD user
Test: boot and check for artd process
Bug: 177273468
Change-Id: Ic5a3f626598d5347dfada8f67c07c55c7da29f5f
2021-04-05 15:46:14 -07:00
Paul Crowley
8306ab68f7 Expose AID_KEYSTORE
Keystore uses this as the user ID for keys that it creates for its
own use.

Bug: 176450483
Test: keystore2_test
Change-Id: Ia698912917cd209eebcfc007a8badce7a39159d6
2021-04-03 08:38:41 -07:00
Jeffrey Vander Stoep
0b99f553ae Merge "Add UID for virtmanager" 2021-03-29 07:26:44 +00:00
Jeff Vander Stoep
3502c2be94 Add UID for virtmanager
Bug: 183583115
Test: ps -AZ | grep virtmanager
u: r:virtmanager:s0             virtmanager   2453     1 10930880  4544 0                   0 S virtmanager
Change-Id: Iddf8e21cb1039a5f50aa0619a708b59bec004cfc
2021-03-25 22:17:52 +01:00
Joel Galenson
0d38329999 Add Rust bindings
We currently only need these few symbols.

Test: Use them from Rust.
Fixes: 175619259
Change-Id: I0c2ca708c5a6ab550af7103754db775ffbca245b
2021-03-24 12:31:30 -07:00
Mathew Inwood
9a74174efe Merge "Set /system/xbin permissions to 750." 2021-03-23 11:25:21 +00:00
Elliott Hughes
39d6c8eef8 Really fix Mac build.
This reverts commit 66bfb9adac, and
instead includes a header that has a definition of TEMP_FAILURE_RETRY
for macOS.

Bug: http://b/181852591
Test: N/A
Change-Id: I63ccdcb58a2b2806217e3faedde9ba33936c8189
2021-03-08 10:59:36 -08:00
Elliott Hughes
66bfb9adac Fix Mac build.
The Mac doesn't need fs_config (there's a `darwin: { enabled: false } }`
at the only caller), so stop trying to build it here rather than fix it
so it builds again.

Test: treehugger
Change-Id: I88d6b3a44b1ab823a419789d8545fcf10061079c
2021-03-05 17:58:28 -08:00
Treehugger Robot
0b589672e9 Merge "Ban exit-time destructors in libcutils." 2021-03-05 21:54:52 +00:00
Adrian Ratiu
a742158667 threads.h: avoid defining gettid on glibc >= 2.32
Glibc >=2.32 exposes a gettid() which clashes with libcutils
thread.h, so add a check to not expose it if building against
newer glibc (ChromiumOS will still use glibc 2.27 besides 2.32).

Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1182060
Test: Builds without errors on both glibc 2.32 and 2.27.

Change-Id: Ib71fa1bc9fa185e3668002407dbed05a80c87740
2021-03-05 09:55:15 +00:00
Elliott Hughes
527d71fd69 Ban exit-time destructors in libcutils.
We don't have any right now. Let's keep it that way.

Also remove a bunch of duplication/cruft in the build file.

Test: treehugger
Change-Id: I406985592c175f45660e87adb05231bce0804893
2021-03-04 09:18:19 -08:00
Bob Badour
d69ad69a93 [LSC] Add LOCAL_LICENSE_KINDS to system/core
Added SPDX-license-identifier-Apache-2.0 to:
  bootstat/Android.bp
  cli-test/Android.bp
  code_coverage/Android.bp
  cpio/Android.bp
  debuggerd/crasher/Android.bp
  debuggerd/proto/Android.bp
  diagnose_usb/Android.bp
  fs_mgr/libdm/Android.bp
  fs_mgr/libfiemap/Android.bp
  fs_mgr/liblp/Android.bp
  fs_mgr/libsnapshot/Android.bp
  fs_mgr/libstorage_literals/Android.bp
  fs_mgr/libvbmeta/Android.bp
  fs_mgr/tests/Android.bp
  fs_mgr/tools/Android.bp
  gatekeeperd/Android.bp
  healthd/Android.bp
  healthd/testdata/Android.bp
  init/Android.bp
  init/Android.mk
  init/sysprop/Android.bp
  init/test_kill_services/Android.bp
  init/test_service/Android.bp
  libappfuse/Android.bp
  libasyncio/Android.bp
  libbinderwrapper/Android.bp
  libcrypto_utils/Android.bp
  libcrypto_utils/tests/Android.bp
  libdiskconfig/Android.bp
  libgrallocusage/Android.bp
  libkeyutils/mini_keyctl/Android.bp
  libmodprobe/Android.bp
  libnetutils/Android.bp
  libpackagelistparser/Android.bp
  libprocessgroup/Android.bp
  libprocessgroup/cgrouprc/Android.bp
  libprocessgroup/cgrouprc_format/Android.bp
  libprocessgroup/profiles/Android.bp
  libprocessgroup/setup/Android.bp
  libqtaguid/Android.bp
  libsparse/Android.bp
  libstats/push_compat/Android.bp
  libsuspend/Android.bp
  libsync/Android.bp
  libsystem/Android.bp
  libsysutils/Android.bp
  libusbhost/Android.bp
  libutils/Android.bp
  libvndksupport/Android.bp
  libvndksupport/tests/Android.bp
  llkd/Android.bp
  llkd/tests/Android.bp
  property_service/libpropertyinfoparser/Android.bp
  property_service/libpropertyinfoserializer/Android.bp
  property_service/property_info_checker/Android.bp
  qemu_pipe/Android.bp
  reboot/Android.bp
  rootdir/Android.bp
  rootdir/Android.mk
  rootdir/avb/Android.bp
  rootdir/avb/Android.mk
  run-as/Android.bp
  sdcard/Android.bp
  set-verity-state/Android.bp
  shell_and_utilities/Android.bp
  storaged/Android.bp
  toolbox/Android.bp
  trusty/apploader/Android.bp
  trusty/confirmationui/Android.bp
  trusty/confirmationui/fuzz/Android.bp
  trusty/coverage/Android.bp
  trusty/fuzz/Android.bp
  trusty/fuzz/test/Android.bp
  trusty/gatekeeper/Android.bp
  trusty/gatekeeper/fuzz/Android.bp
  trusty/keymaster/Android.bp
  trusty/keymaster/fuzz/Android.bp
  trusty/libtrusty/Android.bp
  trusty/libtrusty/tipc-test/Android.bp
  trusty/secure_dpu/Android.bp
  trusty/storage/interface/Android.bp
  trusty/storage/lib/Android.bp
  trusty/storage/proxy/Android.bp
  trusty/storage/tests/Android.bp
  trusty/utils/spiproxyd/Android.bp
  trusty/utils/trusty-ut-ctrl/Android.bp
  usbd/Android.bp
  watchdogd/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to:
  debuggerd/Android.bp
  fastboot/Android.bp
  libkeyutils/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD
    SPDX-license-identifier-MIT
to:
  libcutils/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-MIT
to:
  fs_mgr/Android.bp
  fs_mgr/libfs_avb/Android.bp
  trusty/Android.bp
  trusty/utils/rpmb_dev/Android.bp

Added SPDX-license-identifier-BSD
to:
  fastboot/fuzzy_fastboot/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: Id740a7d2884556081fdb68876584b25eb95e1bef
2021-02-19 12:59:05 -08:00
Primiano Tucci
c89dd8594e Merge "Do not check for debuggable / profilable for app tracing." 2021-02-18 17:52:31 +00:00
Elliott Hughes
c3a206ccda Revert "[LSC] Add LOCAL_LICENSE_KINDS to system/core"
This reverts commit 187b7d1950.

Reason for revert: system/core is multiple projects, not one.

Change-Id: I790ea41741f8cd9b8b6db2f59a49e71fb0958fd6
2021-02-16 20:01:20 +00:00
Bob Badour
187b7d1950 [LSC] Add LOCAL_LICENSE_KINDS to system/core
Added SPDX-license-identifier-Apache-2.0 to:
  bootstat/Android.bp
  cli-test/Android.bp
  code_coverage/Android.bp
  cpio/Android.bp
  debuggerd/crasher/Android.bp
  debuggerd/proto/Android.bp
  diagnose_usb/Android.bp
  fs_mgr/libdm/Android.bp
  fs_mgr/libfiemap/Android.bp
  fs_mgr/liblp/Android.bp
  fs_mgr/libsnapshot/Android.bp
  fs_mgr/libstorage_literals/Android.bp
  fs_mgr/libvbmeta/Android.bp
  fs_mgr/tests/Android.bp
  fs_mgr/tools/Android.bp
  gatekeeperd/Android.bp
  healthd/Android.bp
  healthd/testdata/Android.bp
  init/Android.bp
  init/Android.mk
  init/sysprop/Android.bp
  init/test_kill_services/Android.bp
  init/test_service/Android.bp
  libappfuse/Android.bp
  libasyncio/Android.bp
  libbinderwrapper/Android.bp
  libcrypto_utils/Android.bp
  libcrypto_utils/tests/Android.bp
  libdiskconfig/Android.bp
  libgrallocusage/Android.bp
  libkeyutils/mini_keyctl/Android.bp
  libmodprobe/Android.bp
  libnetutils/Android.bp
  libpackagelistparser/Android.bp
  libprocessgroup/Android.bp
  libprocessgroup/cgrouprc/Android.bp
  libprocessgroup/cgrouprc_format/Android.bp
  libprocessgroup/profiles/Android.bp
  libprocessgroup/setup/Android.bp
  libqtaguid/Android.bp
  libsparse/Android.bp
  libstats/push_compat/Android.bp
  libsuspend/Android.bp
  libsync/Android.bp
  libsystem/Android.bp
  libsysutils/Android.bp
  libusbhost/Android.bp
  libutils/Android.bp
  libvndksupport/Android.bp
  libvndksupport/tests/Android.bp
  llkd/Android.bp
  llkd/tests/Android.bp
  property_service/libpropertyinfoparser/Android.bp
  property_service/libpropertyinfoserializer/Android.bp
  property_service/property_info_checker/Android.bp
  qemu_pipe/Android.bp
  reboot/Android.bp
  rootdir/Android.bp
  rootdir/Android.mk
  rootdir/avb/Android.bp
  rootdir/avb/Android.mk
  run-as/Android.bp
  sdcard/Android.bp
  set-verity-state/Android.bp
  shell_and_utilities/Android.bp
  storaged/Android.bp
  toolbox/Android.bp
  trusty/apploader/Android.bp
  trusty/confirmationui/Android.bp
  trusty/confirmationui/fuzz/Android.bp
  trusty/coverage/Android.bp
  trusty/fuzz/Android.bp
  trusty/fuzz/test/Android.bp
  trusty/gatekeeper/Android.bp
  trusty/gatekeeper/fuzz/Android.bp
  trusty/keymaster/Android.bp
  trusty/keymaster/fuzz/Android.bp
  trusty/libtrusty/Android.bp
  trusty/libtrusty/tipc-test/Android.bp
  trusty/secure_dpu/Android.bp
  trusty/storage/interface/Android.bp
  trusty/storage/lib/Android.bp
  trusty/storage/proxy/Android.bp
  trusty/storage/tests/Android.bp
  trusty/utils/spiproxyd/Android.bp
  trusty/utils/trusty-ut-ctrl/Android.bp
  usbd/Android.bp
  watchdogd/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to:
  debuggerd/Android.bp
  fastboot/Android.bp
  libkeyutils/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD
    SPDX-license-identifier-MIT
to:
  Android.bp
  libcutils/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-MIT
to:
  fs_mgr/Android.bp
  fs_mgr/libfs_avb/Android.bp
  trusty/utils/rpmb_dev/Android.bp

Added SPDX-license-identifier-BSD
to:
  fastboot/fuzzy_fastboot/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: I5bd81adb5cdcf2b4dd4141b204eb430ff526af8f
2021-02-16 04:10:03 -08:00
Florian Mayer
cae942d7ac Do not check for debuggable / profilable for app tracing.
This is undocumented and surprising behaviour.

Bug: 179883548
Change-Id: I373b176d4ed9f6b0e970d055d7e4e2686c6d3991
2021-02-12 16:54:51 +00:00
Florian Mayer
f124707283 Allow to target atrace apps by glob.
Test: Run trace against "com.google.android.*" and use camera.
Bug: 180021291
Change-Id: I9baa7847476b152284e7557e27f1eba1ee835695
2021-02-11 19:31:48 +00:00
Mitch Phillips
391157659b [MemInit] Remove process_disable_memory_mitigations
This function is no longer necessary, and uses a deprecated API
(mallopt(M_BIONIC_DISABLE_MEMORY_MITIGATIONS)). This function was
provided originally as part of libcutils because the original API was a
private android_mallopt.

The API is being reborn as a memory-init-specific mallopt. Given that
regular system components and apps will be able to call it directly,
it's not necessary to have a wrapper function in libcutils any more.

Bug: 135772972
Test: Build the device.
Change-Id: I4a3185b99702c8e445de6837b154c4a96c8295a1
2021-01-20 16:07:49 -08:00
Elliott Hughes
4444824902 Fix macOS build.
Bug: http://b/177702122
Test: treehugger
Change-Id: I64ad7f506fb241c5f949c7bbac55a26161bd510e
2021-01-15 17:46:28 -08:00
Elliott Hughes
66304a0ada Move cutils over to mallopt().
Bug: http://b/135772972
Test: treehugger
Change-Id: I35e0fc657f2e4cecea2a29f78cad148895413e17
2021-01-15 11:18:24 -08:00
Treehugger Robot
c5f423f903 Merge "libcutils: make it clearer that libcutils is just janitors." 2020-12-10 20:51:21 +00:00
Elliott Hughes
857a6f41ad libcutils: make it clearer that libcutils is just janitors.
Test: N/A
Change-Id: Iddfb0bb30b806f3364a64918df971c0a3e8220a0
2020-12-10 11:27:49 -08:00
Elliott Hughes
dcf81848cb Remove thread_store_set()/thread_store_get().
C++ thread_local is less code to write, and performs better. All known
users have been moved over already.

Test: treehugger
Change-Id: Idaa2a58bf23342dae08dd6b9003d8f532839b351
2020-12-07 10:54:53 -08:00
Treehugger Robot
77692aeea2 Merge "Make libcutils' thread local stuff more clearly deprecated." 2020-12-07 17:58:30 +00:00
Justin Yun
feef4d390f Add product_available to product available modules
vendor_available modules were available to product modules.
However, not all vendor_available modules are required to be
available to product modules. Some modules want to be available only
to product modules but not vendor modules.

To cover the requirement, we separate product_available from
vendor_available.
vendor_available will not provide product available module.

Rename libcutils/include_vndk to libcutils/include_outside_system as
it provides the headers to the modules outside the system partition
including /product.

Bug: 150902910
Test: build
Change-Id: I791b5a6a1dc99442065debfce6fa0f54a335fcea
2020-12-04 09:59:20 +09:00
Elliott Hughes
0675702c62 Make libcutils' thread local stuff more clearly deprecated.
libcutils' thread local stuff is almost unused already, so let's try
harder to prevent new users. (In parallel I'll try to actually move the
four existing users off it, so we can actually remove this.)

Test: treehugger
Change-Id: Ib5445a43cff1f161ce1c7a45959d5b126f6f6980
2020-12-02 11:22:29 -08:00
Yifan Hong
c7ed02f445 fs_config Add first_stage_ramdisk/system/bin/linker[64]
Now that tune2fs and resize2fs may be dynamic, add linker[64] to
first_stage_ramdisk/system/bin.

Test: boot and examine serial output, ensure tune2fs and resize2fs
      can be executed.
Bug: 173425293

Change-Id: I35699b38ddf5004c04ec0adc1b0c54d5d9c92ae6
2020-11-19 17:35:21 -08:00
Yifan Hong
55015ffb82 libcutils: make vendor_ramdisk_available.
Test: builds
Bug: 156098440
Change-Id: I663a3839e402a83ebf31b8a680c61f1e269548f6
2020-10-28 10:57:51 -07:00
Steven Moreland
d22659b8ea libcutils: API to disable memory mitigations
Convenience API to disable memory mitigations, where we can specify
logging and also have a single place to update once a related bug is
fixed.

Bug: 166675194
Test: use API to disable memory mitigations
Change-Id: I4a3529ea1911925c49e31cc3809c2743e401c196
2020-10-10 00:16:24 +00:00
Tom Cherry
167fbf534b Delete include/private/android_filesystem_config.h
This header should be accessed through libcutils.

Test: build
Change-Id: Ifb0ad3bc63ec5806d9c474a5d39721b2189c34de
2020-10-05 15:26:24 +00:00
Akilesh Kailash
dfb1e08ab3 libcutils_static: Make ramdisk available for snapuserd daemon
Bug: 168258493
Test: cow_snapuserd_test
Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: I0fef4009e86ee93b7c2a752c7dba43914342d943
2020-10-02 15:49:16 +00:00
Jooyung Han
529ace17b6 Merge "fs_config: add bin paths of flattened apexes" 2020-09-21 15:47:59 +00:00
Jooyung Han
a70cea57a9 fs_config: add bin paths of flattened apexes
Added missing partitions (/product and /vendor).

APEXes can be put in /system, /system_ext, /product, and /vendor.
Binaries within "flattened" apexes should be marked as executable.

Bug: 167383491
Bug: 169025459
Test: OVERRIDE_TARGET_FLATTEN_APEX=true m vendorimage with a vendor apex
      simg2img $OUT/vendor.img vendor.img
      debugfs -R 'ls -l /vendor/apex/com.android.foo/bin' vendor.img
      => check if binaries are executable
Change-Id: I67284166d70c98a2a184b47e7052ade8b9039df9
2020-09-21 19:50:43 +09:00
Tom Cherry
a5edc0fbbc Use libcutils_headers for android_filesystem_config.h
android_filesystem_config.h is found since system/core/include is on
the include path for all projects and contains a symlink to the real
android_filesystem_config.h.  This is fragile and the below bug seeks
to remove this symlink and have users correctly depend on
libcutils_headers.

Bug: 165825252
Test: build
Change-Id: I1aad6a2e8fbe87635e97b0ac1be3414403353382
2020-09-18 22:48:42 +00:00
Hridya Valsaraju
355ff8c7c1 libcutils must check /sys/kernel/tracing for tracefs first
Currently it falls back to /sys/kernel/tracing if debugfs is not found.
/sys/kernel/tracing must be checked first since debugfs is not allowed
to be mounted in user builds starting with Android R launching devices.

Test: manual
Change-Id: I2fb5ec91bbf7d5304a1a6efcb06530969485e78f
2020-09-14 20:04:43 +00:00
Elliott Hughes
4c4af77b16 Merge "ashmem: ensure ashmem fds are CLOEXEC." am: a2f248724c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1419610

Change-Id: I7d6f11a48f423951b0811b3d754508542b809dcd
2020-09-03 21:23:38 +00:00
Elliott Hughes
790ef05793 ashmem: ensure ashmem fds are CLOEXEC.
Fix the memfd_create(2) path and add the missing unit test.

Bug: https://issuetracker.google.com/165667331
Test: treehugger
Change-Id: Ibb5c1d0f9d7caba1df04d1f03e82e55026d9f86a
2020-09-03 10:54:20 -07:00
Xin Li
0a112d52f8 Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: Id18cb0e2d2f3e776a42b566c4a1af2e250890896
Change-Id: Iba7cab32ab3aa6f47952c840ff6dc8492e8d0704
2020-08-29 01:42:13 -07:00
Bowgo Tsai
f4bf7f3a94 Add systrace tag for system property
Introduce a new systrace tag, TRACE_TAG_SYSPROP, for use with
system property.

Bug: 147275573
Test: build
Change-Id: I6f85f3f52f6580bab4ff43fc1dc0e87c689b054e
Merged-In: I6f85f3f52f6580bab4ff43fc1dc0e87c689b054e
(cherry picked from commit 573fc58bad)
2020-08-19 12:48:07 +08:00
Mathew Inwood
42a1a126e5 Set /system/xbin permissions to 750.
This directory contains only the su binary which is executable only by
root and shell uids, so need not be accessible to other users.

Test: Device boots
Test: adb shell ls -ld /system/xbin
Change-Id: I4c9daab68b29832ef0ace2dec274687e4496da81
2020-08-18 14:48:38 +00:00
Gyeongtaek Lee
2f11cb4c4c libcutils: use 0 for netlink socket port id
AudioHAL and SoundtriggerHAL is separeted HAL but running in thread with
same process id.
So, if both HAL try to open netlink socket using uevent_open_socket(),
secondly opening socket receives already-in-use error.
To prevent situation, set 0 to socket port id.
By the LINUX man page, "The kernel assigns the process ID to the first
netlink socket the process opens and assigns a unique nl_pid to every
netlink socket that the process subsequently creates."

Bug:163008274
Test: tested by opening netlink socket in AudioHAL and
SoundtriggerHAL both.

Signed-off-by: Gyeongtaek Lee <gt82.lee@samsung.com>
Change-Id: I5f9859e8dac749bf5d0998e825043c9988c202ba
2020-08-14 21:29:17 +09:00
Hridya Valsaraju
9a147033f8 Add failure logs in __ashmem_open_locked()
Bug: 160984921
Test: build, boot
Change-Id: I754c961289828463af6de905d8b057b4350f5f07
2020-08-10 14:14:13 -07:00
Jeff Sharkey
7b21637782 Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Bug: 161896447
Change-Id: Iafcccbdbdf3ff1078e87000e2ce560ff09b43f68
2020-07-31 16:36:06 -06:00
Dan Albert
ac4500e67d Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Bug: http://b/161896447
Test: None
Change-Id: I9e5a37a20012b2f7a8eac55701df03f7b7a9ab6c
2020-07-28 15:58:25 -07:00
David Anderson
e80a153f20 Allow snapuserd to be included in the initial ramdisk.
Bug: 154536437
Test: manual test
Change-Id: I0db2e0f4a96ac4f4e491bf2e380c098d98095a98
2020-07-08 15:46:28 -07:00
Elliott Hughes
10b59d4044 Merge "libcutils: reimplement system property functions with libbase." am: 95e79c63a4 am: 854b9898ae
Change-Id: I4f99d73f376e853a0b125439e105ae781af02e30
2020-05-26 18:00:45 +00:00
S Vasudev Prasad
100b08a848 libcutils: reimplement system property functions with libbase.
This makes the system property functions available on the host too, and
ensures a consistent view of system properties between libcutils and
libbase, if you have code running on the host that uses both.

Bug: http://b/151789258
Test: treehugger
Change-Id: Ie524a77d0c392d7b23e9d12becbb1bf53c81eac6
2020-05-21 16:20:16 -07:00
Tim Murray
36842c01b1 Merge "mark atrace buffers as uninitialized" into rvc-dev am: 9842adf768
Change-Id: Ib3150e81cfd8767de44f879b5647cccbb58f1893
2020-05-05 22:50:29 +00:00
Tim Murray
9842adf768 Merge "mark atrace buffers as uninitialized" into rvc-dev 2020-05-05 22:33:04 +00:00
Tim Murray
0f85154117 mark atrace buffers as uninitialized
The atrace buffer does not need to be zero-initialized every time.

Test: memset calls from atrace_{begin,end}_body are gone
bug 155788214

Change-Id: I8082b6a9e6d6328f4aee3a22137977e9fae21933
2020-05-05 18:37:02 +00:00
Jooyung Han
f28c22995d Merge "libcutils: Set min_sdk_version" am: 6789753739 am: 0419c28d77
Change-Id: I11388b84610ddfb4881f44e83817b6533e47b834
2020-05-04 16:17:25 +00:00
Jooyung Han
6789753739 Merge "libcutils: Set min_sdk_version" 2020-05-04 15:51:33 +00:00
Treehugger Robot
39257c1baa Merge "Fix cutils/ashmem.h copyright header." am: f61377979e am: b40f653314
Change-Id: Id5e9f35b1f1256a426d8b57ff504c076443d1f14
2020-04-28 21:33:04 +00:00
Elliott Hughes
f35feb5389 Fix cutils/ashmem.h copyright header.
The *kernel* header is "GPL-2.0 OR Apache-2.0", but the userspace
libcutils is just Apache-2.0 like all our code.

Test: builds
Change-Id: I25eef8eed16550f4010285479b21b502a2d1fc07
2020-04-28 09:28:29 -07:00
Jooyung Han
88f00f2d43 libcutils: Set min_sdk_version
Modules contributing mainline modules (APK/APEX) should set
min_sdk_version as well as apex_available.

For now setting min_sdk_version doesn't change build outputs.
But build-time checks will be added soon.

Bug: 152655956
Test: m
Change-Id: I453c63fe29607ea0312da5465b03c741486fb670
2020-04-23 23:47:03 +09:00
Jiyong Park
a206b8cbf4 Set apex_available property
The marked library(ies) were available to the APEXes via the hand-written
whitelist in build/soong/apex/apex.go. Trying to remove the whitelist
by adding apex_available property to the Android.bp of the libraries.

In this change, following libs were made available to all apexes because
their usage is quite common and there is no reason to restrict them
to some APEXes.

* libbase_headers
* libcutils, libcutils_headers
* libutils_headers, libsystem_headers
* liblog_headers
* libbacktrace, libbacktrace_headers
* libcrypto_utils

Exempt-From-Owner-Approval: cherry-pick from aosp

Bug: 150999716
Test: m
Merged-In: If3d3652e6604ed4f6d7694fe7ac61ae496621026
(cherry picked from commit 8bf9b1632e)
Change-Id: If3d3652e6604ed4f6d7694fe7ac61ae496621026
2020-04-20 16:06:02 +09:00
Ryan Prichard
82a0841468 DO NOT MERGE - x86: Switch get_pc_thunk to comdat
Switch the __x86.get_pc_thunk.bx functions from .gnu.linkonce to comdat
section groups. lld doesn't implement .gnu.linkonce and will instead
discard the input sections. It might produce a faulty binary that has
no get_pc_thunk function in it, which would crash.

Normally, these functions are generated by GCC and are present in many
object files compiled with PIC. Clang doesn't use them, and instead
initializes the PIC base register with a "call 1f; 1: pop %ebx" pair.

I also added cfi_startproc / cfi_endproc to be consistent with current
GCC output.

I marked this CL with do-not-merge because the code it touches has been
removed in the next release, so it won't merge. I reviewed the
automerger graph, and this do-not-merge CL:
 - will be applied to qt-qpr1-dev-plus-aosp (which needs the CL)
 - won't be applied to rvc-dev-plus-aosp (which doesn't need the CL)

https://android-build.googleplex.com/builds/automerger/graph/project/googleplex-android/platform/system/core

Bug: http://b/154376560
Bug: https://bugs.llvm.org/show_bug.cgi?id=45594
Test: VM boots
Change-Id: I681c4c46503aff65f32a22c9da15397a42b67183
2020-04-18 14:07:19 -07:00
Treehugger Robot
edf8335c72 Merge "Rename vts-core to vts" 2020-04-07 05:11:55 +00:00
Dan Shi
4e62f3ce69 Merge "Rename vts-core to vts" into rvc-dev am: 783db0d261
Change-Id: I2758cf6a0aa3aa453bef7ab5804438e541076ef6
2020-04-07 03:17:07 +00:00
Dan Shi
ab8acaedae Rename vts-core to vts
Bug: 151896491
Test: local build
Exempt-From-Owner-Approval: This CL moves all tests in vts-core to vts.
It won't change test logic or behavior.

Change-Id: I24779951257ce37fc18929f214d3cf5f76c23a19
Merged-In: I24779951257ce37fc18929f214d3cf5f76c23a19
2020-04-07 02:48:48 +00:00
Dan Shi
a7b9a2bfd2 Rename vts-core to vts
Bug: 151896491
Test: presubmit check
Exempt-From-Owner-Approval: This CL renames suite name vts-core to vts.
It won't change test logic or behavior.

Change-Id: I24779951257ce37fc18929f214d3cf5f76c23a19
2020-04-06 16:11:29 -07:00
Tom Cherry
ae5d38b071 Merge "Remove EXCLUDE_FS_CONFIG_STRUCTURES" am: 79f3d26b25 am: c336c565a9
Change-Id: If58e8f42237c506fd638dea4329b81479c62659f
2020-04-03 15:16:31 +00:00
Tom Cherry
79f3d26b25 Merge "Remove EXCLUDE_FS_CONFIG_STRUCTURES" 2020-04-03 14:36:58 +00:00
Josh Gao
d1ee5085f3 adbd: make libadbd_services cc_library again.
For currently unknown reasons, sideloading is broken with
libadbd_services as a cc_library_static.

Partial revert of commit a9b62d5452.

Bug: http://b/151056300
Test: xunchang@ tested manually
Change-Id: Iaffad9c476ba0adcffc5db512ba4a7ee0fb5cb22
(cherry picked from commit 7f8a37c8c7)
2020-03-11 23:18:41 +00:00
Automerger Merge Worker
1bfce05829 Merge "run ext4 tools in first_stage_ramdisk" into rvc-dev am: 26471f7470
Change-Id: I67edb8c26d62cc1b8a259e1a897c0f28e6a89ad3
2020-03-11 20:12:18 +00:00
Jaegeuk Kim
253b0729bc run ext4 tools in first_stage_ramdisk
Bug: 149039306
Change-Id: I646960baa3c0d5a0dedda82b1fdc3816321aaa2e
Merged-In: I646960baa3c0d5a0dedda82b1fdc3816321aaa2e
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2020-03-11 16:39:58 +00:00
Jaegeuk Kim
b9be427848 run ext4 tools in first_stage_ramdisk
Bug: 149039306
Change-Id: I646960baa3c0d5a0dedda82b1fdc3816321aaa2e
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2020-03-11 09:33:51 -07:00
Automerger Merge Worker
a84a8a225c Merge "adbd: make libadbd_services cc_library again." am: 0ac447ab95 am: 3a3c6ec494
Change-Id: I9472129acc75f78a3ed14452e66241c4d5635b8a
2020-03-10 21:22:08 +00:00
Tianjie Xu
0ac447ab95 Merge "adbd: make libadbd_services cc_library again." 2020-03-10 18:43:30 +00:00
Automerger Merge Worker
6bade7f7a8 Merge "Set apex_available property" am: 2401f5f2cc am: bacaf76c0e
Change-Id: I86d74a6603acf59fadb16d7d16831b12ec5a2c83
2020-03-10 08:08:28 +00:00
Josh Gao
7f8a37c8c7 adbd: make libadbd_services cc_library again.
For currently unknown reasons, sideloading is broken with
libadbd_services as a cc_library_static.

Partial revert of commit a9b62d5452.

Bug: http://b/151056300
Test: xunchang@ tested manually
Change-Id: Iaffad9c476ba0adcffc5db512ba4a7ee0fb5cb22
2020-03-09 15:20:55 -07:00
Jiyong Park
8bf9b1632e Set apex_available property
The marked library(ies) were available to the APEXes via the hand-written
whitelist in build/soong/apex/apex.go. Trying to remove the whitelist
by adding apex_available property to the Android.bp of the libraries.

In this change, following libs were made available to all apexes because
their usage is quite common and there is no reason to restrict them
to some APEXes.

* libbase_headers
* libcutils, libcutils_headers
* libutils_headers, libsystem_headers
* liblog_headers
* libbacktrace, libbacktrace_headers
* libcrypto_utils

Bug: 150999716
Test: m
Change-Id: If3d3652e6604ed4f6d7694fe7ac61ae496621026
2020-03-09 16:38:02 +09:00
Tom Cherry
6ad4d0a601 Remove EXCLUDE_FS_CONFIG_STRUCTURES
Long overdue clean up; there is no reason to include fs_config.h in
android_filesystem_config.h, and the fact that it causes problems if
it's done, necessitating EXCLUDE_FS_CONFIG_STRUCTURES to exist, is a
good reason to fix it.

Bug: 149785767
Test: build
Change-Id: I5ba2541cd1045c22486140649c90db39163081fd
2020-03-04 15:34:09 -08:00
Automerger Merge Worker
bfa910d35e Merge "Always use shared memory for atrace." am: 2ddc5a1932 am: 3d9c20fefd
Change-Id: I8f7cc5b355bee1bbc41ed8ddf5885d9b26382d62
2020-02-27 11:00:50 +00:00
Florian Mayer
923880e176 Always use shared memory for atrace.
Remove ATRACE_SHMEM macro.

Test: atrace ss
      atrace wm
      sanity check output
Bug: 137366208
Change-Id: I1b42243678b9b9a41db18e2ff8cb3cf7bde874de
Merged-In: I1b42243678b9b9a41db18e2ff8cb3cf7bde874de
2020-02-26 16:59:18 +00:00
Florian Mayer
fc0adaf89e Always use shared memory for atrace.
Remove ATRACE_SHMEM macro.

Test: atrace ss
      atrace wm
      sanity check output
Bug: 137366208
Change-Id: I1b42243678b9b9a41db18e2ff8cb3cf7bde874de
2020-02-26 15:55:22 +00:00
Josh Gao
58d8065034 Merge changes from topic "adbd_cp" into rvc-dev
* changes:
  Properly remove adb DNS services.
  adbd: fix build breakage.
  adbd: remove static dependency on libcutils.
  incremental_server: fix a use of uninitalized memory
2020-02-25 11:48:18 +00:00
Josh Gao
b5778c1fe7 adbd: remove static dependency on libcutils.
We were previously statically linking libcutils into adbd for several
different reasons, which were addressed as follows:

  socket functions: extracted to a statically linked libcutils_network
  fs_config: wrapped with a shared library on /system
  ATRACE: deleted the single use in adbd

Bug: http://b/150032044
Test: treehugger
Change-Id: I821fa174cfcbfa8e29a4be10de4016b817adbaf8
Merged-In: I821fa174cfcbfa8e29a4be10de4016b817adbaf8
(cherry picked from commit a9b62d5452)
2020-02-24 17:58:06 -08:00
Arthur Ishiguro
c3605ef9c4 Adds AID_CONTEXT_HUB
This will be used to access the Context Hub.

Bug: 149981913
Test: Compile
Change-Id: Ic89cf5b1a8a01ea7077bf7dd89501ed3623f217d
2020-02-24 20:58:31 +00:00
Automerger Merge Worker
52a4719616 Merge "Adds AID_CONTEXT_HUB" am: 19e4f2b5f3 am: becd114785
Change-Id: Id9a4eff811f6ff331ec0262824320b16f8fdbb38
2020-02-24 19:26:39 +00:00
Treehugger Robot
19e4f2b5f3 Merge "Adds AID_CONTEXT_HUB" 2020-02-24 19:19:38 +00:00
Treehugger Robot
b9c95f8e6a Merge "Remove various bits of dead code and unused workarounds." 2020-02-23 04:16:25 +00:00
Elliott Hughes
f77f6f003c Remove various bits of dead code and unused workarounds.
Test: treehugger
Change-Id: I68fcd5da304d04ff4da3c3f3712fb79ce6b5791e
Merged-In: I68fcd5da304d04ff4da3c3f3712fb79ce6b5791e
2020-02-22 16:53:24 +00:00
Automerger Merge Worker
299a6ea4a4 Merge "adbd: remove static dependency on libcutils." am: 744ba42d2d am: 7ecfa1a7f8
Change-Id: I2f08d3c97b782d7ab8761cd1cb7d6084dd3f736b
2020-02-22 06:02:02 +00:00
Arthur Ishiguro
b5693bdae7 Adds AID_CONTEXT_HUB
This will be used to access the Context Hub.

Bug: 149981913
Test: Compile
Change-Id: Ic89cf5b1a8a01ea7077bf7dd89501ed3623f217d
2020-02-21 16:56:00 -08:00
Josh Gao
a9b62d5452 adbd: remove static dependency on libcutils.
We were previously statically linking libcutils into adbd for several
different reasons, which were addressed as follows:

  socket functions: extracted to a statically linked libcutils_network
  fs_config: wrapped with a shared library on /system
  ATRACE: deleted the single use in adbd

Test: treehugger
Change-Id: I821fa174cfcbfa8e29a4be10de4016b817adbaf8
2020-02-19 17:44:38 -08:00
Automerger Merge Worker
89d31aadb3 Merge "Add project ID constants." am: 529605bc9e am: df4f865d7a am: 3781fb4a9a
Change-Id: I61572b4fcfcd57af9fb29dfd37c67a2b956d820e
2020-02-19 22:20:44 +00:00
Martijn Coenen
529605bc9e Merge "Add project ID constants." 2020-02-19 05:23:20 +00:00
Martijn Coenen
1cc2f9d77f Add project ID constants.
These will be used for quota tracking on external storage devices
that don't have sdcardfs.

Bug: 146419093
Test: N/A
Change-Id: If00961cc3807bcc3e93675e5d27dd6444007fdba
2020-02-18 17:19:09 -08:00
Treehugger Robot
15c0b798bd Merge "bootstat: enhance last reboot reason property with file backing" am: 7550e6f882 am: ffd276388f am: c0210f1d0e
Change-Id: I6d953d6b9308dc46619e52f81cb5469b22df55d0
2020-02-17 10:12:25 +00:00
Mark Salyzyn
ee016ce0b3 bootstat: enhance last reboot reason property with file backing
Helps with support of recovery and rollback boot reason history, by
also using /metadata/bootstat/persist.sys.boot.reason to file the
reboot reason.

Test: manual
Bug: 129007837
Change-Id: Id1d21c404067414847bef14a0c43f70cafe1a3e2
2020-02-14 13:24:16 -08:00