Le 15/05/2025 à 15:30, Danill Klimuk a écrit :

Hello everyone. I have received a request to write a Linux kernel module
that will wipe any processes leftovers from userspace RAM during/before
Linux kernel shutdown/reboot/halt sequences. The reason I am going to do
it inside a module is to do it in a more deterministic way that does not
depend on any processes. AFAIK Linux kernel does not have any other
functionalities to wipe leftovers from RAM apart from the command line
arguments "init_on_free" and "init_on_alloc" that results in memory
poisoning only during memory allocation and memory deallocation. These
arguments cause the kernel to clean processes memory several times
during runtime, that is not deterministic because of processes
non-deterministic behavior. Hence, I want to bring the memory wiping
mechanism in one place and make it more deterministic. The question is:

Maybe the Linux kernel already have such functionalities implemented?

Linux memory management topics should be sent to linux...@kvack.org


Currently I am planning to implement the wiping process to be triggered
by "reboot_notifier_callback", so to wipe RAM after PID 1 process
finishes and no other processes are executing. I am looking forward to
merging the module into Linux kernel upstream too.

What do you mean by 'wiping', do you mean 'clearing' ?

Can you explain the reason this is needed ?

Christophe


Reply via email to