From: David Hildenbrand <david@redhat.com>
To: Danill Klimuk <daniil.klimuk@3mdeb.com>,
Christophe Leroy <christophe.leroy@csgroup.eu>,
linux-modules@vger.kernel.org,
"linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: Re: Question: a module for wiping userspace RAM before shutdown/reboot/halt
Date: Mon, 19 May 2025 09:43:05 +0200 [thread overview]
Message-ID: <95f07257-1ca6-4104-8389-fa8ce97bd239@redhat.com> (raw)
In-Reply-To: <e71bd62c-5ba7-4363-9af1-d9c9de394a54@3mdeb.com>
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
next prev parent reply other threads:[~2025-05-19 7:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bfe72929-ba4c-4732-9f80-25cc7b95a0c8@3mdeb.com>
2025-05-17 17:25 ` Question: a module for wiping userspace RAM before shutdown/reboot/halt Christophe Leroy
2025-05-19 7:26 ` Danill Klimuk
2025-05-19 7:43 ` David Hildenbrand [this message]
[not found] ` <eb88e58f-1515-4f51-8102-79cd3c20fea5@3mdeb.com>
2025-09-04 7:14 ` Christophe Leroy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=95f07257-1ca6-4104-8389-fa8ce97bd239@redhat.com \
--to=david@redhat.com \
--cc=christophe.leroy@csgroup.eu \
--cc=daniil.klimuk@3mdeb.com \
--cc=linux-mm@kvack.org \
--cc=linux-modules@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox