Commit Graph

34524 Commits

Author SHA1 Message Date
Christopher Ferris 9e484bdb4a Fix another set of bugs.
- The pc read from the eh frame binary table of pc/fde offset is off by 4.
  I verified that on arm/arm64/x86/x86_64 the pc in this table matches
  the fde pc_start value. I did this by adding an error if this occurred
  and ran unwind_info over everything in system/lib, system/lib64, system/bin.
- Fixed unit tests for the above change.
- Fix a small bug in the processing encoded values. The high
  bit of the encoding should be masked off, but I wasn't doing that. That
  meant during processing of the fde, I was incorrectly returning
  an error because the encoded value was unknown.
- Added a new test for this encoding change.

Bug: 23762183

Test: Build and all unit tests pass. Also, see above comments.
Change-Id: If074a410a1726392274cd72c64470ca0be48e0db
2017-08-10 17:37:32 -07:00
Jocelyn Bohr b3ed3772b9 Enable non-secure side to receive messages > 4K
AttestKeyResponse may be larger than 4K (always less than 8K) when
attesting an RSA key. This change allows the non-secure side to read a
response that may be larger than 4K by adding an additional bit
indicating the end of a response. If a message command has the
KEYMASTER_STOP_BIT set, then the non-secure side knows that the response
has been fully read.

Test: android.keystore.cts.KeyAttestationTest#testRsaAttestation passes
      with production attestation key and chain, when AttestKeyResponse is
      larger than 4K.

      Tested with other CTS tests when keymaster messages are smaller
      than 4K, still passes.

      Manual test to verify that a tipc error due to large message size is
      handled correctly.
Bug: 63335726

Change-Id: I8776ba7ca70da893648e15cfa770784ab31a2cb0
2017-08-10 16:53:27 -07:00
Jerry Zhang ecee434fae adb: Use kernel aio for functionfs.
This method works around the downsides of
ENDPOINT_ALLOC, namely that it is not affected
by memory fragmentation and it uses an upstream
interface.

Also add libasyncio to provide the necessary syscalls
to both adb and mtp.

Add some small optimizations to file_sync.

Bug: 37916658
Test: run adb push/pull
Change-Id: If3b3be02b5e2d4f9cffec1b8ddc02a5768a51a1f
2017-08-10 15:12:47 -07:00
Andrew Scull ef1dd0d279 Merge "Add HSM AID."
am: 4723d7c66d

Change-Id: If7075378ac5a13bbe79a02843d13d34c5f128d2a
2017-08-10 21:35:47 +00:00
Treehugger Robot 4723d7c66d Merge "Add HSM AID." 2017-08-10 21:28:30 +00:00
Andrew Scull f73c5e1f84 Add HSM AID.
This is used by resources related to a hardware security module (HSM).

Bug: 64569509
Change-Id: I30d47e1b275e3c4ae0a00f7ceb286a1096d84273
2017-08-10 20:25:11 +01:00
Mark Salyzyn 67ad31b21f Merge "bootstat: switch from root.root to system.log"
am: de6b44aa0e

Change-Id: Ia69fd5a537f7e4b9ee2a6867ccc182b44c09b6df
2017-08-10 15:04:12 +00:00
Treehugger Robot de6b44aa0e Merge "bootstat: switch from root.root to system.log" 2017-08-10 14:56:37 +00:00
Dan Willemsen 3efedfae39 Merge "Don't try to strip a shell script"
am: ff7e13c260

Change-Id: I187a638711076f9c04b84980b74cebccc259aa51
2017-08-10 05:46:55 +00:00
Treehugger Robot ff7e13c260 Merge "Don't try to strip a shell script" 2017-08-10 05:42:46 +00:00
Tom Cherry fb9deac35c Merge changes If1cffa85,I9011a959
am: 30bd51c61f

Change-Id: Ib59f5e16d656185bba05ad5dcec1425f2ce72b1b
2017-08-10 04:36:11 +00:00
Tom Cherry 30bd51c61f Merge changes If1cffa85,I9011a959
* changes:
  init: move property_service.cpp to libinit
  init: statically link libselinux to init_tests
2017-08-10 04:31:54 +00:00
Dan Willemsen e1cf0f5f73 Don't try to strip a shell script
Test: lunch aosp_mips-eng; mmma system/core/logcat
Change-Id: I4e641701522fb5b042d52e460d40b42ed12f22c8
2017-08-09 20:20:48 -07:00
Ryan Campbell 725fa57109 Merge "Include asan options from data partition."
am: 5d89e6c7fe

