Commit Graph

29589 Commits

Author SHA1 Message Date
Jocelyn Bohr 126402aae7 trusty: keymaster: Implement add_rng_entropy
Test: builds
Change-Id: Iec5f61777f9b39136028d61acaf724b9fafb4492
2017-04-10 17:19:49 -07:00
Jocelyn Bohr dccc76cd0b trusty: keymaster: Implement configure
This patch also forces the underlying structure of enum keymaster_command
to be uint32_t.

Test: builds
Change-Id: Ie8969beb9d6a15313456fbe54ef3806f6778ade2
2017-04-10 17:19:26 -07:00
Jocelyn Bohr e194e272f3 trusty: keymaster: Begin update from Keymaster 0.3 to 2.0
Replaces all Keymaster 0.3 methods with Keymaster 2.0 methods.
Stub out implementations.

Change-Id: Ie92110eb9da77ead98f65ed53d9a9c9457b8ac3c
Test: builds
2017-04-10 17:18:00 -07:00
Keun-young Park 2ba5c8103d poll umount completion from /proc/mounts
- umount operation is asynchronous except for root partition.
  Returning from umount does not guarantee completion of
  umount. Poll /proc/mounts to confirm completion of umount.
- Treat all devices mounting to /data as emulated devices. This is
  future proof when fs other than sdcardfs is used.
- Drop quota sync from sync step. There is no differences in
  frequencies of quota error.
- Run umount in reverse order from mounting order so that any
  hidden dependency can be auto-resolved.
- Add dump of lsof and /proc/mounts when umount fails. lsof only runs
  when selinux is toggled into permissive mode. The dump is enabled
  only for non-user build.
- Keep logcat until vold shutdown in case vold has any error to report.

bug: 36551218
Test: python packages/services/Car/tools/bootanalyze/bootanalyze.py -r -c packages/services/Car/tools/bootanalyze/config.yaml -n 1000 -f -e 20 -w 30

Change-Id: I87b17b966d7004c205452d81460b02c6acf50d45
2017-04-10 15:41:15 -07:00
Josh Gao 35b7a274ac Merge "crash_dump: during early boot, output to kmsg on userdebug."
am: 72ca48e5cb

Change-Id: I7af41a7a0040ec2b04367042ff1afffb732fb316
2017-04-10 21:03:35 +00:00
Josh Gao 72ca48e5cb Merge "crash_dump: during early boot, output to kmsg on userdebug." 2017-04-10 20:51:59 +00:00
Elliott Hughes 455567f78c Add a reasonably full implementation of gzip/gunzip/zcat.
Bug: http://b/36653902
Test: ran tests
Change-Id: Ibda577ba1d2aea5c4796eb632edd4c6d5e50592e
2017-04-10 10:56:40 -07:00
Steven Moreland 2ad21de500 Merge "Move early_hal start to late-fs trigger action"
am: 9ef4417c8e

Change-Id: Idb37ec8456a6c3855cb56128e79d9a02bdcc06c2
2017-04-08 04:54:11 +00:00
Steven Moreland 9ef4417c8e Merge "Move early_hal start to late-fs trigger action" 2017-04-08 04:46:58 +00:00
Tom Cherry 2e344f9d22 ueventd: replace char** links with std::vector<std::string>
Additionally replace the associated C string parsing with C++ and write
unit tests.

Bug: 33785894
Bug: 36250207
Test: Boot bullhead + unit tests
Change-Id: Iee1f72d248bca3bd2e1227045628935b3dd6195a
2017-04-08 00:05:50 +00:00
Tom Cherry a7d0718907 Merge "init: clean up more headers"
am: 4f6feec25b

Change-Id: Icd46443f3405b80c3f10981301eb931cc204d6a2
2017-04-07 23:04:49 +00:00
Treehugger Robot 4f6feec25b Merge "init: clean up more headers" 2017-04-07 22:56:32 +00:00
Janis Danisevskis ec0ab6524e Move early_hal start to late-fs trigger action
The class early_hal is essentially for the keymaster hal which needs
to be up before vold tries to unlock a storage encryption key (FDE or
FBE). The current position is too early in the boot process, because
on devices with legacy HAL the wrapper service uses system properties
to find the legacy HAL.

This patch moves the start of the early_hal class to the late-fs trigger
action which runs right after the system property action.

Test: Manually tested and update tested on bullhead, sailfish, and
      another device.
Bug: 35764921

Change-Id: I34b45b85f8450e9ef18861535fdb2ee963df8c9b
(cherry picked from commit 1ad8d21947)
2017-04-07 15:28:56 -07:00
Zhenhua WANG 21c8a291c5 Merge "NativeBridge: add "linked namespace" semantic corresponding to linker"
am: 1238292db5

Change-Id: I9200efa2d6c3f0d1b96b81e5c065f85f8b96b06f
2017-04-07 21:54:57 +00:00
Treehugger Robot 1238292db5 Merge "NativeBridge: add "linked namespace" semantic corresponding to linker" 2017-04-07 21:46:18 +00:00
Dan Willemsen f79efedc98 Merge "Add LLNDK liblog stub library for the VNDK"
am: f8111b7df8

Change-Id: Ie167fac286868a3dd600ef5fd0d70a3dfa787468
2017-04-07 21:31:39 +00:00
Dan Willemsen f8111b7df8 Merge "Add LLNDK liblog stub library for the VNDK" 2017-04-07 21:21:32 +00:00
Tom Cherry f57c0bfab2 init: clean up more headers
We don't need everyone including <sys/system_properties.h>

Test: boot bullhead
Change-Id: I73d507e4f273678eaf15947725741e1e3b966cc6
2017-04-07 13:49:12 -07:00
Mark Salyzyn 0c7f2287aa Merge "libcutils: fs_config: target_out_path assumed /system breaking partitions"
am: e800b97c46

Change-Id: Ie4114f6e1439e60ca7ae8f72e4feddaa31e7d231
2017-04-07 19:34:05 +00:00
Treehugger Robot e800b97c46 Merge "libcutils: fs_config: target_out_path assumed /system breaking partitions" 2017-04-07 19:25:34 +00:00
Vijay Venkatraman 38a5bead70 Merge "Moved all files from include/system to libsystem/include/system"
am: deb32544ba

Change-Id: I72a55fad9e5124646b94b13557f1485c8607744c
2017-04-07 18:31:31 +00:00
Vijay Venkatraman deb32544ba Merge "Moved all files from include/system to libsystem/include/system" 2017-04-07 18:28:47 +00:00
Mark Salyzyn 3b3811b645 Merge "liblog: adapt to removal of property name size limit"
am: 7660c46c66

Change-Id: Ie6c5aa2e9b5639d0d408484d56cc59c43eb9dd83
2017-04-07 18:27:30 +00:00
Treehugger Robot 7660c46c66 Merge "liblog: adapt to removal of property name size limit" 2017-04-07 18:22:07 +00:00
Mark Salyzyn d24dc95e87 liblog: adapt to removal of property name size limit
There is no longer a name size limit to the properties.

Test: gTest liblog-unit-tests, logd-unit-tests and logcat-unit-tests
Test: liblog-benchmarks BM_is_loggable
Bug: 36696208
Change-Id: I80706a48583192b21f532a06cb8fa183a34e5f76
2017-04-07 18:18:18 +00:00
Mark Salyzyn 6e9cb8fd79 libcutils: fs_config: target_out_path assumed /system breaking partitions
Strip off trailing / then /system and then add back the appropriate
config directory.  This fixes an issue with reading vendor, oem or odm
partitions.

Test: manual build successfully interprets all etc/fs_config_* files.
Test: manual incremental build successfully interprets all etc/fs_config_* files.
Bug: 36071012
Change-Id: Iba363f0731bb8d15e595bb45c56db97722edabc2
2017-04-07 10:29:51 -07:00
Christopher Ferris d58265e72a Merge "Implement maps parsing."
am: 33e6b18d35

Change-Id: I1673e501a90c559bc491c929e21bca6f6cec3a22
2017-04-07 16:53:40 +00:00
Christopher Ferris 33e6b18d35 Merge "Implement maps parsing." 2017-04-07 16:45:36 +00:00
Dan Cashman 6f18343656 Merge "Reflect move of mapping file to /system."
am: a74635d33e

Change-Id: Idf88cf223deb529faef0f805e5dc301e5ff92172
2017-04-07 14:30:47 +00:00
Treehugger Robot a74635d33e Merge "Reflect move of mapping file to /system." 2017-04-07 14:25:33 +00:00
Tom Cherry 6510908bd1 Merge "init: more header cleanup"
am: ab5ab1ebd4

Change-Id: I1f7cdd93e96e47cadf9b80ba428d11a358a49176
2017-04-07 02:52:01 +00:00
Treehugger Robot ab5ab1ebd4 Merge "init: more header cleanup" 2017-04-07 02:44:07 +00:00
Thierry Strudel bb1c8f3691 Merge "Revert "libcutils: fs_config: target_out_path assumed /system""
am: ad90763ab9

Change-Id: I132fc583194a7225b3572b226344e884a432caf6
2017-04-07 02:08:29 +00:00
Treehugger Robot ad90763ab9 Merge "Revert "libcutils: fs_config: target_out_path assumed /system"" 2017-04-07 02:03:23 +00:00
Tom Cherry 3f5eaae526 init: more header cleanup
Remove includes of "log.h" that really want <android-base/logging.h>
Fix header include order
Remove headers included in .cpp files that their associated .h already includes
Remove some unused headers

Test: boot bullhead
Change-Id: I2b415adfe86a5c8bbe4fb1ebc53c7b0ee2253824
2017-04-06 18:06:34 -07:00
Adam Lesinski b087e37d4c Merge "ZipWriter: Do not write DataDescriptor for STORED files"
am: 47f5581927

Change-Id: I1c2fa98c84b699063b75fb04d41d6b36e00f6891
2017-04-07 00:41:21 +00:00
Thierry Strudel 29e0c8f1a9 Revert "libcutils: fs_config: target_out_path assumed /system"
This reverts commit 7130fb345d.

Bug: 36816191
Change-Id: I7d604d510865b1fa15781ffb4ad8b3e77ac44395
2017-04-07 00:34:03 +00:00
Adam Lesinski 47f5581927 Merge "ZipWriter: Do not write DataDescriptor for STORED files" 2017-04-07 00:33:20 +00:00
Tom Cherry e6b70f5913 Merge "ueventd: Write tests for the get_*_symlinks() functions"
am: e7fbd6a2b4

Change-Id: Ia77a42ebcce14036c71b2885d39372a9a4456649
2017-04-07 00:23:22 +00:00
Tom Cherry e7fbd6a2b4 Merge "ueventd: Write tests for the get_*_symlinks() functions" 2017-04-07 00:14:03 +00:00
Adam Lesinski e2fa70bcb0 ZipWriter: Do not write DataDescriptor for STORED files
Older implementations of ZIP (Java's ZipInputStream) don't
like a Data Descriptor trailing after an uncompressed entry.

If the FILE is seekable, and the entry is uncompressed, seek
back to the header and write out the crc and sizes.

(cherry-pick of commit 639814d946)

Bug: 36686974
Test: make ziparchive_tests
Change-Id: I61664515e5afa3e2ba814874eeac847a2aaac319
2017-04-06 17:03:32 -07:00
Tom Cherry e24876879a Merge "Add android::base::ScopeGuard"
am: 5c3961c547

Change-Id: I81bff856294196ab3eb02ac83ee569f90e8eea77
2017-04-06 22:45:29 +00:00
Tom Cherry 5c3961c547 Merge "Add android::base::ScopeGuard" 2017-04-06 22:41:02 +00:00
Liu Changcheng 381a13555d Merge "check send_signal result before further dealing"
am: 5830f7b564

Change-Id: Ifa03a6caa7710ea4578f628b467adb655f954620
2017-04-06 22:31:48 +00:00
Treehugger Robot 5830f7b564 Merge "check send_signal result before further dealing" 2017-04-06 22:23:28 +00:00
Christopher Ferris 09385e7db5 Implement maps parsing.
The MapsOffline code is still in development so I'm not testing it very
thoroughly yet.

Bug: 23762183

Test: All unit tests pass.
Change-Id: I77aeac62940cd95c489ee221afe02349bfe39671
2017-04-06 15:01:02 -07:00
Josh Gao bf2dd48241 crash_dump: during early boot, output to kmsg on userdebug.
Crashes that happen before tombstoned is running are extremely hard to
diagnose, because tombstones aren't written to disk, and the window of
opportunity to get logs via `adb logcat` is small (potentially
nonexistent).

Solve this by adding a world-writable /dev/kmsg_debug on userdebug
builds, and writing to it in addition to logcat when tombstoned hasn't
started yet.

Bug: http://b/36574794
Test: stop tombstoned; crasher; dmesg
Change-Id: Ib22c02a002afb602933155fb2c9b7a8abbe9ed38
2017-04-06 15:00:52 -07:00
Dan Cashman 299231152e Reflect move of mapping file to /system.
Bug: 36783775
Test: boot device with matching sha256 and non-matching and verify that
device boots and uses either precompiled or compiled policy as needed. Also
verify that mapping_sepolicy.cil has moved.

(cherry-pick of commit: 39ffec779a)
Change-Id: I9c3df2e7ed3f0eadd98e98529ebed360fec66dba
2017-04-06 12:52:33 -07:00
Mark Salyzyn d7acf56639 Merge "logd: test: logd.sepolicy* errors"
am: ebc87c98e3

Change-Id: I8b35923c397d8293c1054e103296add4508db472
2017-04-06 17:42:39 +00:00
Treehugger Robot ebc87c98e3 Merge "logd: test: logd.sepolicy* errors" 2017-04-06 17:33:48 +00:00