blk-crypto: rename blk_keyslot_manager to blk_crypto_profile
blk_keyslot_manager is misnamed because it doesn't necessarily manage keyslots. It actually does several different things: - Contains the crypto capabilities of the device. - Provides functions to control the inline encryption hardware. Originally these were just for programming/evicting keyslots; however, new functionality (hardware-wrapped keys) will require new functions here which are unrelated to keyslots. Moreover, device-mapper devices already (ab)use "keyslot_evict" to pass key eviction requests to their underlying devices even though device-mapper devices don't have any keyslots themselves (so it really should be "evict_key", not "keyslot_evict"). - Sometimes (but not always!) it manages keyslots. Originally it always did, but device-mapper devices don't have keyslots themselves, so they use a "passthrough keyslot manager" which doesn't actually manage keyslots. This hack works, but the terminology is unnatural. Also, some hardware doesn't have keyslots and thus also uses a "passthrough keyslot manager" (support for such hardware is yet to be upstreamed, but it will happen eventually). Let's stop having keyslot managers which don't actually manage keyslots. Instead, rename blk_keyslot_manager to blk_crypto_profile. This is a fairly big change, since for consistency it also has to update keyslot manager-related function names, variable names, and comments -- not just the actual struct name. However it's still a fairly straightforward change, as it doesn't change any actual functionality. Acked-by: Ulf Hansson <ulf.hansson@linaro.org> # For MMC Reviewed-by:Mike Snitzer <snitzer@redhat.com> Reviewed-by:
Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by:
Eric Biggers <ebiggers@google.com> Link: https://lore.kernel.org/r/20211018180453.40441-4-ebiggers@kernel.org Signed-off-by:
Jens Axboe <axboe@kernel.dk>
Showing
- block/blk-crypto-fallback.c 35 additions, 36 deletionsblock/blk-crypto-fallback.c
- block/blk-crypto-profile.c 253 additions, 267 deletionsblock/blk-crypto-profile.c
- block/blk-crypto.c 14 additions, 13 deletionsblock/blk-crypto.c
- block/blk-integrity.c 2 additions, 2 deletionsblock/blk-integrity.c
- drivers/md/dm-core.h 1 addition, 1 deletiondrivers/md/dm-core.h
- drivers/md/dm-table.c 82 additions, 86 deletionsdrivers/md/dm-table.c
- drivers/md/dm.c 4 additions, 4 deletionsdrivers/md/dm.c
- drivers/mmc/core/crypto.c 7 additions, 4 deletionsdrivers/mmc/core/crypto.c
- drivers/mmc/host/cqhci-crypto.c 16 additions, 15 deletionsdrivers/mmc/host/cqhci-crypto.c
- drivers/scsi/ufs/ufshcd-crypto.c 17 additions, 15 deletionsdrivers/scsi/ufs/ufshcd-crypto.c
- drivers/scsi/ufs/ufshcd-crypto.h 4 additions, 5 deletionsdrivers/scsi/ufs/ufshcd-crypto.h
- drivers/scsi/ufs/ufshcd.c 1 addition, 1 deletiondrivers/scsi/ufs/ufshcd.c
- drivers/scsi/ufs/ufshcd.h 2 additions, 2 deletionsdrivers/scsi/ufs/ufshcd.h
- include/linux/blk-crypto-profile.h 105 additions, 59 deletionsinclude/linux/blk-crypto-profile.h
- include/linux/blk-mq.h 1 addition, 1 deletioninclude/linux/blk-mq.h
- include/linux/blkdev.h 8 additions, 8 deletionsinclude/linux/blkdev.h
- include/linux/device-mapper.h 2 additions, 2 deletionsinclude/linux/device-mapper.h
- include/linux/mmc/host.h 1 addition, 1 deletioninclude/linux/mmc/host.h
Loading
Please register or sign in to comment