Commit graph

55 commits

Author SHA1 Message Date
Christopher Ferris
5d6a0325ef Add missing include for readv.
Test: Builds.
Change-Id: Ia8511dcec6f49d3f6016a4dac88ccf343495349b
2017-08-25 17:33:38 -07:00
Treehugger Robot
1a955faab2 Merge "Pass in message_version_ received from the secure side." 2017-08-15 23:35:48 +00:00
Treehugger Robot
28fa8b0924 Merge "Enable non-secure side to receive messages > 4K" 2017-08-12 03:02:01 +00:00
Jocelyn Bohr
38b9b49941 Pass in message_version_ received from the secure side.
Without this there is the possibility of message version mismatch
between the secure side and the non-secure side.

Bug: 63746689
Test: cts passes
Change-Id: I242974eb86dd86ba0f657e7ab3af4ac14c08bb5c
2017-08-11 18:08:56 -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
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
Elliott Hughes
972d078b3e Stop asking for old versions of C++ in system/core.
Bug: http://b/32019064
Test: builds
Change-Id: I1befc647b581bd293f98010e816b6413caab5e6c
2017-08-02 14:06:28 -07:00
Steven Moreland
00fe3ad728 system/core: use proper nativehelper headers
libnativeheader exports headers under nativeheader. These were
available before incorrectly as global headers in order to give
access to jni.h.

