From: Tycho Andersen <tycho@docker.com>
To: Laura Abbott <labbott@redhat.com>
Cc: linux-mm@kvack.org, Juerg Haefliger <juergh@gmail.com>,
kernel-hardening@lists.openwall.com
Subject: Re: [RFC v4 3/3] xpfo: add support for hugepages
Date: Mon, 12 Jun 2017 08:31:55 -0600 [thread overview]
Message-ID: <20170612143155.j6f63nijpij77a7t@smitten> (raw)
In-Reply-To: <d8d4070e-a97d-c431-74ad-5ba1a30b5e18@redhat.com>
Hi Laura,
Thanks for taking a look.
On Fri, Jun 09, 2017 at 05:23:06PM -0700, Laura Abbott wrote:
> > - set_pte_atomic(pte, pfn_pte(page_to_pfn(page), canon_pgprot(prot)));
> > +
> > + BUG_ON(!pte);
> > +
> > + switch (level) {
> > + case PG_LEVEL_4K:
> > + set_pte_atomic(pte, pfn_pte(page_to_pfn(page), canon_pgprot(prot)));
> > + break;
> > + case PG_LEVEL_2M:
> > + case PG_LEVEL_1G: {
> > + struct cpa_data cpa;
> > + int do_split;
> > +
> > + memset(&cpa, 0, sizeof(cpa));
> > + cpa.vaddr = kaddr;
> > + cpa.pages = &page;
> > + cpa.mask_set = prot;
> > + pgprot_val(cpa.mask_clr) = ~pgprot_val(prot);
> > + cpa.numpages = 1;
> > + cpa.flags = 0;
> > + cpa.curpage = 0;
> > + cpa.force_split = 0;
> > +
> > + do_split = try_preserve_large_page(pte, (unsigned long)kaddr, &cpa);
> > + if (do_split < 0)
>
> I can't reproduce the failure you describe in the cover letter but are you sure this
> check is correct?
The check seems to only happen when splitting up a large page,
indicating that...
> It looks like try_preserve_large_page can return 1 on failure
> and you still need to call split_large_page.
...yes, you're absolutely right. When I fix this, it now fails to
boot, stalling on unpacking the initramfs. So it seems something else
is wrong too.
Cheers,
Tycho
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2017-06-12 14:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-07 21:16 [RFC v4 0/3] Add support for eXclusive Page Frame Ownership Tycho Andersen
2017-06-07 21:16 ` [RFC v4 1/3] mm, x86: Add support for eXclusive Page Frame Ownership (XPFO) Tycho Andersen
2017-06-07 21:16 ` [RFC v4 2/3] lkdtm: Add tests for XPFO Tycho Andersen
2017-06-07 21:16 ` [RFC v4 3/3] xpfo: add support for hugepages Tycho Andersen
2017-06-10 0:23 ` Laura Abbott
2017-06-12 14:31 ` Tycho Andersen [this message]
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=20170612143155.j6f63nijpij77a7t@smitten \
--to=tycho@docker.com \
--cc=juergh@gmail.com \
--cc=kernel-hardening@lists.openwall.com \
--cc=labbott@redhat.com \
--cc=linux-mm@kvack.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