diff options
author | Andi Kleen <ak@suse.de> | 2009-07-03 13:44:10 (GMT) |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2014-05-14 18:38:35 (GMT) |
commit | 3fbc61d8a2d6e81426de543dc21ec754ecd420d1 (patch) | |
tree | d90c7d2659b01e9e41634167a616e2b0023ba934 /kernel/time/timekeeping_internal.h | |
parent | bb8e42ea09b38f270acfd3588152874392dacbd6 (diff) | |
download | linux-fsl-qoriq-3fbc61d8a2d6e81426de543dc21ec754ecd420d1.tar.xz |
x86: Disable IST stacks for debug/int 3/stack fault for PREEMPT_RT
Normally the x86-64 trap handlers for debug/int 3/stack fault run
on a special interrupt stack to make them more robust
when dealing with kernel code.
The PREEMPT_RT kernel can sleep in locks even while allocating
GFP_ATOMIC memory. When one of these trap handlers needs to send
real time signals for ptrace it allocates memory and could then
try to to schedule. But it is not allowed to schedule on a
IST stack. This can cause warnings and hangs.
This patch disables the IST stacks for these handlers for PREEMPT_RT
kernel. Instead let them run on the normal process stack.
The kernel only really needs the ISTs here to make kernel debuggers more
robust in case someone sets a break point somewhere where the stack is
invalid. But there are no kernel debuggers in the standard kernel
that do this.
It also means kprobes cannot be set in situations with invalid stack;
but that sounds like a reasonable restriction.
The stack fault change could minimally impact oops quality, but not very
much because stack faults are fairly rare.
A better solution would be to use similar logic as the NMI "paranoid"
path: check if signal is for user space, if yes go back to entry.S, switch stack,
call sync_regs, then do the signal sending etc.
But this patch is much simpler and should work too with minimal impact.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/time/timekeeping_internal.h')
0 files changed, 0 insertions, 0 deletions