Call dmsetup to attach the dm-verity information to the mount.

This completes loading of components. They will now be verified by the
dm-verity information attached to the disk image.

BUG=chromium:630421
TEST=FEATURES="test" emerge-${BOARD} imageloader

Change-Id: I7dfe494112591ef3f82240739394a0ac163e5e90
Reviewed-on: https://chromium-review.googlesource.com/385699
Commit-Ready: Greg Kerr <kerrnel@chromium.org>
Tested-by: Greg Kerr <kerrnel@chromium.org>
Reviewed-by: Greg Kerr <kerrnel@chromium.org>
11 files changed
tree: 80fe7ad4ab53e54c194ff148701417c9b7903cdf
  1. public_keys/
  2. test/
  3. .presubmitignore
  4. imageloadclient-glue.xml
  5. imageloadclient.cc
  6. imageloadclient.h
  7. imageloader-glue.xml
  8. imageloader.conf
  9. imageloader.gyp
  10. imageloader.h
  11. imageloader_common.cc
  12. imageloader_common.h
  13. imageloader_impl.cc
  14. imageloader_impl.h
  15. imageloader_main.cc
  16. imageloader_unittest.cc
  17. mock_verity_mounter.h
  18. org.chromium.ImageLoader.conf
  19. org.chromium.ImageLoader.service
  20. README.md
  21. run_tests.cc
  22. verity_mounter.cc
  23. verity_mounter.h
README.md

src/platform/imageloader

This aims to provide a generic utility to load (mount) and unload (unmount) verified disk images through DBus IPC.

Binaries

  • imageloader
  • imageloadclient

imageloader can be run as root and can handle mounting and unmounting of disk images. imageloadclient is a simple client (intended to be run as chronos) that can talk to imageloader and ask it to mount and unmount stuff. When imageloader is not running, DBus can invoke it via the one time run option (imageloader -o) and get the task done.