From: David Hildenbrand <david@redhat.com>
To: Michal Hocko <mhocko@suse.com>, CGEL <cgel.zte@gmail.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, vbabka@suse.cz,
minchan@kernel.org, oleksandr@redhat.com,
xu xin <xu.xin16@zte.com.cn>, Jann Horn <jannh@google.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH linux-next] mm/madvise: allow KSM hints for process_madvise
Date: Mon, 4 Jul 2022 11:35:33 +0200 [thread overview]
Message-ID: <777bf32f-4657-d590-ce1d-55b65980f0e4@redhat.com> (raw)
In-Reply-To: <YsKnZ++HZcOPOhCS@dhcp22.suse.cz>
On 04.07.22 10:40, Michal Hocko wrote:
> On Mon 04-07-22 07:29:41, CGEL wrote:
> [...]
>> Maybe new semantics is needed similarly to MADV_NOHUGEPAGE that ensures that
>> there will *not* be huge pages.
>
> How do you achieve that with a backward compatibility?
Some apps mark secrets via mlock(). I did not check, but I assume
mlock()'ed pages (in VMAs) would not be applicable to KSM. If they would
be, one option would be to not deduplicate them.
But then, I have no clue what's exploitable via a side channel and
what's not. Eventually, having a proper fix for most side channels would
make KSM safer to use in the the general case. But then, who knows what
security researchers will be able to come up with ...
As a very minimum, there would have to be some kind of toggle to allow
forcing KSM on other applications at all. Either/o a compile-time and a
run-time option. Once most of the known side channels are fixed we could
adjust the default of the run-time option.
(I think to this day, Windows still disables system-wide deduplication
as a default and requires an admin to explicitly enable it)
--
Thanks,
David / dhildenb
next prev parent reply other threads:[~2022-07-04 9:52 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-01 8:43 cgel.zte
2022-07-01 9:11 ` Michal Hocko
2022-07-01 10:32 ` David Hildenbrand
2022-07-01 10:50 ` David Hildenbrand
2022-07-01 12:02 ` Michal Hocko
2022-07-01 12:09 ` David Hildenbrand
2022-07-01 12:36 ` Michal Hocko
2022-07-01 12:39 ` David Hildenbrand
2022-07-01 13:19 ` Michal Hocko
2022-07-01 19:12 ` David Hildenbrand
2022-07-04 6:48 ` Michal Hocko
2022-07-04 7:29 ` CGEL
2022-07-04 8:40 ` Michal Hocko
2022-07-04 9:35 ` David Hildenbrand [this message]
2022-07-04 8:13 ` CGEL
2022-07-04 9:30 ` David Hildenbrand
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=777bf32f-4657-d590-ce1d-55b65980f0e4@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=cgel.zte@gmail.com \
--cc=jannh@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=minchan@kernel.org \
--cc=oleksandr@redhat.com \
--cc=vbabka@suse.cz \
--cc=xu.xin16@zte.com.cn \
/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