Commit graph

66 commits

Author SHA1 Message Date
Paul Crowley
a04014bf26 Remove CheckBattery altogether
Test: changed Angler fstab to encryptable and encrypted.
Bug: 16868177
Change-Id: I17d36ea838d6d96f0752b2d6d03b1f9a781ed018
2017-10-03 10:45:23 -07:00
Paul Crowley
e2ee152e46 Refactor of use of fstab in advance of fix.
Test: Ensure device still boots.
Bug: 65737446
Change-Id: Ie466db9f5d8c77656cc525c0d49fe6a3cce154f1
2017-09-26 14:21:10 -07:00
Jeff Sharkey
95440ebd97 Enable "cert-err34-c" tidy checks.
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
2017-09-20 13:29:48 -06:00
Jeff Sharkey
83b559ced4 Move all crypto commands over to Binder.
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
2017-09-12 17:24:06 -06:00
Josh Gao
e78efb7df4 Merge "Switch RebootType to an enum class." am: db725d3348 am: da54114d23 am: c01810be33
am: 41770aab2c

Change-Id: Ia5e279208a7ed804abc898520f13ceb2d19b77c3
2017-08-30 02:52:55 +00:00
Josh Gao
41770aab2c Merge "Switch RebootType to an enum class." am: db725d3348 am: da54114d23
am: c01810be33

Change-Id: Ie54bffd0befd917165debfd8d6eff8f9552d6949
2017-08-29 22:01:20 +00:00
Josh Gao
da54114d23 Merge "Switch RebootType to an enum class."
am: db725d3348

Change-Id: I72431dc56d20cf1acb2443ae3d67300a59e10ad3
2017-08-29 21:47:58 +00:00
Josh Gao
fec4437972 Switch RebootType to an enum class.
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
2017-08-28 13:22:55 -07:00
Jin Qian
b678d7c3f7 cryptfs: remove reference to legacy make_ext4fs
Use upstream mke2fs tool to format ext4 filesystem.

Bug: 64395169
Change-Id: I383510f25a7c0935ddb280a14ef31fcbd143cba1
2017-08-16 11:01:14 -07:00
Jaegeuk Kim
ab48bc9dbd cryptfs: call format_f2fs correctly with proper flags
Change-Id: Ia493e6f758ff5dd5dd41479193ab237d4306d464
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2017-06-19 18:38:17 -07:00
Wei Wang
42e3810e13 Remove timout logic in waiting vold.post_fs_data_done
This code should not be timing out, since it has no graceful way to
recover.

Bug: 62308812
Test: marlin boot
Change-Id: I1284f9a34e83e6451622a702d2bee40b08877db2
2017-06-07 11:26:41 -07:00
Guang Zhu
5b6c6a2c4a Revert "Enable metadata encryption"
Bug: 37792477

This reverts commit 3963b23645.

Change-Id: I3b6bf5a9a4c3899aabe2c824d8498a06981daed8
2017-04-28 23:58:39 +00:00
Paul Lawrence
3963b23645 Enable metadata encryption
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
2017-04-28 16:44:23 +00:00
Paul Crowley
f71ace310e Refactor to lay the groundwork for metadata encryption
Bug: 26778031
Test: Angler, Marlin build and boot
Change-Id: Ic136dfe6195a650f7db76d3489f36da6a1929dc5
2017-04-21 10:47:17 -07:00
Jeff Sharkey
32ebb739cb Enable clang-tidy for security sensitive domain.
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
2017-03-27 17:14:52 -06:00
Wei Wang
4375f1be4c Change to use new WaitForProperty API
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
2017-02-24 17:47:53 -08:00
Renamed from cryptfs.c (Browse further)