Thread (9 messages) 9 messages, 2 authors, 2020-03-22
STALE2290d LANDED

[PATCH 4/4] ubifs: wire up FS_IOC_GET_ENCRYPTION_NONCE

From: Eric Biggers <ebiggers@kernel.org>
Date: 2020-03-15 01:39:14
Also in: linux-api, linux-f2fs-devel, linux-fscrypt, linux-fsdevel
Subsystem: filesystems (vfs and infrastructure), the rest, ubi file system (ubifs) · Maintainers: Alexander Viro, Christian Brauner, Linus Torvalds, Richard Weinberger

From: Eric Biggers <redacted>

This new ioctl retrieves a file's encryption nonce, which is useful for
testing.  See the corresponding fs/crypto/ patch for more details.

Signed-off-by: Eric Biggers <redacted>
---
 fs/ubifs/ioctl.c | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/fs/ubifs/ioctl.c b/fs/ubifs/ioctl.c
index d49fc04f2d7d4..3df9be2c684c3 100644
--- a/fs/ubifs/ioctl.c
+++ b/fs/ubifs/ioctl.c
@@ -208,6 +208,9 @@ long ubifs_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 	case FS_IOC_GET_ENCRYPTION_KEY_STATUS:
 		return fscrypt_ioctl_get_key_status(file, (void __user *)arg);
 
+	case FS_IOC_GET_ENCRYPTION_NONCE:
+		return fscrypt_ioctl_get_nonce(file, (void __user *)arg);
+
 	default:
 		return -ENOTTY;
 	}
@@ -230,6 +233,7 @@ long ubifs_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 	case FS_IOC_REMOVE_ENCRYPTION_KEY:
 	case FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS:
 	case FS_IOC_GET_ENCRYPTION_KEY_STATUS:
+	case FS_IOC_GET_ENCRYPTION_NONCE:
 		break;
 	default:
 		return -ENOIOCTLCMD;
-- 
2.25.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help