Change-Id: I22bfd9e46cd377b4532e1726522b8c9fdcdfeb04
2017-08-10 01:11:22 +00:00
Treehugger Robot 5d89e6c7fe Merge "Include asan options from data partition." 2017-08-10 01:05:44 +00:00
Tom Cherry 2a978d32d2 init: move property_service.cpp to libinit
service.cpp, which is part of libinit, references symbols in
property_service.cpp, which causes the linker to complain when linking
libinit.a in some situations.

Therefore, we move property_service.cpp to libinit.

Separately, this will make it easier to write tests for
property_service.cpp, which we will want to do in the future.

Test: build, init unit tests
Change-Id: If1cffa8510b97e9436efed3c8ea0724272383eba
2017-08-09 17:13:21 -07:00
Tom Cherry 45a9d67cec init: statically link libselinux to init_tests
The shared libselinux library does not export all of the symbols that
we use in init and the linker is now complaining about this, so let's
use the static libselinux library in init_tests to match init itself.

Test: build, init unit tests
Change-Id: I9011a959a7c49446b3529740e606140a4ee8c32d
2017-08-09 17:09:04 -07:00
Christopher Ferris 188072f6a4 Merge "Small clean ups"
am: 5cd87d39d7

Change-Id: I4eea11359afef8c377c646e613733ddb4cc02776
2017-08-09 23:26:44 +00:00
Mark Salyzyn b5a69e8e70 Merge "logcat: transition to Android.bp"
am: ad7f1bc0b3

Change-Id: I689b94aad609a4fd9734b159f305868eae5764ea
2017-08-09 23:26:24 +00:00
Christopher Ferris 5cd87d39d7 Merge "Small clean ups" 2017-08-09 23:22:22 +00:00
Mark Salyzyn ad7f1bc0b3 Merge "logcat: transition to Android.bp" 2017-08-09 23:18:00 +00:00
Ryan Campbell ce30d07b11 Include asan options from data partition.
Look for asan options under /data/asan so that multi-process coverage
can be enabled on a newly-started remote process without disabling
verity and without forcing it to be always-on.

Test: adb shell echo "include_if_exists=/data/asan/asan.options.%b" >>
/system/asan.options && adb shell echo
"coverage=1\ncoverage_dir=/data/misc/trace" >
/data/asan/asan.options.android.hardware.light@2.0-service && adb shell killall
android.hardware.light@2.0-service
Bug: 64019182

Change-Id: I241ad8478439323681dc1cfde2fa0770f030ae75
2017-08-09 15:32:23 -07:00
Mark Salyzyn c3ad75be84 bootstat: switch from root.root to system.log
bootstat does not need root uid and root gid permissions to perform
its tasks.  It appears that system uid and log gid are adequate and
appropriate.

Test: manual
Bug: 63736262
Change-Id: I094c2cb054e441562fa8717a4d3dc0086fb70a7a
2017-08-09 15:08:21 -07:00
Christopher Ferris 3b4b075fea Small clean ups
- Remove redundant map_info checks.
- Initialize fde_count_ to zero.

Bug: 23762183

Contributed-By: Ivan Maidanski <i.maidanski@samsung.com>

Test: Builds, run backtrace_test modifying CreateNew to Create and vice-versa.
Change-Id: I6e9cdfa99734f8cc2d9915cc32c66a1455e79f1b
2017-08-09 14:22:12 -07:00
Mark Salyzyn 507f69f80e logcat: transition to Android.bp
Switch logcat, logcatd and liblogcat to use Android.bp.

Test: compile
Change-Id: I01c0d8cbc6a713ad5b4b413677574e3c6463afcb
2017-08-09 13:30:03 -07:00
Mark Salyzyn 94984cf4bd Merge "logcat: fix error propagation."
am: 2d1d8812cc

Change-Id: I0676572a6ff6e9591afb7f4e99cc64b92147dfef
2017-08-09 00:59:33 +00:00
Treehugger Robot 2d1d8812cc Merge "logcat: fix error propagation." 2017-08-09 00:45:20 +00:00
Mark Salyzyn 210e43c354 logcat: fix error propagation.
Fix some _serious_ error propagation issues discovered with
additional warning flags (-Wextra).

Test: compile
Change-Id: I5148550092e4ecb6cafba91229c350c516e7e244
2017-08-08 15:49:21 -07:00
Tom Cherry 3df3ec34e4 Merge "ueventd: add test to ensure selabel_lookup() is thread safe"
am: 2c3a2a8c5c

Change-Id: I57b1fb1906671950a4374f515438349f368f7cad
2017-08-08 22:48:04 +00:00
Tom Cherry 2c3a2a8c5c Merge "ueventd: add test to ensure selabel_lookup() is thread safe" 2017-08-08 22:00:26 +00:00
Tom Cherry 57ef66b6fa ueventd: add test to ensure selabel_lookup() is thread safe
selabel_lookup() must be threadsafe, but had failed in the past.

Bug: 63861738
Test: this newly added test
Change-Id: I78bdb8e555433e8217ac6d4be112ba91de9f03bb
2017-08-08 13:11:44 -07:00
David Zeuthen 9ef86681a1 Merge "fastboot: Add --disable-verity and --disable-verification options."
am: 24c39f0b4c

Change-Id: I1fd796f55b15bd7a9f06b4a4f7c792565a117f86
2017-08-08 20:07:39 +00:00
Treehugger Robot 24c39f0b4c Merge "fastboot: Add --disable-verity and --disable-verification options." 2017-08-08 20:01:16 +00:00
Robert Quattlebaum 4ff32084d5 Merge "Add AID for LoWPAN subsystem"
am: f602dd4ced

Change-Id: Idd091e64fd9cab58f38da67e0b32e0aa9c98fb7d
2017-08-07 23:55:19 +00:00
Treehugger Robot f602dd4ced Merge "Add AID for LoWPAN subsystem" 2017-08-07 23:50:02 +00:00
David Zeuthen b6ea435a20 fastboot: Add --disable-verity and --disable-verification options.
This can be used to disable verity and/or verification when flashing a
build to a device. It works with both 'fastboot flashall' and
'fastboot flash vbmeta /path/to/vbmeta.img'.

Bug: 62903976
Test: Manually tested.
Change-Id: Iad22d42a9dd5befd70ecd0224803721a10a28d90
2017-08-07 16:52:55 -04:00
Robert Quattlebaum 01f7576a3e Add AID for LoWPAN subsystem
Bug: b/64399805
Change-Id: Ida6aa60d8beee9151a723826d99c1e9044dc05be
2017-08-04 16:19:34 -07:00
Chih-hung Hsieh 18f9c66823 Merge "Fix clang-tidy performance warnings in system/core."
am: 69ff5009c7

Change-Id: I74373e9f0e7f83c9280f4700ea55b387c3384c2c
2017-08-04 21:14:30 +00:00
Chih-hung Hsieh 69ff5009c7 Merge "Fix clang-tidy performance warnings in system/core." 2017-08-04 21:05:51 +00:00
Tom Cherry 0908ca721a Merge "init: more unique_fd, less goto"
am: 401c9cb330

Change-Id: If621924a00686b41889d4e75ad360c3c3d3d4a85
2017-08-04 20:26:57 +00:00
Tom Cherry 401c9cb330 Merge "init: more unique_fd, less goto" 2017-08-04 20:13:10 +00:00
Tom Cherry 7c4609cfb3 init: more unique_fd, less goto
Test: boot bullhead
Change-Id: I3c31ca045538d9c9dbbf9c8f27f63033344627fd
2017-08-04 20:12:56 +00:00
Earl Ou 08d9cc3744 Merge "libcutils: write trace event into socket in container"
am: 59b33cb01c

Change-Id: Ie59769f5820a8bb5991ba3dca53df83c5e90f795
2017-08-04 01:04:15 +00:00
Treehugger Robot 59b33cb01c Merge "libcutils: write trace event into socket in container" 2017-08-04 00:50:59 +00:00
Jocelyn Bohr efea269a75 Merge "Return correct error code when finish input length is too long."
am: 90657bbeab

Change-Id: I96ea16c713efcc51533b9aafab3624b0070b3dc3
2017-08-03 23:44:35 +00:00
Treehugger Robot 90657bbeab Merge "Return correct error code when finish input length is too long." 2017-08-03 23:35:05 +00:00
Jocelyn Bohr f1e5edf765 Return correct error code when finish input length is too long.
Bug: 63745895
Change-Id: I465bf9138a0a21363f89f2c6074f7108ee33af70
2017-08-03 13:59:10 -07:00
Chih-Hung Hsieh e5d975c7cc Fix clang-tidy performance warnings in system/core.
* Use const reference parameter type to avoid unnecessary copy.
* Use more efficient overloaded string methods.

Bug: 30407689
Bug: 30411878
Test: build with WITH_TIDY=1
Change-Id: Ia5a00581e718d412255d6177e5a7c286cdfbec11
2017-08-03 13:58:05 -07:00
Christopher Ferris 0d35dffc18 Merge "Add support for the new unwind method."
am: 172b1d0008

Change-Id: Ia42e055e36053f8618dc0e2c13c2cc84bc1a148d
2017-08-03 20:34:51 +00:00
Yifan Hong 6c2d927c34 Merge changes from topic 'libcutils_private_headers'
am: 472808a570

Change-Id: Ia4963b1b2c50bdcc3d9ccc6a954a465cbf9b5de0
2017-08-03 20:34:31 +00:00