1. 02 Apr, 2015 1 commit
  2. 01 Apr, 2015 2 commits
    • Jeff Sharkey's avatar
      Different blkid and fsck execution domains. · 95c87cce
      Jeff Sharkey authored
      vold works with two broad classes of block devices: untrusted devices
      that come in from the wild, and trusted devices like PrivateVolume
      which are encrypted.
      
      When running blkid and fsck, we pick which SELinux execution domain
      to use based on which class the device belongs to.
      
      Bug: 19993667
      Change-Id: I2695f028710a4863f0c3b2ed6da437f466401272
      95c87cce
    • Jeff Sharkey's avatar
      Support for private (adopted) volumes. · 9c48498f
      Jeff Sharkey authored
      This adds support for private volumes which is just a filesystem
      wrapped in a dm-crypt layer.  For now we're using the exact same
      configuration as internal encryption (aes-cbc-essiv:sha256), but we
      don't store any key material on the removable media.  Instead, we
      store the key on internal storage, and use the GPT partition GUID
      to identify which key should be used.
      
      This means that private external storage is effectively as secure as
      the internal storage of the device.  That is, if the internal storage
      is encrypted, then our external storage key is also encrypted.
      
      When partitioning disks, we now support a "private" mode which has
      a PrivateVolume partition, and a currently unused 16MB metadata
      partition reserved for future use.  It also supports a "mixed" mode
      which creates both a PublicVolume and PrivateVolume on the same
      disk.  Mixed mode is currently experimental.
      
      For now, just add ext4 support to PrivateVolume; we'll look at f2fs
      in a future change.  Add VolumeBase lifecycle for setting up crypto
      mappings, and extract blkid logic into shared method.  Sprinkle some
      more "static" around the cryptfs code to improve invariants.
      
      Bug: 19993667
      Change-Id: Ibd1df6250735b706959a1eb9d9f7219ea85912a0
      9c48498f
  3. 31 Mar, 2015 2 commits
    • Jeff Sharkey's avatar
      Fix 64 bit builds. · 38cfc028
      Jeff Sharkey authored
      Change-Id: I4e30ecff3c29d0f8351c6f43de1c979c8c792fab
      38cfc028
    • Jeff Sharkey's avatar
      Progress towards dynamic storage support. · 36801ccc
      Jeff Sharkey authored
      Wire up new Disk and VolumeBase objects and events to start replacing
      older DirectVolume code.  Use filesystem UUID as visible PublicVolume
      name to be more deterministic.
      
      When starting, create DiskSource instances based on fstab, and watch
      for kernel devices to appear.  Turn matching devices into Disk
      objects, scan for partitions, and create any relevant VolumeBase
      objects.  Broadcast all of these events towards userspace so the
      framework can decide what to mount.
      
      Keep track of the primary VolumeBase, and update the new per-user
      /storage/self/primary symlink for all started users.
      
      Provide a reset command that framework uses to start from a known
      state when runtime is restarted.  When vold is unexpectedly killed,
      try recovering by unmounting everything under /mnt and /storage
      before moving forward.
      
      Remove UMS sharing support for now, since no current devices support
      it; MTP is the recommended solution going forward because it offers
      better multi-user support.
      
      Switch killProcessesWithOpenFiles() to directly take signal.  Fix
      one SOCK_CLOEXEC bug, but SELinux says there are more lurking.
      
      Bug: 19993667
      Change-Id: I2dad1303aa4667ec14c52f774e2a28b3c1c1ff6d
      36801ccc
  4. 30 Mar, 2015 4 commits
  5. 27 Mar, 2015 4 commits
  6. 19 Mar, 2015 1 commit
  7. 16 Mar, 2015 2 commits
  8. 13 Mar, 2015 4 commits
    • Jeff Sharkey's avatar
      Merge "Follow NetlinkEvent refactoring." · 9e02365a
      Jeff Sharkey authored
      9e02365a
    • Jeff Sharkey's avatar
      Follow NetlinkEvent refactoring. · 2e0b4a2c
      Jeff Sharkey authored
      Change-Id: I130b250a663cdfb379def24583523d0287ec31dd
      2e0b4a2c
    • Jeff Sharkey's avatar
      6f90ce0f
    • Jeff Sharkey's avatar
      Checkpoint of better dynamic device support. · deb24057
      Jeff Sharkey authored
      This is the first in a series of changes that are designed to
      introduce better support for dynamic block devices.
      
      It starts by defining a new Volume object which represents a storage
      endpoint that knows how to mount, unmount, and format itself.  This
      could be a filesystem directly on a partition, or it could be an
      emulated FUSE filesystem, an ASEC, or an OBB.
      
      These new volumes can be "stacked" so that unmounting a volume will
      also unmount any volumes stacked above it.  Volumes that provide
      shared storage can also be asked to present themselves (through bind
      mounts) into user-specific mount areas.
      
      This change also adds a Disk class which is created based on block
      kernel netlink events.  Instead of waiting for partition events from
      the kernel, it uses gptfdisk to read partition details and creates
      the relevant Volume objects.
      
      Change-Id: I0e8bc1f8f9dcb24405f5e795c0658998e22ae2f7
      deb24057
  9. 06 Mar, 2015 1 commit
  10. 05 Mar, 2015 5 commits
  11. 26 Feb, 2015 12 commits
  12. 24 Feb, 2015 1 commit
    • Shawn Willden's avatar
      Rename keymaster_device_t to keymaster0_device_t. · d1fd8468
      Shawn Willden authored
      This is to accomodate the new keymaster1_device_t, which has an entirely
      different interface.
      
      Soon I'll provide a libkeymaster which provides a unified (and nicer)
      interface for dealing with both v0 and v1 keymaster implementations
      using a v1 keymaster API.  For now this change is just so that vold will
      build and run.
      
      Change-Id: I5c54282c12d1c4b8b22ed4929b6e6c724a94ede4
      d1fd8468
  13. 11 Feb, 2015 1 commit
    • JP Abgrall's avatar
      crytpfs: fix clobbering of crypto info on keymaster failure · 933216c8
      JP Abgrall authored
      Changing the device lock (even from swipe to none) will cause the
      master key to be re-encrypted.
      If at that point keymaster fails (e.g. due to an incompatible keymaster update)
      cryptfs will write back the now-incomplete crypto metadata.
      Upon next reboot, userdata can't be decrypted.
      
      Now we don't bother writing on keymaster failure.
      
      Bug: 19301883
      Change-Id: I2b9a1278f8b4d333ac8d567e17e2263005e99409
      933216c8