[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <cover.1416604491.git.luto@amacapital.net>
Date: Fri, 21 Nov 2014 13:26:06 -0800
From: Andy Lutomirski <luto@...capital.net>
To: Borislav Petkov <bp@...en8.de>, x86@...nel.org,
Linus Torvalds <torvalds@...ux-foundation.org>
Cc: linux-kernel@...r.kernel.org,
Peter Zijlstra <peterz@...radead.org>,
Oleg Nesterov <oleg@...hat.com>,
Tony Luck <tony.luck@...el.com>,
Andi Kleen <andi@...stfloor.org>,
Andy Lutomirski <luto@...capital.net>
Subject: [PATCH v4 0/5] x86: Rework IST interrupts
Following Linus' feedback, this series has grown. When I say "IST
interrupt" below, I'm excluding NMIs. They are their own thing. This
patch does *not* change NMI handling.
This adds new functions ist_enter and ist_exit to handle entry to and
exit from ist handlers. This is, I think, a bugfix for RCU handling,
and I've cc'd some RCU people on that patch. It will also catch bugs
involving scheduling on the IST stack.
This series then changes the entry code to switch to the normal stack if
an IST interrupt came from userspace and wasn't a double-fault. This
simplifies the exit logic.
Building on that, I add new functions ist_begin_non_atomic and
ist_end_non_atomic. They next inside ist_enter and ist_exit, and they
allow scheduling if the right conditions are met and they BUG if not.
They're meant to be used in do_machine_check to handle userspace memory
failures.
NB: Tony has seen odd behavior when stress-testing injected machine
checks with earlier versions of this series applied. I suspect that
it's a bug in something else, possibly his BIOS. Bugs in this series
shouldn't be ruled out, though.
Changes from v3:
- Reworked everything except the asm.
Changes from v2:
- double_fault is no longer affected.
- Other changes, but those are obsolete now.
Changes from RFC/v1: I forgot. Sorry.
Andy Lutomirski (5):
uprobes, x86: Fix _TIF_UPROBE vs _TIF_NOTIFY_RESUME
x86, traps: Track entry into and exit from IST context
x86, entry: Switch stacks on a paranoid entry from userspace
x86: Clean up current_stack_pointer
x86, traps: Add ist_begin_non_atomic and ist_end_non_atomic
Documentation/x86/entry_64.txt | 18 ++++--
Documentation/x86/x86_64/kernel-stacks | 8 ++-
arch/x86/include/asm/thread_info.h | 13 +++-
arch/x86/include/asm/traps.h | 6 ++
arch/x86/kernel/cpu/mcheck/mce.c | 5 ++
arch/x86/kernel/cpu/mcheck/p5.c | 6 ++
arch/x86/kernel/cpu/mcheck/winchip.c | 5 ++
arch/x86/kernel/entry_64.S | 86 ++++++++++++++------------
arch/x86/kernel/irq_32.c | 13 +---
arch/x86/kernel/traps.c | 110 +++++++++++++++++++++++++--------
kernel/events/uprobes.c | 1 -
11 files changed, 183 insertions(+), 88 deletions(-)
--
1.9.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists