Commit graph

34505 commits

Author SHA1 Message Date
Tom Cherry
08228116a8 Merge "init: split security functions out of init.cpp" into oc-dev-plus-aosp 2017-08-14 16:45:19 +00:00
Christopher Ferris
0a616421d8 Merge "Compare new unwinder to old unwinder in debuggerd." am: bb2f03f344
am: 1f6a481462

Change-Id: I741f675f1ba3e853614b0310965bf41a6972a22a
2017-08-12 16:14:57 +00:00
Christopher Ferris
174f78e4cc Merge "Add demangling of function name." am: 6452b9036d
am: e10835f28a

Change-Id: Iddb8a90281570eeca52e54a63ef36eede550e3fc
2017-08-12 16:14:17 +00:00
Christopher Ferris
1f6a481462 Merge "Compare new unwinder to old unwinder in debuggerd."
am: bb2f03f344

Change-Id: I3e51fadda629f7d4bda8e4ddc4c0b60ebbdb49b8
2017-08-12 16:11:47 +00:00
Christopher Ferris
e10835f28a Merge "Add demangling of function name."
am: 6452b9036d

Change-Id: I7a2b883afb4fca2e8ce754b3bcea867ed0779c5b
2017-08-12 16:11:18 +00:00
Christopher Ferris
bb2f03f344 Merge "Compare new unwinder to old unwinder in debuggerd." 2017-08-12 16:06:48 +00:00
Christopher Ferris
6452b9036d Merge "Add demangling of function name." 2017-08-12 16:06:18 +00:00
Jocelyn Bohr
c323791e73 Merge "Enable non-secure side to receive messages > 4K" am: 28fa8b0924
am: 9295f6f36d

Change-Id: I8bab2100c4ec84d3aa6438acb16a93c97fab53e1
2017-08-12 03:10:36 +00:00
Jocelyn Bohr
9295f6f36d Merge "Enable non-secure side to receive messages > 4K"
am: 28fa8b0924

Change-Id: Ibfe35d6b861640974b268213353745a32f11a56b
2017-08-12 03:08:03 +00:00
Treehugger Robot
28fa8b0924 Merge "Enable non-secure side to receive messages > 4K" 2017-08-12 03:02:01 +00:00
Josh Gao
0b89748d4c Merge "debuggerd_handler: print pid and process name." am: 94b0e4f5df
am: 4c968c1ef6

Change-Id: Ia8cd09ac5a2081f821c3f94ff531e60b7b65f861
2017-08-12 01:37:27 +00:00
Josh Gao
4c968c1ef6 Merge "debuggerd_handler: print pid and process name."
am: 94b0e4f5df

Change-Id: I16ab84a436d972de08172c5235abff650609e818
2017-08-12 01:34:58 +00:00
Treehugger Robot
94b0e4f5df Merge "debuggerd_handler: print pid and process name." 2017-08-12 01:27:53 +00:00
Tom Cherry
2c486f593c Merge "init: fix format issue" am: f95338f634
am: a1051005a9

Change-Id: Ied41953b37104906e2a9551c3f5c2c34dc8168a1
2017-08-12 00:17:52 +00:00
Tom Cherry
a1051005a9 Merge "init: fix format issue"
am: f95338f634

Change-Id: I771056e5543e8d1028a61fd9190e90a29b9bcfec
2017-08-12 00:15:53 +00:00
Treehugger Robot
f95338f634 Merge "init: fix format issue" 2017-08-12 00:07:58 +00:00
Christopher Ferris
9a8c855780 Compare new unwinder to old unwinder in debuggerd.
In debuggerd, when dumping a tombstone, run the new unwinder and verify
the old and new unwinder are the same. If not, dump enough information
in the tombstones to figure out how to duplicate the failure.

Bug: 23762183

Test: Builds, ran and forced a mismatch and verified output.
Change-Id: Ia178bde64d67e623d4f35086ebda68aebbff0c3c
2017-08-11 16:37:59 -07:00
Josh Gao
81e6c0b613 debuggerd_handler: print pid and process name.
Bug: http://b/64483618
Test: manual
Change-Id: Ie772324895a8ffcd41d919a4a6113862a6468d12
2017-08-11 15:38:51 -07:00
Christopher Ferris
04fdec0bbf Add demangling of function name.
Bug: 23762183

