linux/include
Eric Biggers 4182a31c77 UPSTREAM: fscrypt: add FS_IOC_GET_ENCRYPTION_NONCE ioctl
Add an ioctl FS_IOC_GET_ENCRYPTION_NONCE which retrieves the nonce from
an encrypted file or directory.  The nonce is the 16-byte random value
stored in the inode's encryption xattr.  It is normally used together
with the master key to derive the inode's actual encryption key.

The nonces are needed by automated tests that verify the correctness of
the ciphertext on-disk.  Except for the IV_INO_LBLK_64 case, there's no
way to replicate a file's ciphertext without knowing that file's nonce.

The nonces aren't secret, and the existing ciphertext verification tests
in xfstests retrieve them from disk using debugfs or dump.f2fs.  But in
environments that lack these debugging tools, getting the nonces by
manually parsing the filesystem structure would be very hard.

To make this important type of testing much easier, let's just add an
ioctl that retrieves the nonce.

Link: https://lore.kernel.org/r/20200314205052.93294-2-ebiggers@kernel.org
Reviewed-by: Theodore Ts'o <tytso@mit.edu>
(cherry picked from commit e98ad46475)
Bug: 151100202
Change-Id: Ieef2c57b9257ae38eb2e5c1a018ca6f325bb62dd
Signed-off-by: Eric Biggers <ebiggers@google.com>
2020-04-01 09:48:10 -07:00
..
acpi ACPICA: Introduce ACPI_ACCESS_BYTE_WIDTH() macro 2020-03-05 16:42:17 +01:00
asm-generic This is the 4.19.68 stable release 2019-08-25 14:19:34 +02:00
clocksource
crypto UPSTREAM: crypto: skcipher - Introduce crypto_sync_skcipher 2020-03-12 10:46:18 -07:00
drm This is the 4.19.99 stable release 2020-01-27 15:55:44 +01:00
dt-bindings dt-bindings: reset: meson8b: fix duplicate reset IDs 2020-01-23 08:21:26 +01:00
keys
kvm KVM: arm/arm64: Sync ICH_VMCR_EL2 back when about to block 2019-08-25 10:47:59 +02:00
linux UPSTREAM: fscrypt: add FS_IOC_GET_ENCRYPTION_NONCE ioctl 2020-04-01 09:48:10 -07:00
math-emu math-emu/soft-fp.h: (_FP_ROUND_ZERO) cast 0 to void to fix warning 2019-12-13 08:51:34 +01:00
media media: v4l2-device.h: Explicitly compare grp{id,mask} to zero in v4l2_device macros 2020-02-24 08:34:41 +01:00
memory
misc
net UPSTREAM: ipv6: ndisc: add support for 'PREF64' dns64 prefix identifier 2020-03-31 08:40:11 +00:00
pcmcia
ras
rdma RDMA/uverbs: Verify MR access flags 2020-02-14 16:33:23 -05:00
scsi This is the 4.19.107 stable release 2020-03-03 07:33:01 +01:00
soc soc/tegra: pmc: Fix pad voltage configuration for Tegra186 2019-11-20 18:45:24 +01:00
sound ANDROID: GKI: sound: soc: Resolve ABI diff for struct snd_compr_stream 2020-03-23 12:21:04 -07:00
target
trace ANDROID: GKI: Add devm_thermal_of_virtual_sensor_register API. 2020-03-12 10:46:18 -07:00
uapi UPSTREAM: fscrypt: add FS_IOC_GET_ENCRYPTION_NONCE ioctl 2020-04-01 09:48:10 -07:00
video
xen