Ensure disk caches and aufs read-write branch are emptied during emergency shutdown
… so that they are overwritten by kernel memory poisoning. “Emergency” shutdown = when one unplugs the boot device.
This needs to be done in a way that’s as reliable as possible: in
particular, the storage medium may host the persistent filesystem. If
unmounting doesn’t work well enough (or just as an additional
safeguard), we should probably
echo 3 > /proc/sys/vm/drop_caches at
some point during the shutdown process.
Writing an automated test for the “Tails with persistent volume
unlocked” and “aufs read-write branch” usecases would help confirming
it actually works. It probably requires implementing a
/lib/systemd/system-shutdown/ hook that pauses for a while when
debug=wipemem is passed on the kernel command line, so that we can
dump memory after we’ve tried unmounting the filesystems.
Feature Branch: bugfix/12354-drop-kexec-memory-wipe
Parent Task: #12354 (closed)