* [PATCH] ecryptfs: show filename encryption options
@ 2026-07-02 5:29 Yichong Chen
2026-07-21 7:28 ` Tyler Hicks
0 siblings, 1 reply; 2+ messages in thread
From: Yichong Chen @ 2026-07-02 5:29 UTC (permalink / raw)
To: Tyler Hicks
Cc: Ard Biesheuvel, Eric Biggers, Christian Brauner, Yichong Chen,
Michael Halcrow, Andrew Morton, ecryptfs, linux-kernel
ecryptfs_show_options() prints most user-visible mount options but
omits the filename encryption cipher and key size.
Print ecryptfs_fn_cipher and ecryptfs_fn_key_bytes when filename
encryption is enabled so that the displayed mount options reflect the
active filename encryption settings.
Fixes: 87c94c4df014 ("eCryptfs: Filename Encryption: mount option")
Signed-off-by: Yichong Chen <chenyichong@uniontech.com>
---
fs/ecryptfs/super.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/fs/ecryptfs/super.c b/fs/ecryptfs/super.c
index 3bc21d677564..686b2b4a9cb5 100644
--- a/fs/ecryptfs/super.c
+++ b/fs/ecryptfs/super.c
@@ -150,6 +150,13 @@ static int ecryptfs_show_options(struct seq_file *m, struct dentry *root)
if (mount_crypt_stat->global_default_cipher_key_size)
seq_printf(m, ",ecryptfs_key_bytes=%zd",
mount_crypt_stat->global_default_cipher_key_size);
+ if (mount_crypt_stat->flags & ECRYPTFS_GLOBAL_ENCRYPT_FILENAMES) {
+ seq_printf(m, ",ecryptfs_fn_cipher=%s",
+ mount_crypt_stat->global_default_fn_cipher_name);
+ if (mount_crypt_stat->global_default_fn_cipher_key_bytes)
+ seq_printf(m, ",ecryptfs_fn_key_bytes=%zd",
+ mount_crypt_stat->global_default_fn_cipher_key_bytes);
+ }
if (mount_crypt_stat->flags & ECRYPTFS_PLAINTEXT_PASSTHROUGH_ENABLED)
seq_printf(m, ",ecryptfs_passthrough");
if (mount_crypt_stat->flags & ECRYPTFS_XATTR_METADATA_ENABLED)
--
2.51.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] ecryptfs: show filename encryption options
2026-07-02 5:29 [PATCH] ecryptfs: show filename encryption options Yichong Chen
@ 2026-07-21 7:28 ` Tyler Hicks
0 siblings, 0 replies; 2+ messages in thread
From: Tyler Hicks @ 2026-07-21 7:28 UTC (permalink / raw)
To: Yichong Chen
Cc: Ard Biesheuvel, Eric Biggers, Christian Brauner, Andrew Morton,
ecryptfs, linux-kernel
On Thu, 02 Jul 2026 13:29:58 +0800, Yichong Chen wrote:
> ecryptfs_show_options() prints most user-visible mount options but
> omits the filename encryption cipher and key size.
>
> Print ecryptfs_fn_cipher and ecryptfs_fn_key_bytes when filename
> encryption is enabled so that the displayed mount options reflect the
> active filename encryption settings.
>
> [...]
Thank you! This has been applied to the next branch of the tyhicks/ecryptfs.git tree.
You can find a direct link below but please be aware that the commit hash is
unstable and, therefore, the URL may not be valid in the future.
[1/1] ecryptfs: show filename encryption options
https://git.kernel.org/tyhicks/ecryptfs/c/496ec2d0852a02d2e631771b5c439130b9c7dce7
Tyler
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-07-21 7:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-02 5:29 [PATCH] ecryptfs: show filename encryption options Yichong Chen
2026-07-21 7:28 ` Tyler Hicks
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox