Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dcd37f95 authored by Eric Biggers's avatar Eric Biggers
Browse files

FROMLIST: ubifs: wire up FS_IOC_GET_ENCRYPTION_NONCE

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

Bug: 151100202
Link: https://lore.kernel.org/r/20200314205052.93294-5-ebiggers@kernel.org


Change-Id: I8f15e873b41e036bc039119a579beac1b78f937b
Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
parent 7d7ab391
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -201,6 +201,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;
	}
@@ -223,6 +226,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;