Commit graph

1490 commits

Author SHA1 Message Date
zhanglongxia
1aac0c01a6 Add a aid/uid for Thread subsystem
Bug: b/202786090
Test: Compiles
Change-Id: I168cf2630c9591df161d0e5df71be0f93bf7ce9a
2021-10-19 09:22:06 +08:00
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
Automerger Merge Worker
ed830505b2 Merge "[vts-core] fix the test error of KernelLibcutilsTest." am: 3d6154ffe9 am: 14e0b48b59 am: 7ef1507434
Change-Id: I90840a20974875b13b3546ae162f5bd5dca13ecd
2020-02-11 22:13:46 +00:00
Treehugger Robot
3d6154ffe9 Merge "[vts-core] fix the test error of KernelLibcutilsTest." 2020-02-11 21:15:57 +00:00
Automerger Merge Worker
afe3a288e1 Merge "Add correct permissions to benchmarktest directories" am: 8c2d4d6146 am: cfce9d6ad9 am: 8008cc405b
Change-Id: Ic505c73fcbd294928aaa33da39b91051ae1e7225
2020-02-10 21:24:15 +00:00
Automerger Merge Worker
a16facc231 Merge "trace-container: Check /sys/kernel/tracing for tracefs" am: 1ac1d86b7d am: 0b9ed14c89 am: cb22a67a84
Change-Id: I1ecc90f8ea32703a52a0e32bd9ea7b6a57eb6647
2020-02-10 17:21:52 +00:00
Akos Denke
bb61a6e79d Add correct permissions to benchmarktest directories
Change-Id: I487d59317635b54f623002baf3c00aa47910a33a
2020-02-10 12:11:54 -05:00
Hridya Valsaraju
5cdb5d4619 trace-container: Check /sys/kernel/tracing for tracefs
tracefs will be mounted at /sys/kernel/tracing when debugfs
is not mounted.

Bug: 134669095
Test: atest AtraceHostTest
Change-Id: I8178babaa6928ac3796622bdb08f123428ccd191
2020-02-07 11:08:21 -08:00
nelsonli
1d53f839cc [vts-core] fix the test error of KernelLibcutilsTest.
Correct the test name of the Test.config.

Bug: 148629781
Test: atest KernelLibcutilsTest
Change-Id: I0307e4ddc89c016f00c6075d0549818d5b3b9382
2020-02-07 10:07:09 +08:00
Automerger Merge Worker
d17586e9d9 Merge "Add AID_EXT_DATA_RW / AID_EXT_OBB_RW GIDs." am: e6acbfe556 am: e9b7b464bd am: 2d5970ffc2
Change-Id: I8ffa385724b0b49b3f5b329187ba1a75edb5ba87
2020-02-03 10:42:41 +00:00
Treehugger Robot
e6acbfe556 Merge "Add AID_EXT_DATA_RW / AID_EXT_OBB_RW GIDs." 2020-02-03 10:14:33 +00:00
Automerger Merge Worker
200fdd3138 Merge "Check /sys/kernel/tracing for tracefs" am: a6c834f960 am: 73a3552047 am: cd5ee4246f
Change-Id: I3fe8e36a890791342aff0630bf694ec9ed1f2092
2020-02-01 07:26:01 +00:00
Martijn Coenen
4501ed5c2e Add AID_EXT_DATA_RW / AID_EXT_OBB_RW GIDs.
These will be used as a GID for the Android/data and Android/obb
directories respectively, on devices that don't have sdcardfs.

Bug: 146419093
Test: builds
Change-Id: I52a3235e872eb4b0402f918d5c47661f16626ba6
2020-01-31 15:12:31 +01:00
Hridya Valsaraju
6a879b25d9 Check /sys/kernel/tracing for tracefs
When debugfs is not mounted, atrace should look for
tracefs in /sys/kernel/tracing.

