Commit graph

7 commits

Author SHA1 Message Date
Paul Crowley
2143ee8d61 Zero out blocks if BLKSECDISCARD fails
On a device where we can't BLKSECDISCARD sectors, we "overwrite" them
with zeroes. This changes the FTL to remap those sectors to new
locations.  With this done, the old contents are accessible only given
a compromise of flash firmware or a die level attack.

Bug: 26021231
Change-Id: Ia065921389886fac1ba456c19c138187237c2561
2016-07-11 17:31:36 -07:00
Paul Crowley
8bb8fcfb4f Use android-base logging not cutils in secdiscard
Much nicer C++ style logging, but the main reason is to clean up
AutoCloseFD.h so I don't have to use cutils to use it.

Change-Id: I7a7f227508418046eecce6c89f813bd8854f448a
2016-01-12 10:03:05 +00:00
Paul Crowley
28c4df4bdc Make deletion of larger files possible.
Bug: 22502684
Change-Id: I9034af1ce919bff51f836e5bf51cc2585089440e
2015-11-17 13:29:20 +00:00
Paul Crowley
5ab73e945d Add --no-unlink option to secdiscard for testing.
Also allow deletion of multiple files in one invocation.

Change-Id: I5011bf45f2d3b91964bc68fd8e61ec037e1de2ca
2015-11-02 10:13:52 +00:00
Paul Crowley
4432e73494 secdiscard.cpp: Use getmntent and my newfound C++ knowledge.
Bug: 19706593
Change-Id: I6254e0339ab42fdbecda80c6f37e64c323329190
2015-11-02 10:13:52 +00:00
Paul Crowley
747e1f7a6d Fix erroneous comment in secdiscard.cpp, plus style fixes.
Bug: 19706593

Change-Id: I9c1442f31cc6b6507225a5aa9ad07be6042d69ce
2015-06-24 16:06:33 +00:00
Paul Crowley
53af81c60d Scrub the key from the disk with BLKSECDISCARD.
Bug: 19706593
Change-Id: Ib91b5182413b5dca6d0e1fdda7990ea0973843bb
2015-06-17 03:40:33 +01:00