Commit graph

54 commits

Author SHA1 Message Date
Elliott Hughes
dc699a269f bpfmt.
Bug: N/A
Test: builds
Change-Id: I89ad00e1c4c7e0767bc80a7ac7935a4d55e090ac
2018-02-16 17:58:14 -08:00
Yan, Shaopu
a3e4876715 Merge "add null pointer check for msg buffer"
am: f03f2a5cd7

Change-Id: I988bd6cf38aae918dd6b8c547b6db92501925685
2017-11-28 19:58:40 +00:00
Yan, Shaopu
53eb0cb5a3 add null pointer check for msg buffer
Test: Build
Change-Id: I94e08ccc8372449f11f6e673b6449c50d7eef4f9
2017-11-28 15:17:27 +08:00
Xin Li
23e27db576 Merge commit 'a63ccea6abc7ea02e2d98e41c80793ca97237bd3' from
oc-mr1-dev-plus-aosp into stage-aosp-master

Change-Id: Ia33311cd1fd26dfaea59a69317b306fb91203c40
Merged-In: I03d06b10807e8a313c9654c2e1db36bfb59e3f99
2017-11-14 13:19:45 -08:00
Chih-Hung Hsieh
122352d983 Use -Werror in system/core
* Move -Wall -Werror from cppflags to cflags.
* Fix/suppress warning on unused variables.

Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I1e05e96a1d0bcb2ccef1ce456504b3af57167cc5
2017-11-01 11:32:55 -07:00
Dan Albert
ee33873a5a Add missing includes.
Exempt-From-Owner-Approval: trivial cleanup
Test: mma
Bug: None
Change-Id: Ieb452cc9ea6ffc600873562aa37a1e3fc031dd98
2017-10-17 16:26:38 -07:00
Janis Danisevskis
5c148f3f26 libkeymaster1 split
libkeymaster1 was split into libkeymaster_portable and
libkeymaster_staging.

Bug: 37467707
Test: mma -j
Merged-In: Iead014db3f3d841f08c8072b0493ec9fd7a05055
Merged-In: I63869316451867d54bf34afb28ea232cc7eddbae
Change-Id: Iacdcef8631b4903fef4a79d146a9f59e37f31c3f
2017-10-14 01:18:32 +00:00
Andreas Gampe
a0e683c6a7 Merge "Keymaster: Move test to std::unique_ptr" am: 81348ffa9e am: 346d7e1405
am: 0fdb8616b8

Change-Id: Ie48dcc9b3c874697b726d6ab0a333905c455adb8
2017-10-02 21:37:31 +00:00
Andreas Gampe
346d7e1405 Merge "Keymaster: Move test to std::unique_ptr"
am: 81348ffa9e

Change-Id: I74b22a692e23589002eca812b88dc458bc67fad4
2017-10-02 21:22:16 +00:00
Andreas Gampe
b9d9da25ca Keymaster: Move test to std::unique_ptr
In preparation for UniquePtr removal.

Test: mmma system/core/trusty/keymaster
Change-Id: I42ca2b0d30d87e838d35a82e7ccea4e784acb2f6
2017-10-02 11:53:22 -07:00
Christopher Ferris
fcede542f2 Merge "Add missing include for readv." am: 1f6a807bac am: 831140358d
am: 4c4b8edb19

Change-Id: Ib5f0f4b99a0775329ec12130b84cf68997fe2008
2017-08-26 15:25:15 +00:00
Christopher Ferris
831140358d Merge "Add missing include for readv."
am: 1f6a807bac

Change-Id: Ib0530b4e3ea1a9fdc779c87cdd12489859a35bff
2017-08-26 15:19:14 +00:00
Christopher Ferris
5d6a0325ef Add missing include for readv.
Test: Builds.
Change-Id: Ia8511dcec6f49d3f6016a4dac88ccf343495349b
2017-08-25 17:33:38 -07:00
Hung-ying Tyan
f151c8efd2 Merge "Move trusty reference implementations to /vendor" into oc-mr1-dev
am: 9495196e20

Change-Id: I8e21eb54387caa145eac24de9a4b1ec752e7193e
2017-08-23 02:42:18 +00:00
Hung-ying Tyan
063a3fa4d2 Move trusty reference implementations to /vendor
Trusty implementations are provided by vendors. This patch moves
the AOSP reference implementations to the vendor partition.

