Commit graph

52379 commits

Author SHA1 Message Date
Tom Cherry
dcb3d15611 ueventd: allow using external firmware handlers
Userspace may want to load a different firmware than the one that the
kernel requests in some cases, therefore this change adds the ability
to ueventd to run an external handler that will determine the name of
the file that should actually be loaded.

Bug: 138352500
Test: unit tests
Change-Id: Ic5da37268fd78109f83ae52d1b903bf7322a5ee5
2019-09-12 12:57:22 -07:00
Colin Cross
537e4af235 Merge changes from topic "protobuf-3.9.1"
* changes:
  Use installed paths of vndk libraries for ld.config.txt
  Adapt to google::protobuf::int64 type change
2019-09-11 18:00:15 +00:00
Treehugger Robot
9e4e275a79 Merge "system/apex/*/bin should be 0751" 2019-09-11 15:10:05 +00:00
Treehugger Robot
bce2fbcd93 Merge "init.rc: drop spurious trailing ':'." 2019-09-11 04:05:23 +00:00
Nick Kralevich
6bcd50ed6d system/apex/*/bin should be 0751
Consistent with other bin directories, system/apex/*/bin should
be 0751.

Test: compiles and boots
Change-Id: Ie32e7623d2b2eb923417d0c2ba3ee6899a9bfc7b
2019-09-10 18:54:28 -07:00
Yifan Hong
c42f5d64e4 Merge "libsnapshot: collapse fix sanity checks" 2019-09-10 23:47:15 +00:00
Yifan Hong
24815a49d4 Merge "libsnapshot: MapSnapshot: use device string for inner device" 2019-09-10 23:46:22 +00:00
David Anderson
878930be92 Merge "liblp: Add a helper to differentiate empty from non-empty images." 2019-09-10 21:36:39 +00:00
Matthew Maurer
dfad089dad Merge "Provide VINTF for Trusty Keymaster" 2019-09-10 19:09:04 +00:00
Matthew Maurer
f7fbbbfcc9 Merge "Inject auth token into tags" 2019-09-10 17:15:53 +00:00
Tom Cherry
4e46a33c70 Merge "Reland^2: "init: run property service in a thread"" 2019-09-10 17:04:57 +00:00
Christopher Ferris
483c2f9059 Merge "libbacktrace: Fix clang-tidy warning" 2019-09-10 16:19:47 +00:00
Tom Cherry
e351e5ed06 Merge "ueventd: make parallel restorecon functionality optional" 2019-09-10 14:52:31 +00:00
Tobias Thierer
9caa15b5c3 init.rc: drop spurious trailing ':'.
The accidental trailing ':' appears to stop the line
triggering.

Bug: 137267623
Test: Checked the /system/bin/boringssl_self_test32
      now runs on aosp_cf_x86_phone-userdebug

Change-Id: I7b4b1d6b838d8d1a7a0db7f104a94b34962df030
2019-09-10 13:38:55 +00:00
Sandeep Patil
9bcec87086 Merge "ion-unit-tests: Add system heap presence test" 2019-09-10 10:23:33 +00:00
Sandeep Patil
2d29c4b0a3 ion-unit-tests: Add system heap presence test
Make sure system heap is present on devices, its id is '0',
and that we can allocate and free buffers from the system heap

Bug: 140507100
Fixes: 140507100
Tests: ion-unit-tests --gtest_fiter=SystemHeap.*

Change-Id: Ief502c9fce1e54f54b4e6d60f288954e4bf42e04
Signed-off-by: Sandeep Patil <sspatil@google.com>
2019-09-10 00:46:45 -07:00
Yifan Hong
af32f9377e libsnapshot: collapse fix sanity checks
Fix sanity checks of the snapshot device sizes.
Test: libsnapshot_test

Change-Id: If2945eaa84be59e14ea1fbc9028022db3a145698
2019-09-09 19:45:14 -07:00
Yifan Hong
f4cd54e512 libsnapshot: MapSnapshot: use device string for inner device
Previously, the device path for the -inner device is used, which
may not be present. Use the major:minor instead.

Test: libsnapshot (not flaky)
Change-Id: I8b8cbe8af27a49a50876385bb0c0353ecf7ed1de
2019-09-09 19:45:14 -07:00
Jon Spivack
b120efd0c3 Merge "Allow AIDL interfaces in service parsing" 2019-09-10 02:38:31 +00:00
Treehugger Robot
c48b65c67e Merge "libsnapshot: cancel ok if unverified and old slot" 2019-09-10 02:12:58 +00:00
Matthew Maurer
c649ca538d Provide VINTF for Trusty Keymaster
This makes it easier to add or remove the Trusty keymaster service from
a device by providing a manifest fragment to add whenever it is enabled.

Test: Keymaster VTS, Keystore CTS (sans attestation)
Change-Id: Ib0f5fd7c016c0c18d77c9d2623c89f3b35ba7ad7
2019-09-09 23:23:45 +00:00
Matthew Maurer
3d1023e50d Inject auth token into tags
The reference keymaster at system/keymaster still expects to receive its
auth tokens in the tags, rather than as a separate parameter. This
change injects the separate parameter passed to the KM4 HAL as a legacy
tag in the request.

