summaryrefslogtreecommitdiff
path: root/cryptfs.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
| * Merge "Key upgrading for FDE."Paul Crowley2017-11-271-3/+28
| |\ | | | | | | | | | | | | | | | am: 997e605563 Change-Id: If2ca4a6bd3b7a2b36b6c092975bcfdde8e063a3e
| | * Key upgrading for FDE.Paul Crowley2017-11-271-3/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Correctly handle a key upgrade error from keymaster by upgrading the FDE RSA key and writing the new key blob to disk. Bug: 69792304 Test: Roll back PLATFORM_SECURITY_PATCH a month, wipe and reboot, roll forwards again, check logs with and without this patch. Change-Id: I220d2dd4e3d791f636e9bc5f063064cecbf1b88a
| * | Merge commit 'e2d1d99f1a98b02a28fe71f2a387a72b69d4b4a6' fromXin Li2017-11-141-18/+9
| |\ \ | | |/ | |/| | | | | | | | | | oc-mr1-dev-plus-aosp into stage-aosp-master Change-Id: I4bdada4c933109f1cc60c61946fa30e174ca7583
* | | Merge "cryptfs: support make_f2fs with quota" am: 7807866abe am: 4d1c7765c8Jaegeuk Kim2017-11-141-8/+11
|\ \ \ | | | | | | | | | | | | | | | | | | | | am: 5968445892 Change-Id: Id898a24124eeafdcc1abdaafc4864d795f6fd340
| * | | Merge "cryptfs: support make_f2fs with quota" am: 7807866abeJaegeuk Kim2017-11-141-8/+11
| |\| | | | |/ | |/| | | | | | | | | | am: 4d1c7765c8 Change-Id: Ica0836d567049774eeaf41d7f75d5cd83045edfe
| | * cryptfs: support make_f2fs with quotaJaegeuk Kim2017-11-131-8/+11
| | | | | | | | | | | | | | | Change-Id: I699b457ca0282c02e0d0a399c146d4e54a403bf4 Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
| | * cryptfs: call format_f2fs correctly with proper flagsJaegeuk Kim2017-11-131-6/+8
| | | | | | | | | | | | | | | Change-Id: Ia493e6f758ff5dd5dd41479193ab237d4306d464 Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
| | * Remove CheckBattery altogetherPaul Crowley2017-10-031-6/+0
| | | | | | | | | | | | | | | | | | Test: changed Angler fstab to encryptable and encrypted. Bug: 16868177 Change-Id: I17d36ea838d6d96f0752b2d6d03b1f9a781ed018
| * | Remove CheckBattery altogetherPaul Crowley2017-10-031-6/+0
| |\ \ | | | | | | | | | | | | | | | | | | | | am: a04014bf26 Change-Id: I7aefe1d6f4815a7f02671869fe940a3cdd13cd70
| | * | Remove CheckBattery altogetherPaul Crowley2017-10-031-6/+0
| | |/ | | | | | | | | | | | | | | | Test: changed Angler fstab to encryptable and encrypted. Bug: 16868177 Change-Id: I17d36ea838d6d96f0752b2d6d03b1f9a781ed018
* | | Be even more C++. Switch on a warning.Paul Crowley2017-10-311-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove lots of "extern C" and "ifdef __cplusplus" which are no longer needed now all of vold is C++. Also turn on the cert-err58-cpp warning we once had to disable. Bug: 67041047 Test: compiles, boots Change-Id: I8c6f9dd486f2409e0deed7bb648d959677465b21
* | | Move to modern utility methods from android::base.Jeff Sharkey2017-10-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moves away from crufty char* operations to std::string utility methods, including android::base methods for splitting/parsing. Rewrite of how Process handles scanning procfs for filesystem references; now uses fts(3) for more sane traversal. Replace sscanf() with new FindValue() method, also has unit tests. Remove some unused methods. Switch almost everyone over to using modern logging library. Test: cts-tradefed run commandAndExit cts-dev -m CtsOsTestCases -t android.os.storage.cts.StorageManagerTest Test: cts-tradefed run commandAndExit cts-dev --abi armeabi-v7a -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.AdoptableHostTest Bug: 67041047 Change-Id: I70dc512f21459d1e25b187f24289002b2c7bc7af
* | | Be more C++. volume UUID should always be std::string.Paul Crowley2017-10-091-0/+1
| | | | | | | | | | | | | | | | | | Test: boots Bug: 67041047 Change-Id: I36d3944ae8de192703b9ee359900841b833fe3a1
* | | Remove dead code; move code out of cryptfs that doesn't belong.Paul Crowley2017-10-061-73/+0
| | | | | | | | | | | | | | | Test: Marlin boots Change-Id: I5c3fc21fef336b301981d6eff6f6ea242f30f66c
* | | Remove CheckBattery altogetherPaul Crowley2017-10-031-6/+0
| | | | | | | | | | | | | | | | | | Test: changed Angler fstab to encryptable and encrypted. Bug: 16868177 Change-Id: I17d36ea838d6d96f0752b2d6d03b1f9a781ed018
* | | Refactor of use of fstab in advance of fix.Paul Crowley2017-09-261-13/+11
| | | | | | | | | | | | | | | | | | Test: Ensure device still boots. Bug: 65737446 Change-Id: Ie466db9f5d8c77656cc525c0d49fe6a3cce154f1
* | | Enable "cert-err34-c" tidy checks.Jeff Sharkey2017-09-201-24/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we've moved to Binder, we only have a few lingering atoi() usages that are cleaned up in this CL. Rewrite match_multi_entry() entirely, with tests to verify both old and new implementations. Test: adb shell /data/nativetest/vold_tests/vold_tests Bug: 36655947 Change-Id: Ib79dc1ddc2366db4d5b4e1a1e2ed9456a06a983e
* | | Move all crypto commands over to Binder.Jeff Sharkey2017-09-121-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prefix FDE related commands with "fde" to make it clear which devices they apply to. This will also make it easier to remove once FDE is fully deprecated in a future release. To emulate the single-threaded nature of the old socket, introduce a lock that is acquired for all encryption related methods. Sprinkle some "const" around older files to make C++ happy. Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.DirectBootHostTest Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.AdoptableHostTest Test: cts-tradefed run commandAndExit cts-dev -m CtsOsTestCases -t android.os.storage.cts.StorageManagerTest Bug: 13758960 Change-Id: I0a6ec6e3660bbddc61424c344ff6ac6da953ccf0
* | | Merge "Switch RebootType to an enum class." am: db725d3348 am: da54114d23 ↵Josh Gao2017-08-301-13/+13
|\| | | | | | | | | | | | | | | | | | | | | | | am: c01810be33 am: 41770aab2c Change-Id: Ia5e279208a7ed804abc898520f13ceb2d19b77c3
| * | Merge "Switch RebootType to an enum class." am: db725d3348 am: da54114d23Josh Gao2017-08-291-13/+13
| |\| | | | | | | | | | | | | | | | am: c01810be33 Change-Id: Ie54bffd0befd917165debfd8d6eff8f9552d6949
| | * Merge "Switch RebootType to an enum class."Josh Gao2017-08-291-13/+13
| | |\ | | | | | | | | | | | | | | | | | | | | am: db725d3348 Change-Id: I72431dc56d20cf1acb2443ae3d67300a59e10ad3
| | | * Switch RebootType to an enum class.Josh Gao2017-08-281-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RebootType's shutdown enumerator collides with the shutdown socket function, which causes problems when <sys/socket.h> gets included transitively. Switch RebootType into an enum class, to namespace its enumerators. Test: treehugger Change-Id: Ib5e8667df363acb28771430fd43000d381dc8620
* | | | cryptfs: remove reference to legacy make_ext4fsJin Qian2017-08-161-12/+0
|/ / / | | | | | | | | | | | | | | | | | | Use upstream mke2fs tool to format ext4 filesystem. Bug: 64395169 Change-Id: I383510f25a7c0935ddb280a14ef31fcbd143cba1
* | | cryptfs: call format_f2fs correctly with proper flagsJaegeuk Kim2017-06-191-6/+8
| | | | | | | | | | | | | | | Change-Id: Ia493e6f758ff5dd5dd41479193ab237d4306d464 Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
* | | Remove timout logic in waiting vold.post_fs_data_doneWei Wang2017-06-071-18/+9
|/ / | | | | | | | | | | | | | | | | This code should not be timing out, since it has no graceful way to recover. Bug: 62308812 Test: marlin boot Change-Id: I1284f9a34e83e6451622a702d2bee40b08877db2
* | Revert "Enable metadata encryption"Guang Zhu2017-04-281-1/+0
| | | | | | | | | | | | | | | | Bug: 37792477 This reverts commit 3963b2364561a7d732995d5b8fec42097f548caa. Change-Id: I3b6bf5a9a4c3899aabe2c824d8498a06981daed8
* | Enable metadata encryptionPaul Lawrence2017-04-281-0/+1
| | | | | | | | | | | | | | | | | | Bug: 26778031 Test: Boots, reboots, sector 0 of userdata encrypted Make sure an FDE device, both default and password protected, boots. Make sure an FBE device without metadata encryption boots. Change-Id: Ic44a32ce7e9b978e9c9e2dc112b26206741c838d
* | Refactor to lay the groundwork for metadata encryptionPaul Crowley2017-04-211-609/+1
| | | | | | | | | | | | Bug: 26778031 Test: Angler, Marlin build and boot Change-Id: Ic136dfe6195a650f7db76d3489f36da6a1929dc5
* | Enable clang-tidy for security sensitive domain.Jeff Sharkey2017-03-271-2/+3
|/ | | | | | | | | | | | | | | | Start with clang-analyzer-security* and cert-*, but disable two specific errors: -- cert-err34-c, which checks for atoi(); heavily triggered by CommandListener, but will disappear when we move to Binder. -- cert-err58-cpp, which checks for exceptions before main(); it's a "Low" severity issue, and filed 36656327 to track cleanup. Fix all other triggered errors along the way. Test: builds, boots Bug: 36655947 Change-Id: I1391693fb521ed39700e25ab6b16bc741293bb79
* Change to use new WaitForProperty APIWei Wang2017-02-241-0/+3581
Change to use WaitForProperty API to wait for vold.post_fs_data_done Also change cryptfs to C++ Bug: 35425974 Test: mma, marlin/angler boot Change-Id: Id821f2035788fcc91909f296c83c871c67571de3