Bug: 63085384
Test: Build gordon_peak which adopts trusty as the TEE and confirm
      that libtrusty and gateway.trusty are moved to /vendor.
Test: Build marlin which does not adopt trusty as the TEE and confirm
      that this patch has no effect on the build result.
Test: mmm BOARD_VNDK_VERSION=current system/core/trusty
Change-Id: I7f6d897b86c69d06923a18d28154760e006dd193
2017-08-22 11:23:45 +08:00
Jocelyn Bohr
eb7207dbcd Merge "Pass in message_version_ received from the secure side." am: 1a955faab2 am: 4e8bbb968c
am: 3a5d47af18

Change-Id: If57d80e166bb9ffd915ffe58ebb371bb3ada91c1
2017-08-16 00:13:37 +00:00
Treehugger Robot
1a955faab2 Merge "Pass in message_version_ received from the secure side." 2017-08-15 23:35:48 +00:00
Jocelyn Bohr
d74c72db7e Merge "Enable non-secure side to receive messages > 4K" am: 28fa8b0924 am: 9295f6f36d
am: c323791e73

Change-Id: I142fbd2ce1005489090a0bf287a27bd1946a7ced
2017-08-12 03:16:34 +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
Hung-ying Tyan
5505eb783b Revert "Move trusty reference implementations to /vendor"
The CL is not complete and will cause build break when BOARD_VNDK_VERSION is set.

This reverts commit 7d81b4e081.

Change-Id: If9632fb7ee8147c39f1ad0860ddc3bed62ba89db
2017-08-11 08:02:21 +00: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
Hung-ying Tyan
7d81b4e081 Move trusty reference implementations to /vendor
Trusty implementations are provided by vendors. This patch moves
the AOSP reference implementations to the vendor partition.

Bug: 63085384
Test: build gordon_peak which adopts trusty as the TEE and confirm
      that libtrusty and gateway.trusty are moved to /vendor.
Test: build marlin which does not adopt trusty as the TEE and confirm
      that this patch has no effect on the build result.
Change-Id: I9a5440071386b929058207fdef560ed2d7223ba3
2017-08-10 10:48:17 +08:00
Jocelyn Bohr
67d5ddde7b Merge "Return correct error code when finish input length is too long." am: 90657bbeab am: efea269a75
am: 18e3e2a66f

Change-Id: I40d235ba41cdb8a94d2955ed4dc77d94df72ed7b
2017-08-03 23:55:11 +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
Steven Moreland
57db1511bd Merge "system/core: use proper nativehelper headers" am: 4f59afe9fa am: 6208cd1322
am: 106c355688

Change-Id: I8ddfceec58ab69b6c0952ea39f3ad78802f5d7bc
2017-07-19 15:36:37 +00: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
c5c1937b58 trusty*: Android.mk -> Android.bp
Test: links
Bug: 37512442
Change-Id: I86bcdcfffbbd81dedb921612bd2d21ea4aabaeb1
2017-05-08 09:47:26 -07:00
Janis Danisevskis
8f7d80468e Rename libkeymaster to libkeymaster_staging
Fix a build breakage by renaming libkeymaster to
libkeymaster_staging. fugu's vendor tree already had
a libkeymaster.so which masked system/keymaster/libkeymaster.

Bug: 37997750
Change-Id: Iead014db3f3d841f08c8072b0493ec9fd7a05055
2017-05-04 14:15:30 -07:00
Janis Danisevskis
275b62a9a3 libkeymaster1 split
libkeymaster1 was split into libkeymaster_portable and libkeymaster.

Bug: 37467707
Change-Id: I63869316451867d54bf34afb28ea232cc7eddbae
2017-05-03 15:54:44 +00:00
Janis Danisevskis
8a0f637d41 Revert "libkeymaster1 split"
This reverts commit c5bb8c74d1.

Reason for revert: build breakage

Change-Id: I892346eec4a4628da893b0cd4182c8f546beb60a
2017-05-03 00:22:39 +00:00
Janis Danisevskis
c5bb8c74d1 libkeymaster1 split
libkeymaster1 was split into libkeymaster_portable and libkeymaster.

Change-Id: Iacdcef8631b4903fef4a79d146a9f59e37f31c3f
2017-05-01 12:32:37 -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
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
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