Test: CtsAtraceHostTestCases
Bug: 148436518
Change-Id: I45c0e664892bcda277fd9612106ad5216aea0a1b
2020-01-30 17:38:51 -08:00
Automerger Merge Worker
3d81374fd5 Merge "Add external_storage gid" am: 8e4cf5b436 am: ed326eafc0 am: 92fe152517
Change-Id: If39cab9fa0cbab8d997492c2be9962ea519eaef7
2020-01-27 12:51:13 +00:00
Zimuzo Ezeozue
8e4cf5b436 Merge "Add external_storage gid" 2020-01-27 12:22:16 +00:00
Automerger Merge Worker
fb6adb6ffc Merge changes from topic "ramdisk" am: d66e442c21 am: 49e66cc894 am: 635c64fb58
Change-Id: I9ecbf4ad764d0f96ddc34ccd24ce0fea9836ac04
2020-01-25 01:14:13 +00:00
Zim
bdeaf57da3 Add external_storage gid
This gid allows processes full access to public areas of external
storage. This includes the following:
1. EmulatedVolumes: All files and directories excluding the app
specific directories under Android/
2. PublicVolumes: Including 'unreliable' volumes (USB OTG) that are
not typically accesible to ordinary apps

Apps with the MANAGE_EXTERNAL_STORAGE permission will automatically
have this gid

Test: m
Bug: 144914977
Change-Id: I17da0b2367e356edc031d063e214574463afc985
2020-01-24 16:54:03 +00:00
Yifan Hong
04b932b8fd Add e2fsck to fs_config
Test: boot and look at serial console
Bug: 147347110
Change-Id: Ife664c02fa4cf86d9385caff734d2bb3e56d988f
2020-01-22 16:47:14 -08:00
Automerger Merge Worker
cb6893cc82 Merge "[vts-core] Make VtsKernelLibcutilsTest runnable by base TradeFed" am: 0852b10b37 am: 7315bc9175 am: 2a6c4e3de6
Change-Id: Ic89129bcd6b833a2efa92a96a7cf376823f46b40
2020-01-20 03:01:24 +00:00
Treehugger Robot
0852b10b37 Merge "[vts-core] Make VtsKernelLibcutilsTest runnable by base TradeFed" 2020-01-20 02:32:56 +00:00
Automerger Merge Worker
5c2d51d588 Merge "Add user for credstore." am: 4659cdaf5c am: 66e60c7b77 am: 8e0e2797e6
Change-Id: I86961943c8ffb05878313db09ae8166d9fe59358
2020-01-17 03:44:26 +00:00
nelsonli
d83f390896 [vts-core] Make VtsKernelLibcutilsTest runnable by base TradeFed
Create KernelLibcutilsTest and add it to vts-core.
VtsKernelLibcutilsTest just run the test of libcutils_test_static
and filter-out all of the test except AshmemTest#. We can just use the
include-filter to do the same thing.

Bug: 147789274
Test: atest KernelLibcutilsTest
Change-Id: Idb5cee3596bf063c2419f1a11055a17ad3075e26
2020-01-17 09:48:58 +08:00
David Zeuthen
e83f386653 Add user for credstore.
The credstore system daemon is running as an unprivileged user. This
CL adds this user and also creates a directory (/data/misc/credstore/)
where this daemon can store its data.

Bug: 111446262
Test: N/A
Change-Id: I8da2c32dd04fef797870b8a7bbc5e499bed71f9e
2020-01-16 07:32:04 -05:00
Automerger Merge Worker
3f963835ff Merge "libcutils: fallback to /dev/ashmem" am: 6e016ef80e am: 0714a9eae2 am: 315d44f02c
Change-Id: I334c8988af63a49dab7ace5045b9a792eb0050b2
2020-01-15 20:17:28 +00:00
Treehugger Robot
6e016ef80e Merge "libcutils: fallback to /dev/ashmem" 2020-01-15 19:48:26 +00:00
Steven Moreland
4f99dd3af1 libcutils: fallback to /dev/ashmem
For a Q APEX built with use_vendor, rather than using AIDL to talk to
ashmemd, it would directly open /dev/ashmem. R libcutils does ashmem
differently, but in order to allow R-built APEXes to replace this
category of APEXes, falling back to /dev/ashmem.

