Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1711824

Re: [PATCH v5 02/10] mm, x86: Add support for eXclusive Page Frame Ownership (XPFO)

From Tycho Andersen <tycho@docker.com>
Newsgroups linux.kernel
Subject Re: [PATCH v5 02/10] mm, x86: Add support for eXclusive Page Frame Ownership (XPFO)
Date 2017-08-15 06:00 +0200
Message-ID <ueBbj-4zi-1@gated-at.bofh.it> (permalink)
References <ucFsJ-3Hw-3@gated-at.bofh.it> <ucFCq-3KK-23@gated-at.bofh.it> <uewbE-1sJ-21@gated-at.bofh.it> <ueB1F-4wb-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Aug 14, 2017 at 09:47:18PM -0600, Tycho Andersen wrote:
> I'll do that for the next version

Actually looking closer, I think we just need to mirror the
debug_pagealloc_enabled() checks in set_kpte() from
split_large_page(),

diff --git a/arch/x86/mm/xpfo.c b/arch/x86/mm/xpfo.c
index a1344f27406c..c962bd7f34cc 100644
--- a/arch/x86/mm/xpfo.c
+++ b/arch/x86/mm/xpfo.c
@@ -54,9 +54,11 @@ inline void set_kpte(void *kaddr, struct page *page, pgprot_t prot)
 
 		do_split = try_preserve_large_page(pte, (unsigned long)kaddr, &cpa);
 		if (do_split) {
-			spin_lock(&cpa_lock);
+			if (!debug_pagealloc_enabled())
+				spin_lock(&cpa_lock);
 			BUG_ON(split_large_page(&cpa, pte, (unsigned long)kaddr));
-			spin_unlock(&cpa_lock);
+			if (!debug_pagealloc_enabled())
+				spin_unlock(&cpa_lock);
 		}
 
 		break;


Tycho

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH v5 02/10] mm, x86: Add support for eXclusive Page Frame  Ownership (XPFO) Laura Abbott <labbott@redhat.com> - 2017-08-15 00:40 +0200
  Re: [PATCH v5 02/10] mm, x86: Add support for eXclusive Page Frame  Ownership (XPFO) Tycho Andersen <tycho@docker.com> - 2017-08-15 05:50 +0200
    Re: [PATCH v5 02/10] mm, x86: Add support for eXclusive Page Frame  Ownership (XPFO) Tycho Andersen <tycho@docker.com> - 2017-08-15 06:00 +0200

csiph-web