commit | 4bc8a10caff8d7154d9ad789b9d0fc01499fa02e | [log] [tgz] |
---|---|---|
author | John Edward Broadbent <jebr@google.com> | Thu Dec 30 16:11:49 2021 -0800 |
committer | John Broadbent <jebr@google.com> | Sat Jan 15 00:54:31 2022 +0000 |
tree | 98942b1cec1a9009209ded944b62f2e90acd8565 | |
parent | b17f82519d4a912c9bc2aa47499126f4a84aace0 [diff] |
Add zero write and verify This code implements the zero verify and zero write dbus interface. The goal is to fill the whole block device with zeros, then check to make sure the operation worked correctly. Tested: $ systemctl stop emmc.service $ ./eStoraged -b /dev/mmcblk0 & $ time busctl call xyz.openbmc_project.eStoraged.mmcblk0 /xyz/openbmc_project/storage/mmcblk0 xyz.openbmc_project.Inventory.Item.Volume Erase s xyz.openbmc_project.Inventory.Item.Volume.EraseMethod.ZeroOverWrite --timeout=1200 Erasing encrypted eMMC <6> Starting erase real 5m59.695s user 0m0.000s sys 0m0.030s root@ytbaz20-nfd01:~/jebr# hexdump /dev/mmcblk0 0000000 0000 0000 0000 0000 0000 0000 0000 0000 * $ time busctl call xyz.openbmc_project.eStoraged.mmcblk0 /xyz/openbmc_project/storage/mmcblk0 xyz.openbmc_project.Inventory.Item.Volume Erase s xyz.openbmc_project.Inventory.Item.Volume.EraseMethod.ZeroVerify --timeout=1200 Erasing encrypted eMMC <6> Starting erase real 5m46.920s user 0m0.010s sys 0m0.010s $ echo "not zero" > /dev/mmcblk0 $ time busctl call xyz.openbmc_project.eStoraged.mmcblk0 /xyz/openbmc_project/storage/mmcblk0 xyz.openbmc_project.Inventory.Item.Volume Erase s xyz.openbmc_project.Inventory.Item.Volume.EraseMethod.ZeroVerify --timeout=1200 Erasing encrypted eMMC <6> Starting erase <3> Estoraged erase zeros block is not zero Call failed: The operation failed internally. real 0m0.022s user 0m0.000s sys 0m0.020s Change-Id: Ie78ad427de1aa75472fc7ddd72d094866fe14b66 Signed-off-by: John Edward Broadbent <jebr@google.com>
This daemon serves as an abstraction for an encrypted storage device, encapsulating the security functionality and providing a D-Bus interface to manage the encrypted filesystem on the device. Using the D-Bus interface, other software components can interact with eStoraged to do things like create a new encrypted filesystem, wipe its contents, lock/unlock the device, or change the password.