block/keyslot-manager: use kvfree_sensitive()
PATCH 1/1 block/keyslot-manager: use kvfree_sensitive()
From: Eric Biggers <[email protected]>
Make blk_ksm_destroy() use the kvfree_sensitive() function (which was introduced in v5.8-rc1) instead of open-coding it.
Signed-off-by Eric Biggers <[email protected]>
--- block/keyslot-manager.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
block/keyslot-manager.c +1 -2
@@ -374,8 +374,7 @@ void blk_ksm_destroy(struct blk_keyslot_manager *ksm)if (!ksm)return ;kvfree (ksm->slot_hashtable); -memzero_explicit (ksm->slots,sizeof (ksm->slots[0 ]) * ksm->num_slots); -kvfree (ksm->slots); +kvfree_sensitive (ksm->slots,sizeof (ksm->slots[0 ]) * ksm->num_slots);memzero_explicit (ksm,sizeof (*ksm)); }EXPORT_SYMBOL_GPL (blk_ksm_destroy);
Signature · 1 line
2.27.0.290.gba653c62da-goog
Quoted 16 lines · Eric Biggers
From: Eric Biggers <[email protected]>
Make
blk_ksm_destroy()use thekvfree_sensitive()function (which was introduced in v5.8-rc1) instead of open-coding it.Signed-off-by Eric Biggers <[email protected]>--- block/keyslot-manager.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)block/keyslot-manager.c +0
-0
block/keyslot-manager.c void blk_ksm_destroy(struct blk_keyslot_manager *ksm) · line 380
Quoted 9 lines
block/keyslot-manager.c +1
-2@@ -374,8 +374,7 @@ void blk_ksm_destroy(struct blk_keyslot_manager *ksm)if (!ksm)return ;kvfree (ksm->slot_hashtable); -memzero_explicit (ksm->slots,sizeof (ksm->slots[0 ]) * ksm->num_slots); -kvfree (ksm->slots); +kvfree_sensitive (ksm->slots,sizeof (ksm->slots[0 ]) * ksm->num_slots);memzero_explicit (ksm,sizeof (*ksm)); }EXPORT_SYMBOL_GPL (blk_ksm_destroy);
Ping?
Quoted 20 lines · Eric Biggers
Quoted 19 lines · Eric Biggers
From: Eric Biggers <[email protected]>
Make
blk_ksm_destroy()use thekvfree_sensitive()function (which was introduced in v5.8-rc1) instead of open-coding it.Signed-off-by Eric Biggers <[email protected]>--- block/keyslot-manager.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)block/keyslot-manager.c +0
-1@@ -374,8 +374,7 @@ void blk_ksm_destroy(struct blk_keyslot_manager *ksm)if (!ksm)return ;kvfree (ksm->slot_hashtable); -memzero_explicit (ksm->slots,sizeof (ksm->slots[0 ]) * ksm->num_slots);
Quoted 8 lines
block/keyslot-manager.c void blk_ksm_destroy(struct blk_keyslot_manager *ksm) · line 380
Quoted 6 lines
block/keyslot-manager.c +1
-1-kvfree (ksm->slots); +kvfree_sensitive (ksm->slots,sizeof (ksm->slots[0 ]) * ksm->num_slots);memzero_explicit (ksm,sizeof (*ksm)); }EXPORT_SYMBOL_GPL (blk_ksm_destroy);Ping?
Applied, thanks.
Signature · 1 line
Jens Axboe