On 19.05.25 09:26, Danill Klimuk wrote:
Hi Christophe, thank you for the answer.
> What do you mean by 'wiping', do you mean 'clearing' ?
Yes, by 'wiping' I mean 'clearing'.
> Can you explain the reason this is needed?
Some of our clients want to clear user space RAM during
shutdown/reboot/halt sequences of Linux kernel, so the process data or
any other leftovers do not leak outside current Linux kernel session
(that is to firmware, or the next boot software, etc.). The reason for
it to be a module that will execute in a specific moment of the
sequences is to make it more predictable.
I thought that if the clients want to use it, maybe it will be useful
for others too :).
We do have the init_on_free=1 boot option, whereby any pages freed back
to the page allocator will get immediately zeroed.
This also makes sure that if you quit a process and then
shutdown/reboot, that the page content was already cleared. (otherwise,
it would simply be free memory in the allocator and no longer "userspace
RAM")
--
Cheers,
David / dhildenb