Skip to content
Snippets Groups Projects
  1. Mar 02, 2021
  2. Mar 01, 2021
  3. Feb 26, 2021
  4. Feb 24, 2021
  5. Feb 23, 2021
  6. Feb 22, 2021
  7. Feb 12, 2021
  8. Feb 11, 2021
    • Satya Tangirala's avatar
      dm: support key eviction from keyslot managers of underlying devices · 9355a9eb
      Satya Tangirala authored
      
      Now that device mapper supports inline encryption, add the ability to
      evict keys from all underlying devices. When an upper layer requests
      a key eviction, we simply iterate through all underlying devices
      and evict that key from each device.
      
      Co-developed-by: default avatarEric Biggers <ebiggers@google.com>
      Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
      Signed-off-by: default avatarSatya Tangirala <satyat@google.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      9355a9eb
    • Satya Tangirala's avatar
      block/keyslot-manager: Introduce functions for device mapper support · d3b17a24
      Satya Tangirala authored
      
      Introduce blk_ksm_update_capabilities() to update the capabilities of
      a keyslot manager (ksm) in-place. The pointer to a ksm in a device's
      request queue may not be easily replaced, because upper layers like
      the filesystem might access it (e.g. for programming keys/checking
      capabilities) at the same time the device wants to replace that
      request queue's ksm (and free the old ksm's memory). This function
      allows the device to update the capabilities of the ksm in its request
      queue directly. Devices can safely update the ksm this way without any
      synchronization with upper layers *only* if the updated (new) ksm
      continues to support all the crypto capabilities that the old ksm did
      (see description below for blk_ksm_is_superset() for why this is so).
      
      Also introduce blk_ksm_is_superset() which checks whether one ksm's
      capabilities are a (not necessarily strict) superset of another ksm's.
      The blk-crypto framework requires that crypto capabilities that were
      advertised when a bio was created continue to be supported by the
      device until that bio is ended - in practice this probably means that
      a device's advertised crypto capabilities can *never* "shrink" (since
      there's no synchronization between bio creation and when a device may
      want to change its advertised capabilities) - so a previously
      advertised crypto capability must always continue to be supported.
      This function can be used to check that a new ksm is a valid
      replacement for an old ksm.
      
      Signed-off-by: default avatarSatya Tangirala <satyat@google.com>
      Reviewed-by: default avatarEric Biggers <ebiggers@google.com>
      Acked-by: default avatarJens Axboe <axboe@kernel.dk>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      d3b17a24
    • Satya Tangirala's avatar
      block/keyslot-manager: Introduce passthrough keyslot manager · 7bdcc48f
      Satya Tangirala authored
      
      The device mapper may map over devices that have inline encryption
      capabilities, and to make use of those capabilities, the DM device must
      itself advertise those inline encryption capabilities. One way to do this
      would be to have the DM device set up a keyslot manager with a
      "sufficiently large" number of keyslots, but that would use a lot of
      memory. Also, the DM device itself has no "keyslots", and it doesn't make
      much sense to talk about "programming a key into a DM device's keyslot
      manager", so all that extra memory used to represent those keyslots is just
      wasted. All a DM device really needs to be able to do is advertise the
      crypto capabilities of the underlying devices in a coherent manner and
      expose a way to evict keys from the underlying devices.
      
      There are also devices with inline encryption hardware that do not
      have a limited number of keyslots. One can send a raw encryption key along
      with a bio to these devices (as opposed to typical inline encryption
      hardware that require users to first program a raw encryption key into a
      keyslot, and send the index of that keyslot along with the bio). These
      devices also only need the same things from the keyslot manager that DM
      devices need - a way to advertise crypto capabilities and potentially a way
      to expose a function to evict keys from hardware.
      
      So we introduce a "passthrough" keyslot manager that provides a way to
      represent a keyslot manager that doesn't have just a limited number of
      keyslots, and for which do not require keys to be programmed into keyslots.
      DM devices can set up a passthrough keyslot manager in their request
      queues, and advertise appropriate crypto capabilities based on those of the
      underlying devices. Blk-crypto does not attempt to program keys into any
      keyslots in the passthrough keyslot manager. Instead, if/when the bio is
      resubmitted to the underlying device, blk-crypto will try to program the
      key into the underlying device's keyslot manager.
      
      Signed-off-by: default avatarSatya Tangirala <satyat@google.com>
      Reviewed-by: default avatarEric Biggers <ebiggers@google.com>
      Acked-by: default avatarJens Axboe <axboe@kernel.dk>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      7bdcc48f
  9. Feb 10, 2021
  10. Feb 08, 2021
  11. Feb 03, 2021
    • Lin Feng's avatar
      bfq-iosched: Revert "bfq: Fix computation of shallow depth" · 388c705b
      Lin Feng authored
      
      This reverts commit 6d4d2735.
      
      bfq.limit_depth passes word_depths[] as shallow_depth down to sbitmap core
      sbitmap_get_shallow, which uses just the number to limit the scan depth of
      each bitmap word, formula:
      scan_percentage_for_each_word = shallow_depth / (1 << sbimap->shift) * 100%
      
      That means the comments's percentiles 50%, 75%, 18%, 37% of bfq are correct.
      But after commit patch 'bfq: Fix computation of shallow depth', we use
      sbitmap.depth instead, as a example in following case:
      
      sbitmap.depth = 256, map_nr = 4, shift = 6; sbitmap_word.depth = 64.
      The resulsts of computed bfqd->word_depths[] are {128, 192, 48, 96}, and
      three of the numbers exceed core dirver's 'sbitmap_word.depth=64' limit
      nothing.
      
      Signed-off-by: default avatarLin Feng <linf@wangsu.com>
      Reviewed-by: default avatarJan Kara <jack@suse.cz>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      388c705b
  12. Feb 02, 2021
  13. Feb 01, 2021
  14. Jan 29, 2021
Loading