aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/kernel/ftrace-entry.S
diff options
context:
space:
mode:
authorAndy Lutomirski <luto@kernel.org>2016-08-11 02:35:23 -0700
committerIngo Molnar <mingo@kernel.org>2016-08-24 12:11:42 +0200
commite37e43a497d5a8b7c0cc1736d56986f432c394c9 (patch)
treebd6a1682666510271a53ebd21dc6de5e13548aac /arch/blackfin/kernel/ftrace-entry.S
parentdma-api: Teach the "DMA-from-stack" check about vmapped stacks (diff)
downloadlinux-dev-e37e43a497d5a8b7c0cc1736d56986f432c394c9.tar.xz
linux-dev-e37e43a497d5a8b7c0cc1736d56986f432c394c9.zip
x86/mm/64: Enable vmapped stacks (CONFIG_HAVE_ARCH_VMAP_STACK=y)
This allows x86_64 kernels to enable vmapped stacks by setting HAVE_ARCH_VMAP_STACK=y - which enables the CONFIG_VMAP_STACK=y high level Kconfig option. There are a couple of interesting bits: First, x86 lazily faults in top-level paging entries for the vmalloc area. This won't work if we get a page fault while trying to access the stack: the CPU will promote it to a double-fault and we'll die. To avoid this problem, probe the new stack when switching stacks and forcibly populate the pgd entry for the stack when switching mms. Second, once we have guard pages around the stack, we'll want to detect and handle stack overflow. I didn't enable it on x86_32. We'd need to rework the double-fault code a bit and I'm concerned about running out of vmalloc virtual addresses under some workloads. This patch, by itself, will behave somewhat erratically when the stack overflows while RSP is still more than a few tens of bytes above the bottom of the stack. Specifically, we'll get #PF and make it to no_context and them oops without reliably triggering a double-fault, and no_context doesn't know about stack overflows. The next patch will improve that case. Thank you to Nadav and Brian for helping me pay enough attention to the SDM to hopefully get this right. Signed-off-by: Andy Lutomirski <luto@kernel.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Nadav Amit <nadav.amit@gmail.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/c88f3e2920b18e6cc621d772a04a62c06869037e.1470907718.git.luto@kernel.org [ Minor edits. ] Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions