Skip to content

Commit e77cc8d

Browse files
author
Tyler Hicks
committed
eCryptfs: Remove ecryptfs_unlink_sigs warnings
A feature was added to the eCryptfs umount helper to automatically unlink the keys used for an eCryptfs mount from the kernel keyring upon umount. This patch keeps the unrecognized mount option warnings for ecryptfs_unlink_sigs out of the logs. Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
1 parent 13a791b commit e77cc8d

3 files changed

Lines changed: 8 additions & 1 deletion

File tree

‎fs/ecryptfs/ecryptfs_kernel.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ struct ecryptfs_crypt_stat {
269269
#define ECRYPTFS_ENCRYPT_FILENAMES 0x00000800
270270
#define ECRYPTFS_ENCFN_USE_MOUNT_FNEK 0x00001000
271271
#define ECRYPTFS_ENCFN_USE_FEK 0x00002000
272+
#define ECRYPTFS_UNLINK_SIGS 0x00004000
272273
u32 flags;
273274
unsigned int file_version;
274275
size_t iv_bytes;

‎fs/ecryptfs/main.c‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ enum { ecryptfs_opt_sig, ecryptfs_opt_ecryptfs_sig,
208208
ecryptfs_opt_passthrough, ecryptfs_opt_xattr_metadata,
209209
ecryptfs_opt_encrypted_view, ecryptfs_opt_fnek_sig,
210210
ecryptfs_opt_fn_cipher, ecryptfs_opt_fn_cipher_key_bytes,
211-
ecryptfs_opt_err };
211+
ecryptfs_opt_unlink_sigs, ecryptfs_opt_err };
212212

213213
static const match_table_t tokens = {
214214
{ecryptfs_opt_sig, "sig=%s"},
@@ -222,6 +222,7 @@ static const match_table_t tokens = {
222222
{ecryptfs_opt_fnek_sig, "ecryptfs_fnek_sig=%s"},
223223
{ecryptfs_opt_fn_cipher, "ecryptfs_fn_cipher=%s"},
224224
{ecryptfs_opt_fn_cipher_key_bytes, "ecryptfs_fn_key_bytes=%u"},
225+
{ecryptfs_opt_unlink_sigs, "ecryptfs_unlink_sigs"},
225226
{ecryptfs_opt_err, NULL}
226227
};
227228

@@ -402,6 +403,9 @@ static int ecryptfs_parse_options(struct super_block *sb, char *options)
402403
fn_cipher_key_bytes;
403404
fn_cipher_key_bytes_set = 1;
404405
break;
406+
case ecryptfs_opt_unlink_sigs:
407+
mount_crypt_stat->flags |= ECRYPTFS_UNLINK_SIGS;
408+
break;
405409
case ecryptfs_opt_err:
406410
default:
407411
printk(KERN_WARNING

‎fs/ecryptfs/super.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,8 @@ static int ecryptfs_show_options(struct seq_file *m, struct vfsmount *mnt)
189189
seq_printf(m, ",ecryptfs_xattr_metadata");
190190
if (mount_crypt_stat->flags & ECRYPTFS_ENCRYPTED_VIEW_ENABLED)
191191
seq_printf(m, ",ecryptfs_encrypted_view");
192+
if (mount_crypt_stat->flags & ECRYPTFS_UNLINK_SIGS)
193+
seq_printf(m, ",ecryptfs_unlink_sigs");
192194

193195
return 0;
194196
}

0 commit comments

Comments
 (0)