All of lore.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Masami Hiramatsu <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: tglx@linutronix.de, peterz@infradead.org,
	linux-kernel@vger.kernel.org, ak@linux.intel.com,
	ananth@linux.vnet.ibm.com, mhiramat@kernel.org, hpa@zytor.com,
	mingo@kernel.org, gregkh@linux-foundation.org,
	arjan@linux.intel.com, dwmw@amazon.co.uk
Subject: [tip:x86/pti] kprobes/x86: Blacklist indirect thunk functions for kprobes
Date: Fri, 19 Jan 2018 07:47:47 -0800	[thread overview]
Message-ID: <tip-c1804a236894ecc942da7dc6c5abe209e56cba93@git.kernel.org> (raw)
In-Reply-To: <151629209111.10241.5444852823378068683.stgit@devbox>

Commit-ID:  c1804a236894ecc942da7dc6c5abe209e56cba93
Gitweb:     https://git.kernel.org/tip/c1804a236894ecc942da7dc6c5abe209e56cba93
Author:     Masami Hiramatsu <mhiramat@kernel.org>
AuthorDate: Fri, 19 Jan 2018 01:14:51 +0900
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Fri, 19 Jan 2018 16:31:28 +0100

kprobes/x86: Blacklist indirect thunk functions for kprobes

Mark __x86_indirect_thunk_* functions as blacklist for kprobes
because those functions can be called from anywhere in the kernel
including blacklist functions of kprobes.

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: David Woodhouse <dwmw@amazon.co.uk>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linux-foundation.org>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/151629209111.10241.5444852823378068683.stgit@devbox

---
 arch/x86/lib/retpoline.S | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/x86/lib/retpoline.S b/arch/x86/lib/retpoline.S
index d3415dc..dfb2ba9 100644
--- a/arch/x86/lib/retpoline.S
+++ b/arch/x86/lib/retpoline.S
@@ -25,7 +25,8 @@ ENDPROC(__x86_indirect_thunk_\reg)
  * than one per register with the correct names. So we do it
  * the simple and nasty way...
  */
-#define EXPORT_THUNK(reg) EXPORT_SYMBOL(__x86_indirect_thunk_ ## reg)
+#define __EXPORT_THUNK(sym) _ASM_NOKPROBE(sym); EXPORT_SYMBOL(sym)
+#define EXPORT_THUNK(reg) __EXPORT_THUNK(__x86_indirect_thunk_ ## reg)
 #define GENERATE_THUNK(reg) THUNK reg ; EXPORT_THUNK(reg)
 
 GENERATE_THUNK(_ASM_AX)

  reply	other threads:[~2018-01-19 15:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-18 16:13 [PATCH v2 tip/master 0/3] kprobes/x86: retpoline: Fix kprobes for retpoline Masami Hiramatsu
2018-01-18 16:14 ` [PATCH v2 tip/master 1/3] retpoline: Introduce start/end markers of indirect thunk Masami Hiramatsu
2018-01-19 15:47   ` [tip:x86/pti] " tip-bot for Masami Hiramatsu
2018-01-18 16:14 ` [PATCH v2 tip/master 2/3] kprobes/x86: Blacklist indirect thunk functions for kprobes Masami Hiramatsu
2018-01-19 15:47   ` tip-bot for Masami Hiramatsu [this message]
2018-01-18 16:15 ` [PATCH v2 tip/master 3/3] kprobes/x86: Disable optimizing on the function jumps to indirect thunk Masami Hiramatsu
2018-01-19 15:48   ` [tip:x86/pti] " tip-bot for Masami Hiramatsu
2018-01-19  9:03 ` [PATCH v2 tip/master 0/3] kprobes/x86: retpoline: Fix kprobes for retpoline David Woodhouse
2018-01-19  9:03   ` David Woodhouse

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-c1804a236894ecc942da7dc6c5abe209e56cba93@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=ak@linux.intel.com \
    --cc=ananth@linux.vnet.ibm.com \
    --cc=arjan@linux.intel.com \
    --cc=dwmw@amazon.co.uk \
    --cc=gregkh@linux-foundation.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=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.