[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150728095402.GE1612@nazgul.tnic>
Date: Tue, 28 Jul 2015 11:54:02 +0200
From: Borislav Petkov <bp@...en8.de>
To: Andy Lutomirski <luto@...nel.org>
Cc: X86 ML <x86@...nel.org>, linux-kernel@...r.kernel.org,
Brian Gerst <brgerst@...il.com>,
Steven Rostedt <rostedt@...dmis.org>, Willy Tarreau <w@....eu>,
Thomas Gleixner <tglx@...utronix.de>,
Peter Zijlstra <peterz@...radead.org>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH v2 3/3] x86/entry/64: Move #BP from IST to the IRQ stack
On Fri, Jul 24, 2015 at 10:57:06PM -0700, Andy Lutomirski wrote:
> There's nothing IST-worthy about #BP/int3. We don't allow kprobes
> in the small handful of places in the kernel that run at CPL0 with
> an invalid stack, and 32-bit kernels have used normal interrupt
> gates for #BP forever.
>
> Furthermore, we don't allow kprobes in places that have usergs while
> in kernel mode, so "paranoid" is also unnecessary.
>
> Signed-off-by: Andy Lutomirski <luto@...nel.org>
> ---
> arch/x86/entry/entry_64.S | 2 +-
> arch/x86/kernel/traps.c | 26 +++++++++++++-------------
> 2 files changed, 14 insertions(+), 14 deletions(-)
...
> @@ -494,7 +494,15 @@ dotraplinkage void notrace do_int3(struct pt_regs *regs, long error_code)
> if (poke_int3_handler(regs))
> return;
>
> + /*
> + * Use ist_enter despite the fact that we don't use an IST stack.
> + * We can be called from a kprobe in non-CONTEXT_KERNEL kernel
> + * mode or even during context tracking state changes.
> + *
> + * This means that we can't schedule. That's okay.
> + */
> ist_enter(regs);
Let's rename that thing. Call it atomic_ctxt_enter or whatever...
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
--
--
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