android_kernel_motorola_sm6225/Documentation
Eric Biggers b29462c31f 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>
Bug: 151100202
Change-Id: Ieef2c57b9257ae38eb2e5c1a018ca6f325bb62dd
Signed-off-by: Eric Biggers <ebiggers@google.com>
Git-commit: e98ad464750c0894bc560d10503dae8ff90ccdac
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[neersoni@codeaurora.org: Back port the changes]
Signed-off-by: Neeraj Soni <neersoni@codeaurora.org>
2020-07-08 22:40:37 +05:30
..
ABI Merge wakeup_source changes into msm-4.19 2020-05-23 05:22:24 -07:00
accelerators
accounting FROMLIST: psi: introduce psi monitor 2019-03-22 23:07:14 +00:00
acpi
admin-guide Merge android-4.19.110 (1984fff) into msm-4.19 2020-05-23 05:08:22 -07:00
aoe
arm msm: rdbg: Add snapshot of remote debugger driver 2019-06-08 10:30:42 +05:30
arm64 Merge android-4.19.110 (1984fff) into msm-4.19 2020-05-23 05:08:22 -07:00
auxdisplay
backlight
block File and metadata encryption changes from android-4.19.96-107 2020-04-21 06:19:04 -07:00
blockdev zram: make deduplication feature optional 2019-08-01 22:24:02 -07:00
bpf
bus-devices
cdrom
cgroup-v1
cma
connector
console
core-api
cpu-freq
cpuidle
crypto Revert existing FBE changes for ICE FBE 2020-04-24 15:19:09 -07:00
dev-tools UPSTREAM: kcov: fix struct layout for kcov_remote_arg 2020-01-15 14:52:07 +00:00
device-mapper Merge android-4.19.32 (6f994bf) into msm-4.19 2019-05-09 00:12:14 -07:00
devicetree Revert "UPSTREAM: dt-bindings: arm: coresight: Add support for coresight-loses-context-with-cpu" 2020-03-23 03:28:54 -07:00
doc-guide
driver-api Merge android-4.19.95 (5da1114) into msm-4.19 2020-03-27 10:48:20 -07:00
driver-model FROMGIT: docs: driver-model: Add documentation for sync_state 2019-10-24 14:23:14 -07:00
early-userspace
EDID
extcon
fault-injection
fb
features
filesystems fscrypt: add FS_IOC_GET_ENCRYPTION_NONCE ioctl 2020-07-08 22:40:37 +05:30
firmware_class
fmc
fpga
gpio
gpu
hid HID: doc: fix wrong data structure reference for UHID_OUTPUT 2019-12-05 09:20:36 +01:00
hwmon
i2c i2c: i801: Add support for Intel Comet Lake 2019-05-04 09:20:15 +02:00
ia64
ide
iio
infiniband
input
ioctl
isdn
kbuild
kdump
kernel-hacking
laptops
leds
lightnvm
livepatch
locking
m68k
maintainer
md
media
memory-devices
mic
mips
misc-devices
mmc Revert "mmc: driver's changes from kernel msm-4.14 to msm-4.19" 2019-05-13 13:12:22 +05:30
mtd
namespaces
netlabel
networking Merge android-4.19.110 (1984fff) into msm-4.19 2020-05-23 05:08:22 -07:00
nfc
nios2
nvdimm
nvmem
openrisc
parisc
PCI
pcmcia
perf perf: add qcom l2 cache perf events driver 2019-12-26 12:45:54 +05:30
phy
platform
power Merge android-4.19.28 (34e9e65) into msm-4.19 2019-03-21 01:48:12 -07:00
powerpc
pps
process stable-kernel-rules.rst: add link to networking patch queue 2019-03-23 20:10:10 +01:00
pti
ptp
rapidio
RCU
riscv
s390
scheduler ANDROID: sched/tune: Move SchedTune cpu API into UtilClamp wrappers 2020-02-01 15:03:17 +00:00
scsi
security
serial
sh
sound
sparc
sphinx doc: Cope with Sphinx logging deprecations 2019-06-09 09:17:21 +02:00
sphinx-static
spi
sysctl Restore "ANDROID: security,perf: Allow further restriction of perf_event_open" 2020-06-01 03:37:43 -07:00
target
thermal
timers
trace
translations
usb USB: rio500: Remove Rio 500 kernel driver 2019-10-17 13:44:47 -07:00
userspace-api Documentation: Add section about CPU vulnerabilities for Spectre 2019-07-14 08:11:17 +02:00
virtual kvm: Convert kvm_lock to a mutex 2019-11-12 19:21:40 +01:00
vm
w1
watchdog
wimax
x86 x86/speculation/taa: Add documentation for TSX Async Abort 2019-11-12 19:21:34 +01:00
xtensa
.gitignore
00-INDEX
atomic_bitops.txt
atomic_t.txt x86/atomic: Fix smp_mb__{before,after}_atomic() 2019-07-26 09:14:08 +02:00
bt8xxgpio.txt
btmrvl.txt
bus-virt-phys-mapping.txt
Changes
clearing-warn-once.txt
CodingStyle
conf.py docs: Fix conf.py for Sphinx 2.0 2019-06-09 09:17:20 +02:00
cpu-load.txt
cputopology.txt
crc32.txt
dcdbas.txt
debugging-modules.txt
debugging-via-ohci1394.txt
dell_rbu.txt
digsig.txt
DMA-API-HOWTO.txt
DMA-API.txt
DMA-attributes.txt
DMA-ISA-LPC.txt
docutils.conf
dontdiff unicode: refactor the rule for regenerating utf8data.h 2019-09-23 13:23:29 -07:00
efi-stub.txt
eisa.txt
flexible-arrays.txt
futex-requeue-pi.txt
gcc-plugins.txt
highuid.txt
hw_random.txt
hwspinlock.txt
index.rst x86/speculation/mds: Add mds_clear_cpu_buffers() 2019-05-14 19:17:54 +02:00
Intel-IOMMU.txt
intel_txt.txt
io-mapping.txt
io_ordering.txt
iostats.txt
IPMI.txt
IRQ-affinity.txt
IRQ-domain.txt
IRQ.txt
irqflags-tracing.txt
isa.txt
isapnp.txt
kernel-per-CPU-kthreads.txt
kobject.txt
kprobes.txt
kref.txt
ldm.txt
lockup-watchdogs.txt
logo.gif
logo.txt
lsm.txt
lzo.txt
mailbox.txt
Makefile
memory-barriers.txt
memory-hotplug.txt
men-chameleon-bus.txt
mhi.txt
nommu-mmap.txt
ntb.txt
numastat.txt
padata.txt
parport-lowlevel.txt
percpu-rw-semaphore.txt
phy.txt
pi-futex.txt
pnp.txt
preempt-locking.txt
pwm.txt
rbtree.txt
remoteproc.txt
rfkill.txt
robust-futex-ABI.txt
robust-futexes.txt futex: Update comments and docs about return values of arch futex code 2019-07-03 13:14:49 +02:00
rpmsg.txt
rtc.txt
SAK.txt
sgi-ioc4.txt
siphash.txt
SM501.txt
smsc_ece1099.txt
speculation.txt
static-keys.txt
SubmittingPatches
svga.txt
switchtec.txt
sync_file.txt
tee.txt
this_cpu_ops.txt
unaligned-memory-access.txt
vfio-mediated-device.txt
vfio.txt
video-output.txt
xillybus.txt
xz.txt
zorro.txt