Test: Builds, unit tests pass.
Change-Id: Id49248a27d822db0f3837bfc0c20d004c55315fc
2017-08-11 15:17:46 -07:00
Wei Wang
67eac4fa36 Merge "init: Add readahead built-in command" am: 12bd22badf
am: 826bc7b507

Change-Id: I3cdb1022bf863c5ffd58be0d7af5f6712c818365
2017-08-11 22:15:29 +00:00
Tom Cherry
c3692b3ea9 init: split security functions out of init.cpp
This change splits out the selinux initialization and supporting
functionality into selinux.cpp and splits the security related
initialization of the rng, etc to security.cpp.  It also provides
additional documentation for SEPolicy loading as this has been
requested by some teams.

It additionally cleans up sehandle and sehandle_prop.  The former is
static within selinux.cpp and new wrapper functions are created around
selabel_lookup*() to better serve the users.  The latter is moved to
property_service.cpp as it is isolated to that file for its usage.

Test: boot bullhead
Merged-In: Idc95d493cebc681fbe686b5160502f36af149f60
Change-Id: Idc95d493cebc681fbe686b5160502f36af149f60
(cherry picked from commit 9afb86b25d8675927cb37c86119a7ecf19f74819)
2017-08-11 15:01:15 -07:00
Wei Wang
826bc7b507 Merge "init: Add readahead built-in command"
am: 12bd22badf

Change-Id: I4cd4ea9a013a1bcbe065e7dbce18f61a897393d9
2017-08-11 21:51:36 +00:00
Treehugger Robot
12bd22badf Merge "init: Add readahead built-in command" 2017-08-11 21:37:47 +00:00
Tom Cherry
1f87cd1bd0 init: fix format issue
Trying to limit merge conflicts later...

Test: build
Change-Id: I802f2cf86b8432f65ad4dcd45bfd543ee5091775
2017-08-11 13:22:37 -07:00
Wei Wang
542aae443f init: Add readahead built-in command
Inspired by ag/2659809/, this CL add readahead built-in command in init
to let files be prefetched into pagecache for faster reading.
Readahead happens in background but due to filesystem limitation it
might take small amount of time in it reading the filesystem metadata
needed to locate the requested blocks. So the command is executed in a
forked process to not block init execution.

Bug: 62413151
Test: boottime, dumpcache
Change-Id: I56c86e2ebc20efda4aa509e6efb736bd1d92baa5
2017-08-11 11:24:08 -07:00
Christopher Ferris
f49aa1323f Merge "Fix another set of bugs." am: af6a262020
am: df04d3bc93

Change-Id: I7aed878b670ef47f579057485217cb87187701cc
2017-08-11 14:38:22 +00:00
Christopher Ferris
df04d3bc93 Merge "Fix another set of bugs."
am: af6a262020

Change-Id: Ie17cded589e0a930c6ae19b981f320a969a353aa
2017-08-11 14:33:52 +00:00
Christopher Ferris
af6a262020 Merge "Fix another set of bugs." 2017-08-11 14:28:46 +00:00
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
Andrew Scull
a3f425950c Merge "Add HSM AID." am: 4723d7c66d
am: ef1dd0d279

Change-Id: I3b00e1fd0761e9d9daa439cf1ca5eedc0eab84fb
2017-08-10 21:39:47 +00: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
81d0f72d41 Merge "bootstat: switch from root.root to system.log" am: de6b44aa0e
am: 67ad31b21f

Change-Id: I609a77a3eb6d61e60bea63d8e87eab1ab042eaf9
2017-08-10 15:07:48 +00: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
94e8bf2da0 Merge "Don't try to strip a shell script" am: ff7e13c260
am: 3efedfae39

Change-Id: I5c9d7dee5c04eb1c7b564707d97338a04b6f03a0
2017-08-10 05:49:22 +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
cd9b0c16bc Merge changes If1cffa85,I9011a959 am: 30bd51c61f
am: fb9deac35c

Change-Id: I6957a7320f43fd377267259feb42ea932cbf9ada
2017-08-10 04:39:38 +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
e817549d2a Merge "Include asan options from data partition." am: 5d89e6c7fe
am: 725fa57109

Change-Id: I57eddf490a619c843770ed8ae278afdc81ab7d9d
2017-08-10 01:15:23 +00: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
22ea80bdcd Merge "Small clean ups" am: 5cd87d39d7
am: 188072f6a4

Change-Id: Ifb47bd38f254e25820bf1bfb62a158ac7631b434
2017-08-09 23:29:08 +00:00