aboutsummaryrefslogtreecommitdiff
path: root/core
AgeCommit message (Collapse)Author
2017-10-10Add test to subdirsJeff Gaston
because once the Android.bp finder is enabled, it will be found anyway, and this will allow us to confirm separately that adding this Android.bp is successful. Bug: 64363847 Test: m -j Test: ./out/host/linux-x86/nativetest/libnvram-core-tests/libnvram-core-tests Test: ./out/host/linux-x86/nativetest64/libnvram-core-tests/libnvram-core-tests Change-Id: I8c23eacf3512ea0ad4a06553ca19506bfc5c40e6
2017-09-08Convert Android.mk to Android.bpDan Willemsen
See build/soong/README.md for more information. Test: mmma sytem/nvram Test: out/host/linux-x86/nativetest{,64}/libnvram-core-tests/libnvram-core-tests Change-Id: I3fb44a38a56bc5180eda8f98bf327a98b3030540
2017-04-27Android.mk -> Android.bpandroid-wear-o-preview-4android-wear-o-preview-3android-o-preview-2Steven Moreland
Test: links Change-Id: I8dfa201c20fb0081a00de779449d5f9acf29c32d
2017-01-24system/nvram: fix typos and clang-tidy warningsandroid-o-preview-1android-n-mr2-preview-2o-previewRahul Chaudhry
This change fixes a few typos and clang tidy warnings related to the "llvm-namespace-comment" checks. Bug: 26936282 Test: WITH_TIDY=1 WITH_TIDY_CHECKS="llvm-namespace-comment" mm Change-Id: Ib2783ee52713c2b0e5da1b8131c7baec696e74f9
2016-10-07Rely on the platform -std default.android-n-mr1-preview-2android-n-mr1-preview-1Elliott Hughes
Bug: http://b/32019064 Test: builds Change-Id: I855a44786617faaf5c6e0e48644bc992b31fb2b3
2016-07-21Rename lib{crypto,ssl}-host to lib{crypto,ssl}Dan Willemsen
There's no need to use a different name for target and host moudles. In Soong, it's better to use the same for both, as target and host modules can be defined at the same time. Change-Id: Icc70c3918f53dc7bba07d5219c6c1468da83328f
2016-06-15Filter storage status codes to ensure valid range.Mattias Nissler
This makes sure any storage status codes coming from the persistence layer are within the known range. Any status code outside the range are mapped to kStorageError. This adds an extra safety net that catches misbehaving storage implementations or problems with linking stale NVRAM object code after adding status code definitions at run time. Change-Id: Ia6418b6a8d56ac2a812434fe2565aef63a82b59a
2016-06-15Add commands for clearing NVRAM on full reset.Mattias Nissler
This adds commands that allow clearing the entire NVRAM contents. This can be used by firmware to implement the correct behavior as part of device recovery. There's always the risk of malicious invocation of the reset logic, so the new code is behind a compile flag which isn't enabled by default. BUG: 29260086 Change-Id: I8eb8a4953ed62ff75b8242daa60c1e4f99bf254d
2016-06-10Isolate crypto implementation details.Mattias Nissler
This moves the details of interfacing with crypto libraries behind a clean interface, so crypto can be swapped out as needed. Now that swapping out crypto libraries is easy, use BoringSSL for the main Android build. We can now always replace it with something else if that's need in other environments. BUG: 29238681 Change-Id: I9af046b62273ede4c98d4239a4774c25764dbdaf
2016-04-13Move system/nvram from libmincrypt to libconstrainedcrypto.android-wear-n-preview-3android-wear-n-preview-1android-n-preview-3Elliott Hughes
Bug: http://b/27287913 Change-Id: Ib4b60dba211c054eb551a2bbf8b4ff2ba6f12d8a
2016-03-11Enable NVRAM core test cases to run on Trusty.Mattias Nissler
This adds some bare-bones stubs to replace gtest in order to run the NVRAM core tests also within a trusty image. BUG: 27194661 Change-Id: If88e9903e19253bb93a10cb850511bfca5189da7
2016-03-10Add support for get_max_space_size_in_bytes().Darren Krahn
This method, added in v1.1 of the HAL, allows an implementation to report the maximum supported size for a single space. This CL also includes a few enhancements to improve testing and adds a top level Android.mk for convenience. BUG=27480753 Change-Id: I962cc7a31e869e72920cd80146b69974e50d5745
2016-03-07Switch build to use clang for all targetsMattias Nissler
This sets LOCAL_CLANG := true for all nvram targets. While at it, consisitfy the order of statements across the different files. Change-Id: Iaf1200a5ae3407c600a6f09692d2c87e833244f3
2016-02-19Fix format constants for fixed-with integer types.android-n-preview-1brillo-m10-releasebrillo-m10-devMattias Nissler
The code should use PRI... macros from inttypes.h when formatting fixed-with integer types. This prevents compiler warnings due to mismatches between actual type size and the compiler-target dependent standard format constants. Change-Id: I6e810187da0e6a136fc104c095bcffa95116bbb1
2016-02-15Additional unit tests for NvramManager.Mattias Nissler
Add unit tests for the remaining NvramManager operations. This actually uncovered buggy behavior in edge cases when operations run into errors but don't leave the system in predictable internal state. This change fixes these issues as well, so the tests pass. BUG: 26978195 Change-Id: If17c6a2073bdcea9f804385aa2fa5050e2f2c8d0
2016-02-15Implement support for write-extend NVRAM spaces.Mattias Nissler
Implement NV_CONTROL_WRITE_EXTEND, i.e. access-controlled NVRAM spaces that are hash-extended on write. This can be used for anything that employs hash-chaining, e.g. for audit logging. BUG: 26973380 Change-Id: Icb03134aa55efb52250477056ce877b3d046bc0c
2016-02-15First batch of test cases for the NVRAM core.Mattias Nissler
This adds a first batch of test cases for the Trusty NVRAM HAL implementation, covering initialization and space creation. BUG: 26978195 Change-Id: I0c626d3131e7b75d76c004b455799c59040e9c9e
2016-02-15Implement space manipulation NVRAM operations.Mattias Nissler
This adds the logic for NVRAM HAL operations that manipulate individual spaces, i.e. reading, writing and locking them. BUG: 25762540 Change-Id: Idb3a1c5c796fde32ef77d1a68c4cc554150acb8c
2016-02-15Implement info operation and space creation.Mattias Nissler
This implements the first batch of NVRAM operations: GetInfo, CreateSpace, GetSpaceInfo and DisableCreate. Operations to manipulate individual spaces will follow in a subsequent CL. BUG: 25762540 Change-Id: I74c6bcf7804cecbe7630479fbdd6bb0a0a668c7b
2016-02-15First bits of core NVRAM logic.Mattias Nissler
This adds TrustyNvram, which will hold the main logic implementing the semantics mandated by the access-controlled NVRAM HAL spec. BUG: 25762540 Change-Id: I40914bd161ca58b4f79d32a1b82c6754db5cfca8
2016-02-15Basic storage interface for NVRAM implementation.Mattias Nissler
This lays down the basic interfaces for reading and writing persistent storage objects used by the NVRAM implementation. We'll have two different types of objects: The header contains global bookkeeping information as well as list of spaces that are currently defined. For each space, there's a space-specific storage object that holds space metadata and contents. BUG: 25762540 Change-Id: Iadce20f76d84b3ed1ea25762ec673daae31d6b1d