Fixes: 147363115
Test: tested on Q in swcodec APEX
Change-Id: I625e46b15fee6649251ab9be7a1bbe11c5427525
2020-01-14 18:19:10 +00:00
Automerger Merge Worker
e7fbe55a98 Merge "Use sequence number to check if to reload atrace tags." am: 445234c76c am: d371ad8665 am: 0549118e91
Change-Id: I364d217f7447b7b4f4cf7c042e9f26844e245d46
2020-01-14 10:10:44 +00:00
Florian Mayer
445234c76c Merge "Use sequence number to check if to reload atrace tags." 2020-01-14 09:37:04 +00:00
Florian Mayer
b06766cbbf Use sequence number to check if to reload atrace tags.
This is to deprecate the sysprop change notification in atrace.
After this change, processes will only update their enabled tags
at the first atrace event. Previously we reloaded the tags as a
result of the sysprop changed Binder notification, which woke up
every process in the system.

Test: adb shell su root atrace -t 10 ss
Test: #define ATRACE_SHMEM 0; adb shell su root atrace -t 10 ss

Bug: 137366208

Change-Id: Idffba5fd4ba23fba2f6b9f594365df68ac0c1626
2020-01-13 17:02:58 +00:00
Automerger Merge Worker
2a71043523 Merge "SurfaceFlinger: migrate capabilities to surfaceflinger.rc" am: 1f3e40e8e7 am: f0b712654a am: 20c23f681f
Change-Id: Ie5494744cacf65157f180ffd62691da5278a8d91
2020-01-08 22:58:57 +00:00
Ady Abraham
21844fa771 SurfaceFlinger: migrate capabilities to surfaceflinger.rc
SurfaceFlinger requires CAP_SYS_NICE which is set in
libcutils/fs_config.cpp. This is the old way of setting capabilities
and new the way is to set it directly on surfaceflnger.rc

Test: adb shell /data/nativetest64/SurfaceFlinger_test/SurfaceFlinger_test
Test: adb shell stop surfaceflinger && adb shell start surfaceflinger
Bug: 147271477
Change-Id: I680509a385928a9c929d4fe4857118af219e2b13
2020-01-08 19:35:57 +00:00
Automerger Merge Worker
f5bab53f7e Merge "Add system_ext/apex/*/bin to fs_config" am: d4502115ad am: 69aa1e0b2c am: 16fcc9921a
Change-Id: Ie2b8333e9fb79c500049c0ac30c735871161c110
2019-12-20 05:32:49 +00:00
Jooyung Han
08792eb5de Add system_ext/apex/*/bin to fs_config
Flattened APEXes can be installed in /system_ext.
Especially, GSI have both flattened/unflattened apexes so that it can
run with updatable devices and non-updatable devices as well.

Bug: 145963716
Test: flash GSI on P device and boot
Change-Id: I3a941672446a5353517243a851739a66f4252617
2019-12-20 03:54:57 +09:00
Automerger Merge Worker
92911289a6 Merge "Remove warning from VNDK's <cutils/log.h>" am: ab96d9dec1 am: 3e886cea8c
Change-Id: I189e946bd4de85db79ba15e53415d57730f7b5c1
2019-12-04 18:43:52 +00:00
Tom Cherry
2d5cfa9fa6 Remove warning from VNDK's <cutils/log.h>
We're never going to fix this warning and it's not causing any active
issues that vendors are using this header.  It is however causing
active issues that we have extraneous warning messages in the log.

Bug: 123758136
Test: no build warnings from <cutils/log.h>
Change-Id: Iccf702bf2536ba106a00ac04467d54401cbe2a50
2019-12-04 08:33:49 -08:00
Tom Cherry
3bacd417fb Merge "Use PLOG and TEMP_FAILURE_RETRY for uevent socket errors" am: 02359c6d96 am: 777cbf21df
am: 76755f20e7

Change-Id: Id808b8d7e72eec69ce79bb3255c5653292e8fc08
2019-11-13 09:08:20 -08:00
Treehugger Robot
02359c6d96 Merge "Use PLOG and TEMP_FAILURE_RETRY for uevent socket errors" 2019-11-13 16:50:46 +00:00
Elliott Hughes
885c59ec02 Merge "Ignore nullptr in native_handle_close()." am: 2ba8c4b0af am: d36bf30620
am: 87d56a0603

Change-Id: I6c308a5dd9329fa2fd58cbac1ee56841520545ba
2019-11-13 08:29:04 -08:00
Elliott Hughes
2ba8c4b0af Merge "Ignore nullptr in native_handle_close()." 2019-11-13 16:04:22 +00:00
Tom Cherry
edad2bf9b6 Use PLOG and TEMP_FAILURE_RETRY for uevent socket errors
Use TEMP_FAILURE_RETRY() for recvmsg() to prevent failing
unnecessarily from EINTR.  Use PLOG(ERROR) in ueventd to display the
actual error if reading from the uevent socket does fail.

Test: build
Change-Id: I64a22698ce6ffc7573f75b57803551c7b6940e30
2019-11-13 07:21:42 -08:00
Elliott Hughes
7e42484610 Ignore nullptr in native_handle_close().
Just like native_handle_delete().

Bug: http://b/143898343
Test: new test
Change-Id: I373067aa6c2b03548b218c7011bdbf23bd71f260
2019-11-12 20:23:55 -08:00
Elliott Hughes
9a767159c0 Merge "Remove unused android_memset16()/android_memset32()." 2019-11-12 19:10:40 +00:00
Elliott Hughes
7b8fcfea0e Remove unused android_memset16()/android_memset32().
Pixelflinger is gone.

Test: treehugger
Change-Id: I6954ae6a860102be0f6d76f33e76ed3210e5c152
2019-11-08 15:59:30 -08:00
Elliott Hughes
d91984a890 libcutils: remove unused socket_set_receive_timeout().
Test: treehugger
Change-Id: I834762fd83bdaa3b714c7531439bf9115a82e342
2019-11-08 15:21:39 -08:00
Tom Cherry
e41aded12d Add require_root for libcutils tests
7 of these tests require root

Test: these tests pass as root
Change-Id: Ife4d1ae0c8fe8a2ace288c584ac044a37bae0b3e
2019-11-07 14:06:21 -08:00
Treehugger Robot
ad3069eb72 Merge "Turn on executable bit on system_ext/bin" 2019-11-07 15:13:56 +00:00
Jeongik Cha
4e467e71e9 Turn on executable bit on system_ext/bin
Setting executable bit on system_ext/bin is missing, so add them into
list.

Bug: 144066307
Test: m && check if system_ext/bin/* have execute permission.
Change-Id: I89c9e0d2d54f965ecd058bb9e77ba77b7ed164c1
2019-11-07 16:51:49 +09:00
Tom Cherry
f8baa897ec libcutils: update fs_config tests for current behavior
Update fs_config tests for the new behavior in
a8eb00720c.

Before the above CL, fs_config_cmp() would match any partition prefix
to any path, even if there is not a logical relationship between them.
For example, these two lines in the test the demonstrate the changed
behavior:

{ true,  "vendor/lib",             "system/vendor/lib/hw",    true },
{ true,  "system/vendor/lib",      "vendor/lib/hw",           true },

The first line should match and does; it is testing that files located
at system/vendor/lib/hw are matched by an fs_path_config entry
specified as vendor/lib.  This is to allow for applying the policy we
have for the vendor partition to files in /system/vendor in the case
that there is no vendor partition.

The second line should not match.  This is testing that a file
that's located at vendor/lib/hw is matched by an fs_path_config entry
specified as system/vendor/lib.  This is backwards; we do not want to
have policy specified for system/vendor to impact policy for the
vendor partition.

Also, we never have any relationships from /system/oem to /oem or
/system/odm to /odm, so these are logically unrelated and should fail
to match.  We do however have a relationship from /vendor/odm to /odm,
so this test is added.

Test: libcutils unit tests pass on CF
Change-Id: I026f0233e00bbd0aad9bc0fb701aef000d2a037c
2019-11-06 09:40:33 -08:00
Tom Cherry
350164cc7c Revert "liblog: remove mistakenly added symbols from vndk"
This reverts commit 5f8162b086.

Reason for revert: Turns out they're being used.

Merged-In: Iad9010190c7a4140b69dc553df5debdd88dcf81a
Change-Id: Iad9010190c7a4140b69dc553df5debdd88dcf81a
2019-10-23 11:39:13 -07:00
Tom Cherry
7867721e51 liblog: remove mistakenly added symbols from vndk
These functions and headers were all mistakenly added to the vndk.
They should not be used by vendors.

Test: these symbols do not appear in vendor libraries
Merged-In: I03919b437c2d9f0e573b7a6b40249ed12fe874b9
Change-Id: I03919b437c2d9f0e573b7a6b40249ed12fe874b9
2019-10-22 09:47:45 -07:00