Test: modules using system/core find headers
Bug: 63762847
Change-Id: I86240f7857dd815100cab32ad261aa9a0a54329c
2017-07-18 17:03:20 -07:00
Steven Moreland
8bb85bd07c trusty*: Android.mk -> Android.bp
Test: links
Bug: 37512442
Merged-In: I86bcdcfffbbd81dedb921612bd2d21ea4aabaeb1
Change-Id: I86bcdcfffbbd81dedb921612bd2d21ea4aabaeb1
2017-05-08 16:54:04 +00:00
Steven Moreland
7f0a5bd767 trusty/storage/* to Android.bp
Test: links
Bug: 37512442
Change-Id: I53449f572e41a24a4e49b16ef01bdbb23cc10cb5
2017-05-04 15:51:50 +00:00
Steven Moreland
f304a20523 libtrusty: Android.mk -> Android.bp
Test: links

Change-Id: Ic64361f98e9e51b62bfda8b2b1c3a00ae03f0a37
2017-04-26 18:58:18 -07:00
Jocelyn Bohr
5020603116 trusty: keymaster: update device tests to use 2.0 API
Test: builds, ran trusty_keymaster_tipc on imx6ul
Change-Id: Ie9e8ee35ec31aead12adb348e6542a648b41fd7a
2017-04-10 17:33:49 -07:00
Jocelyn Bohr
465615e538 trusty: keymaster: Implement abort
Test: builds
Change-Id: I8dfef740a75ff76aebd3ee63aa747e319193aaed
2017-04-10 17:33:49 -07:00
Jocelyn Bohr
e57f3ce2bf trusty: keymaster: Implement finish
Test: builds
Change-Id: I8505f428613176eea5373a459bbce0de17406c55
2017-04-10 17:33:49 -07:00
Jocelyn Bohr
86eb966106 trusty: keymaster: Implement update
Test: builds
Change-Id: Ie411a4e7ae3b5242814777f2781e1d2508917bfa
2017-04-10 17:33:49 -07:00
Jocelyn Bohr
d7da42c0fa trusty: keymaster: Implement begin
Test: builds
Change-Id: Icb5470a8c95131ee3d68ab2ce41423302b9ed531
2017-04-10 17:33:49 -07:00
Jocelyn Bohr
22812e9a30 trusty: keymaster: Implement upgrade_key
Test: builds
Change-Id: I2ce86be1cd2c2c35ded371b21cb6546c31e0014e
2017-04-10 17:33:49 -07:00
Jocelyn Bohr
a256198b92 trusty: keymaster: Implement attest_key
Test: builds
Change-Id: Ic5bf59db43b4301cbc2fa216470b9f07de8336b0
2017-04-10 17:33:49 -07:00
Jocelyn Bohr
4cbfa7f2f0 trusty: keymaster: Implement export_key
Test: builds
Change-Id: I47d1ed4144014fca47fdf67f9f4d2eb0d9b1eb8f
2017-04-10 17:33:49 -07:00
Jocelyn Bohr
2d768669fa trusty: keymaster: Implement import_key
Test: builds
Change-Id: Ie130df9958d0a75fdedb463a38ea2625e88940db
2017-04-10 17:33:49 -07:00
Jocelyn Bohr
a02270fdd9 trusty: keymaster: Implement get_key_characteristics
Test: builds
Change-Id: I6e6a28d8eec5ff91a9e8c82597593857732407f3
2017-04-10 17:33:45 -07:00
Jocelyn Bohr
e514dd8ad4 trusty: keymaster: Implement generate_key
Test: builds
Change-Id: Ib77e29709eed2e5f0cd16ed214db61f4257fcebd
2017-04-10 17:21:10 -07:00
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
Mark Salyzyn
5654a887b1 trusty: use log/log.h for ALOG macros
Test: compile
Bug: 34250038
Change-Id: I12e7c6ea5a9ca950751fcf65352889650f198986
2017-01-13 07:30:11 -08:00
Mark Salyzyn
30f991f251 liblog: use log/log.h when utilizing ALOG macros
Test: compile
Bug: 30465923
Change-Id: Id6d76510819ebd88c3f5003d00d73a0dbe85e943
2017-01-11 09:31:15 -08:00
Mark Salyzyn
cfd5b080af system/core: preparation to pull back interfaces from android/log.h
Point to log/log.h where necessary, define LOG_TAG where necessary.
Accept that private/android_logger.h is suitable replacement for
log/logger.h and android/log.h.

Correct liblog/README

Effectively a cleanup and controlled select revert of
'system/core: drop or replace log/logger.h' and
'system/core: Replace log/log.h with android/log.h'.

Test: compile
Bug: 30465923
Change-Id: Ic2ad157bad6f5efe2c6af293a73bb753300b17a2
2016-10-20 08:11:39 -07:00
Mark Salyzyn
ff2dcd9af9 system/core Replace log/log.h with android/log.h
Should use android/log.h instead of log/log.h as a good example
to all others.  Adjust header order to comply with Android Coding
standards.

Test: Compile
Bug: 26552300
Bug: 31289077
Change-Id: I33a8fb4e754d2dc4754d335660c450e0a67190fc
2016-09-30 12:47:05 -07:00
Mark Salyzyn
66ce3e08c5 system/core Replace cutils/log.h with android/log.h
Should use android/log.h instead of cutils/log.h as a good example
to all others.  Adjust header order to comply with Android Coding
standards.

Test: Compile
Bug: 26552300
Bug: 31289077
Change-Id: I2c9cbbbd64d8dccf2d44356361d9742e4a9b9031
2016-09-30 12:47:05 -07:00
Chih-hung Hsieh
6dc68cb5f9 Merge "Fix google-explicit-constructor warnings in system/core." 2016-07-29 16:57:17 +00:00
Mattias Nissler
bcd37e67db Merge "trusty: Add nvram-wipe utility." 2016-07-29 08:17:08 +00:00
Chih-Hung Hsieh
034c475931 Fix google-explicit-constructor warnings in system/core.
* Declare explicit conversion constructors.
* Add NOLINT for implicit conversion constructors.
* Fix also some misaligned indendations.

Bug: 28341362
Change-Id: Idf911f35923b408d92285cc1a053f382ba08c63e
Test: build with clang-tidy
2016-07-26 11:26:01 -07:00
Chih-Hung Hsieh
cdb2ca5d9f Fix misc-macro-parentheses warnings in system/core.
Add parentheses around macro arguments used beside operators.
Bug: 28705665

Change-Id: I9226f319e283be640eddc31687f75b51a8ef0ac6
2016-06-22 14:33:13 -07:00
Mattias Nissler
ab8fe428db trusty: Add nvram-wipe utility.
This adds a small utility which is useful to trigger access-controlled
NVRAM wipes from recovery and to disable wiping functionality after
boot.

BUG: 29260086
Change-Id: I131d400ab2643ce91d7838a2bb770afd48f83b5f
2016-06-15 14:09:53 +02:00
Michael Ryleev
462461bd28 trusty: storageproxyd: use upstream kernel headers
Force usage of upstream kernel headers to pull in
definition of rpmb related structures.

This change is required until b/25567964 is resolved.

Change-Id: Ic710d32281dcdd093f6308b82ee937143b692613
Bug: 25567964
2016-05-24 14:52:38 -07:00
Michael Ryleev
e2d6564818 trusty: storage: add tests
Change-Id: I40c9ea47e1304ef35db3d5936b001b63f3a9795e
2016-05-18 13:31:36 -07:00
Michael Ryleev
abebb89359 trusty: storage: add client lib for testing
Change-Id: I593aeed5f657b5de1fce47264ae31aa6e79f2a63
2016-05-18 13:31:36 -07:00
Michael Ryleev
f59560df2c trusty: storage: implement storage proxy daemon
Change-Id: I80cdf61e5ced00dd32a3e35eb81969d25b624df9
2016-05-02 15:12:01 -07:00
Andres Morales
117b1307d9 trusty: storage: add trusty interface header
Change-Id: I9885cc8d4204690690b384bbf209f82cb64f9265
2016-05-02 15:12:01 -07:00
Michael Ryleev
aedf9af3ec trusty: add trusty-base.mk
The trusty-base.mk should be included by devices that use
Trusty TEE to pull in the baseline set of Trusty specific modules.

Change-Id: I47c2095a21f47a40d390c9d5426380ad9507a708
2016-05-02 15:12:01 -07:00
Andres Morales
95989dbb0f trusty: add keymaster module
Change-Id: Id240b1b33e07d4cb3ea9d188014701e3d2b3c477
2016-05-02 15:12:01 -07:00
Andres Morales
1571f47f3c trusty: add gatekeeper module
Change-Id: I3e468c103326e6a9147dbed6c803748ffd5e207a
2016-05-02 15:12:01 -07:00
Mattias Nissler
ff03857437 Merge "[core][trusty] Implement Trusty NVRAM HAL module." 2016-03-15 14:43:29 +00:00
Mattias Nissler
32ac6aafa4 [core][trusty] Implement Trusty NVRAM HAL module.
This adds an NVRAM HAL module implementation which interfaces with the
Trusty NVRAM app.

BUG: 23524282
Change-Id: Ibfee13baccc2c5369786a078f2feffcd4eb7a139
2016-03-11 16:07:05 +01:00
Michael Ryleev
bccd5deee0 trusty: tipc_test: fix for building with -Wformat-security flag
Change-Id: I7aca7c7c8001ed82ed3503d622280bcd738da210
2016-02-19 13:36:26 -08:00
Michael Ryleev
33275cdd95 trusty: tipc_test: add tests for readv/writev APIs
Change-Id: If9582ae687ff6c18a767ea850a7ef346d9662724
2016-02-19 13:34:47 -08:00
Andres Morales
2b71daefb2 Merge "Revert "[core][trusty] add gatekeeper module"" 2015-09-16 22:54:14 +00:00
Andres Morales
1a1474caf2 Revert "[core][trusty] add gatekeeper module"
This reverts commit 6ee0f94adf.

Change-Id: I673103c60f43b409cc72176c9450883336831cae
2015-09-16 22:53:49 +00:00