public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Masami Hiramatsu <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: mhiramat@kernel.org, rostedt@goodmis.org,
	ananth@linux.vnet.ibm.com, mingo@kernel.org,
	torvalds@linux-foundation.org, linux-kernel@vger.kernel.org,
	ast@kernel.org, ast@fb.com, paulmck@linux.vnet.ibm.com,
	hpa@zytor.com, tglx@linutronix.de, peterz@infradead.org
Subject: [tip:x86/urgent] kprobes/x86: Remove IRQ disabling from jprobe handlers
Date: Tue, 3 Oct 2017 10:43:08 -0700	[thread overview]
Message-ID: <tip-b664d57f39d01e775204d4f1a7e2f8bda77bc549@git.kernel.org> (raw)
In-Reply-To: <150701508194.32266.14458959863314097305.stgit@devbox>

Commit-ID:  b664d57f39d01e775204d4f1a7e2f8bda77bc549
Gitweb:     https://git.kernel.org/tip/b664d57f39d01e775204d4f1a7e2f8bda77bc549
Author:     Masami Hiramatsu <mhiramat@kernel.org>
AuthorDate: Tue, 3 Oct 2017 16:18:02 +0900
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 3 Oct 2017 19:11:48 +0200

kprobes/x86: Remove IRQ disabling from jprobe handlers

Jprobes actually don't need to disable IRQs while calling
handlers, because of how we specify the kernel interface in
Documentation/kprobes.txt:

-----
 Probe handlers are run with preemption disabled.  Depending on the
 architecture and optimization state, handlers may also run with
 interrupts disabled (e.g., kretprobe handlers and optimized kprobe
 handlers run without interrupt disabled on x86/x86-64).
-----

So let's remove IRQ disabling from jprobes too.

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Alexei Starovoitov <ast@fb.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul E . McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/150701508194.32266.14458959863314097305.stgit@devbox
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/kernel/kprobes/core.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/x86/kernel/kprobes/core.c b/arch/x86/kernel/kprobes/core.c
index f015371..0742491 100644
--- a/arch/x86/kernel/kprobes/core.c
+++ b/arch/x86/kernel/kprobes/core.c
@@ -1080,8 +1080,6 @@ int setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs)
 	 * raw stack chunk with redzones:
 	 */
 	__memcpy(kcb->jprobes_stack, (kprobe_opcode_t *)addr, MIN_STACK_SIZE(addr));
-	regs->flags &= ~X86_EFLAGS_IF;
-	trace_hardirqs_off();
 	regs->ip = (unsigned long)(jp->entry);
 
 	/*

      parent reply	other threads:[~2017-10-03 17:46 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-30 23:12 [kprobes/x86] a19b2e3d78: WARNING:at_kernel/locking/lockdep.c:#trace_hardirqs_off_caller kernel test robot
2017-10-02  7:33 ` Peter Zijlstra
2017-10-02 15:46   ` Masami Hiramatsu
2017-10-02 16:05     ` Peter Zijlstra
2017-10-03  1:10       ` Masami Hiramatsu
2017-10-02 16:19     ` Linus Torvalds
2017-10-03  2:26       ` Masami Hiramatsu
2017-10-03  7:18 ` [BUGFIX PATCH] kprobes/x86: Remove IRQ disabling from jprobe handlers Masami Hiramatsu
2017-10-03  9:33   ` Ingo Molnar
2017-10-03 15:24     ` Masami Hiramatsu
2017-10-03 17:11       ` Ingo Molnar
2017-10-04  6:18         ` Masami Hiramatsu
2017-10-04 10:41           ` Ingo Molnar
2017-10-04 14:08             ` Masami Hiramatsu
2017-10-05  7:57               ` Ingo Molnar
2017-10-05  8:28                 ` Masami Hiramatsu
2017-10-03 17:43   ` tip-bot for Masami Hiramatsu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-b664d57f39d01e775204d4f1a7e2f8bda77bc549@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=ananth@linux.vnet.ibm.com \
    --cc=ast@fb.com \
    --cc=ast@kernel.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=mingo@kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox