Rationale

Memory erasure on shutdown is currently buggy. Sdmem and linux memtest
implementation are failing. But a program exist that is actually dedicated at
memory testing, and that has thus access to most (if tot all) available memory:
memtest86+. This is a research using a modified
memtest86+ to erase memory.

Unfortunately, this is useless as when kexec launches memtest from Tails, the
video mode in not native and nothing is displayed.

Left to do

Actually halt the machine

Choose or write a quicker test

Disable keyboard shortcuts

Integreating into Tails

We patched tails experimental to kexec on our modified memtest86+ instead of on
linux on shutdown. The memtest binary built on Tails from upstream with our
patches applied is correctly recognised by kexec. Note that we didn't achive to
kexec on a memtest built on another OS.

We launched 4 fillram processes in parallel, whatching them with top and
waiting for them to be killed by oom killer. At least one terminated with
MemoryError. Fillram fills the RAM with the pattern wipe_didnt_work\n.

Then we dumped RAM with the following command in qemu console (CTRL+ALT+2). Note
that the end address must be adapted to the amount of RAM available in the VM:

pmemsave 0 0x80000000 before.dump

Then shutdown Tails pressing the red button, and once the machine halted, dump
the RAM again: