Linux FSCRYPT development
 help / color / mirror / Atom feed
* [PATCH] fscrypt: update comment for do_remove_key()
@ 2023-12-06  0:21 Eric Biggers
  0 siblings, 0 replies; only message in thread
From: Eric Biggers @ 2023-12-06  0:21 UTC (permalink / raw)
  To: linux-fscrypt

From: Eric Biggers <ebiggers@google.com>

Adjust a comment that was missed during commit 15baf55481de
("fscrypt: track master key presence separately from secret").

Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 fs/crypto/keyring.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/crypto/keyring.c b/fs/crypto/keyring.c
index f34a9b0b9e922..0edf0b58daa76 100644
--- a/fs/crypto/keyring.c
+++ b/fs/crypto/keyring.c
@@ -995,23 +995,23 @@ static int try_to_lock_encrypted_files(struct super_block *sb,
 }
 
 /*
  * Try to remove an fscrypt master encryption key.
  *
  * FS_IOC_REMOVE_ENCRYPTION_KEY (all_users=false) removes the current user's
  * claim to the key, then removes the key itself if no other users have claims.
  * FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS (all_users=true) always removes the
  * key itself.
  *
- * To "remove the key itself", first we wipe the actual master key secret, so
- * that no more inodes can be unlocked with it.  Then we try to evict all cached
- * inodes that had been unlocked with the key.
+ * To "remove the key itself", first we transition the key to the "incompletely
+ * removed" state, so that no more inodes can be unlocked with it.  Then we try
+ * to evict all cached inodes that had been unlocked with the key.
  *
  * If all inodes were evicted, then we unlink the fscrypt_master_key from the
  * keyring.  Otherwise it remains in the keyring in the "incompletely removed"
  * state where it tracks the list of remaining inodes.  Userspace can execute
  * the ioctl again later to retry eviction, or alternatively can re-add the key.
  *
  * For more details, see the "Removing keys" section of
  * Documentation/filesystems/fscrypt.rst.
  */
 static int do_remove_key(struct file *filp, void __user *_uarg, bool all_users)

base-commit: bee0e7762ad2c6025b9f5245c040fcc36ef2bde8
-- 
2.43.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-12-06  0:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-06  0:21 [PATCH] fscrypt: update comment for do_remove_key() Eric Biggers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox