From: Josh Poimboeuf <jpoimboe@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
Andy Lutomirski <luto@kernel.org>, Ingo Molnar <mingo@kernel.org>,
Borislav Petkov <bp@alien8.de>, Brian Gerst <brgerst@gmail.com>,
Denys Vlasenko <dvlasenk@redhat.com>,
"H . Peter Anvin" <hpa@zytor.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Peter Zijlstra <peterz@infradead.org>,
Rik van Riel <riel@redhat.com>,
daniel.gruss@iaik.tugraz.at, hughd@google.com,
keescook@google.com, linux-mm@kvack.org,
michael.schwarz@iaik.tugraz.at, moritz.lipp@iaik.tugraz.at,
richard.fellner@student.tugraz.at
Subject: [PATCH 2/2] x86/mm/kaiser: Don't map the IRQ stack in user space
Date: Mon, 27 Nov 2017 22:10:13 -0600 [thread overview]
Message-ID: <17ffd1c6e87772d110f96f8ff6c8e74f681258c8.1511842148.git.jpoimboe@redhat.com> (raw)
In-Reply-To: <cover.1511842148.git.jpoimboe@redhat.com>
The '.data..percpu..first' section, which contains the IRQ software
stack, is included in the percpu user-mapped data area.
The IRQ stack is a software stack which is switched to *after* the CR3
switch, so it doesn't make sense to map it in user space.
Unmap it, and make sure the user-mapped area is page-aligned so it can
be mapped cleanly.
Fixes: 7d1b4c99a605 ("x86/mm/kaiser: Introduce user-mapped per-CPU areas")
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
---
include/asm-generic/vmlinux.lds.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 386f8846d9e9..45d2fbb081c6 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -826,9 +826,9 @@
*/
#define PERCPU_INPUT(cacheline) \
VMLINUX_SYMBOL(__per_cpu_start) = .; \
- VMLINUX_SYMBOL(__per_cpu_user_mapped_start) = .; \
*(.data..percpu..first) \
- . = ALIGN(cacheline); \
+ . = ALIGN(PAGE_SIZE); \
+ VMLINUX_SYMBOL(__per_cpu_user_mapped_start) = .; \
*(.data..percpu..user_mapped) \
*(.data..percpu..user_mapped..shared_aligned) \
VMLINUX_SYMBOL(__per_cpu_user_mapped_end) = .; \
--
2.13.6
--
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-11-28 4:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-28 4:10 [PATCH 0/2] x86/mm/kaiser: a couple of KAISER mapping fixes Josh Poimboeuf
2017-11-28 4:10 ` [PATCH 1/2] x86/mm/kaiser: Remove unused user-mapped page-aligned section Josh Poimboeuf
2017-11-28 9:20 ` Peter Zijlstra
2017-11-28 12:43 ` Peter Zijlstra
2017-11-28 4:10 ` Josh Poimboeuf [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=17ffd1c6e87772d110f96f8ff6c8e74f681258c8.1511842148.git.jpoimboe@redhat.com \
--to=jpoimboe@redhat.com \
--cc=bp@alien8.de \
--cc=brgerst@gmail.com \
--cc=daniel.gruss@iaik.tugraz.at \
--cc=dave.hansen@linux.intel.com \
--cc=dvlasenk@redhat.com \
--cc=hpa@zytor.com \
--cc=hughd@google.com \
--cc=keescook@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=luto@kernel.org \
--cc=michael.schwarz@iaik.tugraz.at \
--cc=mingo@kernel.org \
--cc=moritz.lipp@iaik.tugraz.at \
--cc=peterz@infradead.org \
--cc=richard.fellner@student.tugraz.at \
--cc=riel@redhat.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.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