From: Julian Stecklina <jsteckli@amazon.de>
To: kernel-hardening@lists.openwall.com
Cc: Julian Stecklina <jsteckli@amazon.de>,
Liran Alon <liran.alon@oracle.com>,
Tycho Andersen <tycho@tycho.ws>,
Jonathan Adams <jwadams@google.com>,
David Woodhouse <dwmw2@infradead.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: [RFC RESEND PATCH 3/6] mm, x86: make __kernel_map_pages always available
Date: Thu, 22 Nov 2018 17:49:36 +0100 [thread overview]
Message-ID: <0ba5f3c6d7fc0078d091c507cda980ef5cd710b2.1542905228.git.jsteckli@amazon.de> (raw)
In-Reply-To: <cover.1542905228.git.jsteckli@amazon.de>
In-Reply-To: <cover.1542905228.git.jsteckli@amazon.de>
__kernel_map_pages is currently only enabled when CONFIG_DEBUG_PAGEALLOC
is defined. Enable it unconditionally instead.
Signed-off-by: Julian Stecklina <jsteckli@amazon.de>
---
arch/x86/mm/pageattr.c | 3 +--
include/linux/mm.h | 3 ++-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
index 51a5a69ecac9..bd3b194400c1 100644
--- a/arch/x86/mm/pageattr.c
+++ b/arch/x86/mm/pageattr.c
@@ -2025,8 +2025,6 @@ int set_pages_rw(struct page *page, int numpages)
return set_memory_rw(addr, numpages);
}
-#ifdef CONFIG_DEBUG_PAGEALLOC
-
static int __set_pages_p(struct page *page, int numpages)
{
unsigned long tempaddr = (unsigned long) page_address(page);
@@ -2093,6 +2091,7 @@ void __kernel_map_pages(struct page *page, int numpages, int enable)
arch_flush_lazy_mmu_mode();
}
+#ifdef CONFIG_DEBUG_PAGEALLOC
#ifdef CONFIG_HIBERNATION
bool kernel_page_present(struct page *page)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index a61ebe8ad4ca..a0b9feefebb1 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -2589,9 +2589,10 @@ static inline void kernel_poison_pages(struct page *page, int numpages,
int enable) { }
#endif
+extern void __kernel_map_pages(struct page *page, int numpages, int enable);
+
#ifdef CONFIG_DEBUG_PAGEALLOC
extern bool _debug_pagealloc_enabled;
-extern void __kernel_map_pages(struct page *page, int numpages, int enable);
static inline bool debug_pagealloc_enabled(void)
{
--
2.17.1
next prev parent reply other threads:[~2018-11-22 16:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-22 16:49 [RFC RESEND PATCH 0/6] Process-local memory allocations Julian Stecklina
2018-11-22 16:49 ` [RFC RESEND PATCH 1/6] kvm, vmx: move CR2 context switch out of assembly path Julian Stecklina
2018-11-22 16:49 ` [RFC RESEND PATCH 2/6] kvm, vmx: move register clearing " Julian Stecklina
2018-11-22 16:49 ` Julian Stecklina [this message]
2018-11-22 16:49 ` [RFC RESEND PATCH 4/6] x86/speculation, mm: add process local virtual memory region Julian Stecklina
2018-11-22 16:49 ` [RFC RESEND PATCH 5/6] x86/speculation, kvm: move guest FPU state into process local memory Julian Stecklina
2018-11-22 16:49 ` [RFC RESEND PATCH 6/6] x86/speculation, kvm: move gprs to process local storage Julian Stecklina
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=0ba5f3c6d7fc0078d091c507cda980ef5cd710b2.1542905228.git.jsteckli@amazon.de \
--to=jsteckli@amazon.de \
--cc=dwmw2@infradead.org \
--cc=jwadams@google.com \
--cc=kernel-hardening@lists.openwall.com \
--cc=linux-kernel@vger.kernel.org \
--cc=liran.alon@oracle.com \
--cc=tycho@tycho.ws \
/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
all inboxes | Powered by JetHome®