Skip to content
Snippets Groups Projects
  • Stephen Smalley's avatar
    273d7ea4
    Label block devices created or accessed by vold with specific types. · 273d7ea4
    Stephen Smalley authored
    
    Assign a more specific type than block_device to all
    block devices created or accessed by vold.   Allow vold
    to set the context on the device nodes it creates.
    
    vold can create extra loop devices (/dev/block/loopN) and
    block devices for volumes it manages (/dev/block/vold/M:N).
    
    vold can read/write device mapper block devices (/dev/block/dm-N)
    created for encrypted volumes.
    
    vold can read/write metadata partitions used to store encryption metadata.
    The metadata_block_device type should be assigned in device-specific
    policy to the partition specified by the encryptable= mount option
    for the userata entry in the fstab.<board> file.
    
    This change does not remove the ability to create or read/write
    generic block_device devices by vold, so it should not break anything.
    It does add an auditallow statement on such accesses so that we can track
    remaining cases where we need to label such device nodes so that we can
    ultimately remove this access.
    
    Change-Id: Id3bea28f5958086716cd3db055bea309b3b5fa5a
    Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
    273d7ea4
    History
    Label block devices created or accessed by vold with specific types.
    Stephen Smalley authored
    
    Assign a more specific type than block_device to all
    block devices created or accessed by vold.   Allow vold
    to set the context on the device nodes it creates.
    
    vold can create extra loop devices (/dev/block/loopN) and
    block devices for volumes it manages (/dev/block/vold/M:N).
    
    vold can read/write device mapper block devices (/dev/block/dm-N)
    created for encrypted volumes.
    
    vold can read/write metadata partitions used to store encryption metadata.
    The metadata_block_device type should be assigned in device-specific
    policy to the partition specified by the encryptable= mount option
    for the userata entry in the fstab.<board> file.
    
    This change does not remove the ability to create or read/write
    generic block_device devices by vold, so it should not break anything.
    It does add an auditallow statement on such accesses so that we can track
    remaining cases where we need to label such device nodes so that we can
    ultimately remove this access.
    
    Change-Id: Id3bea28f5958086716cd3db055bea309b3b5fa5a
    Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>