linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Michal Hocko <mhocko@suse.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>,
	"Guilherme G. Piccoli" <gpiccoli@canonical.com>,
	linux-mm@kvack.org, kernel-hardening@lists.openwall.com,
	linux-hardening@vger.kernel.org,
	linux-security-module@vger.kernel.org, kernel@gpiccoli.net,
	cascardo@canonical.com, Alexander Potapenko <glider@google.com>,
	James Morris <jamorris@linux.microsoft.com>,
	Kees Cook <keescook@chromium.org>
Subject: Re: [PATCH] mm, hugetlb: Avoid double clearing for hugetlb pages
Date: Fri, 23 Oct 2020 10:23:07 +0200	[thread overview]
Message-ID: <634a44b5-5947-df02-be63-a68f7b317949@redhat.com> (raw)
In-Reply-To: <20201022085557.GK23790@dhcp22.suse.cz>

On 22.10.20 10:55, Michal Hocko wrote:
> On Thu 22-10-20 10:04:50, David Hildenbrand wrote:
> [...]
>>> None of that would address the original point of this thread, the global
>>> init_on_alloc parameter.
>>
>> Yes, but I guess we're past that: whatever leaves the buddy shall be
>> zeroed out. That's the whole point of that security hardening mechanism.
> 
> Hugetlb can control its zeroying behavior via mount option (for
> MAP_HUGETLB controled by a command line parameter). If the page fault
> handler can recognize the pre-initialized pages then both init_on* can

Right, looking at init_on_alloc tells you if you have to zero after
alloc or if it's already been done even though you didn't pass GFP_ZERO.

-- 
Thanks,

David / dhildenb


  reply	other threads:[~2020-10-23  8:23 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-19 18:28 [PATCH] mm, hugetlb: Avoid double clearing for hugetlb pages Guilherme G. Piccoli
2020-10-20  8:20 ` Michal Hocko
2020-10-20 13:36   ` David Hildenbrand
2020-10-20 16:55   ` Mike Kravetz
2020-10-20 19:19   ` Guilherme G. Piccoli
2020-10-20 20:07     ` David Hildenbrand
2020-10-20 20:19       ` Guilherme Piccoli
2020-10-21  6:25         ` Michal Hocko
2020-10-20 20:28       ` David Hildenbrand
2020-10-21  6:15     ` Michal Hocko
2020-10-21  9:50       ` David Hildenbrand
2020-10-21 11:31         ` Michal Hocko
2020-10-21 23:32           ` Mike Kravetz
2020-10-22  8:04             ` David Hildenbrand
2020-10-22  8:55               ` Michal Hocko
2020-10-23  8:23                 ` David Hildenbrand [this message]
2020-11-05 19:37 ` Guilherme G. Piccoli

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=634a44b5-5947-df02-be63-a68f7b317949@redhat.com \
    --to=david@redhat.com \
    --cc=cascardo@canonical.com \
    --cc=glider@google.com \
    --cc=gpiccoli@canonical.com \
    --cc=jamorris@linux.microsoft.com \
    --cc=keescook@chromium.org \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=kernel@gpiccoli.net \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=mhocko@suse.com \
    --cc=mike.kravetz@oracle.com \
    /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;
as well as URLs for NNTP newsgroup(s).