[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <158991829872.17951.14197480828804200628.tip-bot2@tip-bot2>
Date: Tue, 19 May 2020 19:58:18 -0000
From: "tip-bot2 for Thomas Gleixner" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Thomas Gleixner <tglx@...utronix.de>,
Alexandre Chartre <alexandre.chartre@...cle.com>,
Peter Zijlstra <peterz@...radead.org>,
Andy Lutomirski <luto@...nel.org>, x86 <x86@...nel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: [tip: x86/entry] x86/traps: Address objtool noinstr complaints in #DB
The following commit has been merged into the x86/entry branch of tip:
Commit-ID: 467a8425d10508886eb5bcc0b80e0c73da4751c4
Gitweb: https://git.kernel.org/tip/467a8425d10508886eb5bcc0b80e0c73da4751c4
Author: Thomas Gleixner <tglx@...utronix.de>
AuthorDate: Thu, 30 Apr 2020 11:07:20 +02:00
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitterDate: Tue, 19 May 2020 16:04:13 +02:00
x86/traps: Address objtool noinstr complaints in #DB
The functions invoked from handle_debug() can be instrumented. Tell objtool
about it.
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Reviewed-by: Alexandre Chartre <alexandre.chartre@...cle.com>
Acked-by: Peter Zijlstra <peterz@...radead.org>
Acked-by: Andy Lutomirski <luto@...nel.org>
Link: https://lkml.kernel.org/r/20200505135315.380927730@linutronix.de
---
arch/x86/kernel/traps.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index b62e962..41bb0cb 100644
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -784,14 +784,19 @@ static void noinstr handle_debug(struct pt_regs *regs, unsigned long dr6,
/* Store the virtualized DR6 value */
tsk->thread.debugreg6 = dr6;
+ instrumentation_begin();
#ifdef CONFIG_KPROBES
- if (kprobe_debug_handler(regs))
+ if (kprobe_debug_handler(regs)) {
+ instrumentation_end();
return;
+ }
#endif
if (notify_die(DIE_DEBUG, "debug", regs, (long)&dr6, 0,
- SIGTRAP) == NOTIFY_STOP)
+ SIGTRAP) == NOTIFY_STOP) {
+ instrumentation_end();
return;
+ }
/*
* Let others (NMI) know that the debug stack is in use
@@ -827,6 +832,7 @@ static void noinstr handle_debug(struct pt_regs *regs, unsigned long dr6,
out:
cond_local_irq_disable(regs);
debug_stack_usage_dec();
+ instrumentation_end();
}
static __always_inline void exc_debug_kernel(struct pt_regs *regs,
Powered by blists - more mailing lists