Longer term, system/keymaster should support a separate authToken
parameter, and it should be serialized and sent to Trusty separately.

Test: Keymaster VTS + Keystore CTS (sans attestation)
Change-Id: Ie69cbd358504bb7612f7d55158509043cdad4e4e
2019-09-09 16:00:36 -07:00
Jon Spivack
16fb3f9e42 Allow AIDL interfaces in service parsing
Bug: 138756857
Test: Manual (using mediaextractor as a test service)
Change-Id: Ice2c695fca7062d6a115df13a6ac1d6fe82a3a98
2019-09-09 15:24:42 -07:00
Yifan Hong
26a2e6eb7b libsnapshot: cancel ok if unverified and old slot
Allow canceling an update if the update has been applied
but not rebooted into it.

Test: libsnapshot_test
Change-Id: I694d74e200908ec622855074ab811e3029328f43
2019-09-09 14:41:57 -07:00
David Anderson
922cfefbb9 liblp: Add a helper to differentiate empty from non-empty images.
Also, finally explain the difference between these somewhere.

Bug: 140204341
Test: lpdump
Change-Id: I128780b01a28e893afac65f3aa4f4a8d36032d63
2019-09-09 13:16:02 -07:00
Nikita Ioffe
fc920dcbb7 Merge "Remove start vold action from post-fs-data" 2019-09-09 19:42:13 +00:00
Luca Stefani
e9bd8df8b9 libbacktrace: Fix clang-tidy warning
* warning: overloaded 'operator{++,--}' returns a reference instead of a constant object type [cert-dcl21-cpp]

Change-Id: I8a904622b30dc70d17483b87748c2ea541e50c46
2019-09-09 18:39:08 +02:00
Tom Cherry
4233ec7f66 ueventd: make parallel restorecon functionality optional
5aa6197d5f added the ability to
parallelize restorecon to speed up boot for devices that have not
completely moved to genfscon.  This parallel restorecon happens after
the parallel ueventd handling.

This causes a performance regression for devices that have moved to
genfscon, since previously, the restorecon() was done in the main
ueventd thread in parallel with the uevent handlers.

I also tried to run the fully parallelized restorecon in parallel with
the uevent handlers, but that did not make any change to the cold boot
time, likely due to the additional overhead of parallelizing the work.

Bug: 140458170
Test: blueline coldboot time returns to pre-regression time.
Change-Id: I3cd6a869cc9b62792466813d94ad6c69834e854e
2019-09-09 09:02:48 -07:00
Nikita Ioffe
8bdbea8df5 Remove start vold action from post-fs-data
vold is already started during early-fs which happens before
post-fs-data.

Trying to start it again in post-fs-data is a little bit confusing.

Test: device boots
Change-Id: I5faefe6d1f1bb7472ea3d032b1f157c69da565f1
2019-09-09 14:50:33 +01:00
Tobias Thierer
983f76b3c6 Merge "Init: Run boringssl self test via separate binaries." 2019-09-07 23:46:00 +00:00
Treehugger Robot
c8eadff1de Merge "Add stub code to read MS OS 2.0 descriptors." 2019-09-07 03:22:15 +00:00
Wei Wang
d5dff26049 Merge "init: boot into thermal shutdown target on supported devices" 2019-09-06 22:59:07 +00:00
Josh Gao
3b8cd67dff Add stub code to read MS OS 2.0 descriptors.
Linux doesn't seem to actually support emitting them, so we can't check
that they're actually there, but commit the code to read them so that
if and when Linux gets support, it's easier to check.

This also adds some error checking for ill-formed binary object store
entries.

Test: check_ms_os_desc
Change-Id: I4baf6a16f0f96acbec468b843db65d4ab3a589fe
2019-09-06 14:45:11 -07:00
Josh Gao
4118221c66 Merge "adb: add host tool to check for WinUSB descriptor." 2019-09-06 20:19:31 +00:00
Treehugger Robot
edf8e5715b Merge "Remove libhwbinder/libhidltransport deps" 2019-09-06 20:04:32 +00:00
Yifan Hong
233c32a454 Merge changes from topic "libsnapshot_prep"
* changes:
  libsnapshot: MapPartitionWithSnapshot cleanup itself if failed
  libsnapshot: MapPartitionWithSnapshot: fix timeout
  libsnapshot: require ex lock for {Create}{CowImage,Snapshot} / DeleteSnapshot
  libsnapshot: Refactor: add {Create,Map,Unmap}CowImage
2019-09-06 19:28:09 +00:00
Wei Wang
5f181bc503 init: boot into thermal shutdown target on supported devices
Bug: 137982557
Test: thermal shutdown
Change-Id: I4c7c4647e340be6be7a37a3dde6324b4d7903007
(cherry picked from commit 271014e832)
2019-09-06 11:26:43 -07:00
Treehugger Robot
7b968315ee Merge "init/fscrypt_init_extensions: remove redundant log message" 2019-09-06 17:34:05 +00:00
Treehugger Robot
0b18c6735f Merge "fs_mgr: overlayfs: README merge in public document" 2019-09-06 03:28:42 +00:00
Treehugger Robot
95773aa4b6 Merge "Moving skip_mount.cfg to system_ext partition" 2019-09-06 03:17:22 +00:00
Treehugger Robot
f613b4a9a6 Merge "Reland "libutils: Introduce StaticString16""" 2019-09-06 02:29:23 +00:00
Treehugger Robot
fd4fecc162 Merge "compare android::Vector and std::vector" 2019-09-05 23:42:53 +00:00
Josh Gao
27512c9e49 adb: add host tool to check for WinUSB descriptor.
Bug: http://b/68993980
Test: manual
Change-Id: I97395c9738a671dd136c6cf66f88fdb769ec7227
2019-09-05 15:56:54 -07:00
Yifan Hong
f35687df6e libsnapshot: MapPartitionWithSnapshot cleanup itself if failed
When we run MapPartitionWithSnapshot, intermediate devices aren't
cleaned up if the call fails. Hence, record these intermediate devices
we have created along the way using the new AutoDevices class. Upon
failure, the AutoDevices object will be destroyed, and all the
intermediate devices will be deleted from device mapper or image
manager. Upon success, AutoDevices::Release() makes sure the
intermediate devices aren't deleted.

Test: libsnapshot_test

Change-Id: Iff4c1297528288a27765c0224b67254b68c89776
2019-09-05 15:14:34 -07:00
Yifan Hong
5576f7cc13 libsnapshot: MapPartitionWithSnapshot: fix timeout
The MapPartitionWithSnapshot call doesn't respect params.timeout.
Fix it.

Test: libsnapshot_test
Change-Id: I2c5a2889e4687449319bb2018e39405682b458a6
2019-09-05 15:14:34 -07:00
Yifan Hong
caaf9a617a libsnapshot: require ex lock for {Create}{CowImage,Snapshot} / DeleteSnapshot
Create / Deleting the COW image / snapshot changes states, so it makes
sense to require an exclusive lock before doing so. If caller doesn't hold
an exclusive lock, parallel calls to MapCowImage / MapSnapshot / UnmapCowImage /
UnmapSnapshot may have weird results.

Test: libsnapshot_test

Change-Id: I4be660df1059ec24144f8baf43a1c8c05d9e372b
2019-09-05 15:14:34 -07:00
Yifan Hong
27fb95dedf libsnapshot: Refactor: add {Create,Map,Unmap}CowImage
Move operations on image manager in *Snapshot functions to their own
functions for finer granularity in control. *Snapshot functions only
changes snapshot state and snapshot devices, but not the supporting
devices.

Now, MapSnapshot can take a customized COW device path. We will have
a more complicated stack for the COW device in upcomming CLs.

Also, Change SnapshotManager::CreateSnapshot's signature to
accept a SnapshotStatus struct that includes all sizes, so that
cow_partition_size and cow_file_size can also be written to the snapshot
status file.

Test: libsnapshot_test

Change-Id: I388ecd4bcfbfcc3f379ecb6993615234f4fbcb4e
2019-09-05 15:14:34 -07:00
Colin Cross
6dfc460a41 Use installed paths of vndk libraries for ld.config.txt
The installed file name of modules may not match the module name.
Use module-installed-files to get the installed file name.

Bug: 117607748
Test: m checkbuild
Test: only libprotobuf-cpp-*-3.9.1.so changed in ld.config.R.txt
Change-Id: I83b7519f344b65b6cd98c4cabcf9bce0e753ba92
Merged-In: I83b7519f344b65b6cd98c4cabcf9bce0e753ba92
2019-09-05 14:46:16 -07:00
Colin Cross
cfcc0b0337 Adapt to google::protobuf::int64 type change
Protobuf 3.9.1 redefines google::protobuf::int64 from long long to
int64_t, which is sometimes long and sometimes long long.  Use PRId64
to print it.

Bug: 117607748
Test: m checkbuild
Change-Id: I6699cfdb0f0424aa3e1c98b59d941beb9f133055
Merged-In: I6699cfdb0f0424aa3e1c98b59d941beb9f133055
2019-09-05 14:46:16 -07:00
Tom Cherry
1ab3dfcab4 Reland^2: "init: run property service in a thread"
It's been a long standing issue that init cannot respond to property
set messages when it is running a builtin command.  This is
particularly problematic when the commands involve IPC to vold or
other daemons, as it prevents them from being able to set properties.

This change has init run property service in a thread, which
eliminates the above issue.

This change may also serve as a starting block to running property
service in an entirely different process to better isolate init from
handling property requests.

Reland: during reboot, init stops processing property_changed messages
from property service, since it will not act on these anyway.  This
had an unexpected effect of causing future property_set calls to block
indefinitely, since the buffer between init and property_service was
filling up and the send() call from property_service would then
block.  This change has init tell property_service to stop sending it
property_changed messages once reboot begins.

Test: CF boots, walleye boots, properties are set appropriately
Change-Id: I26902708e8be788caa6dbcf4b6d2968d90962785
2019-09-05 14:42:58 -07:00