All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 tip/master 0/3] kprobes/x86: retpoline: Fix kprobes for retpoline
@ 2018-01-18 16:13 Masami Hiramatsu
  2018-01-18 16:14 ` [PATCH v2 tip/master 1/3] retpoline: Introduce start/end markers of indirect thunk Masami Hiramatsu
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Masami Hiramatsu @ 2018-01-18 16:13 UTC (permalink / raw)
  To: Ingo Molnar, David Woodhouse
  Cc: Masami Hiramatsu, linux-kernel, Andi Kleen, Greg Kroah-Hartman,
	Arjan van de Ven, Peter Zijlstra, Ananth N Mavinakayanahalli,
	Thomas Gleixner, H . Peter Anvin

Hi,

This is the 2nd version of the series to fix kprobes issues
on the kernel with CONFIG_RETPOLINE=y.

- [1/3]: This introduces __x86_indirect_thunk_* boundary
	 symbols so that kprobes easily identify those functions.
- [2/3]: Mark __x86_indirect_thunk_* as blacklisted function
	 for kprobes, since it can be called from other
	 blacklisted functions.
- [3/3]: Check jmp instructions in the probe target function
	 whether it jumps into the __x86_indirect_thunk_*,
	 because it is equal to an indirect jump instruction.

In this version, just [1/3] has been changed according to
David Woodhouse's comment.

 [1/3]: Consolidate .text.__x86.indirect_thunk.* sections
       to .text.__x86.indirect_thunk section.

Thank you,

---

Masami Hiramatsu (3):
      retpoline: Introduce start/end markers of indirect thunk
      kprobes/x86: Blacklist indirect thunk functions for kprobes
      kprobes/x86: Disable optimizing on the function jumps to indirect thunk


 arch/x86/include/asm/nospec-branch.h |    3 +++
 arch/x86/kernel/kprobes/opt.c        |   23 ++++++++++++++++++++++-
 arch/x86/kernel/vmlinux.lds.S        |    6 ++++++
 arch/x86/lib/retpoline.S             |    5 +++--
 4 files changed, 34 insertions(+), 3 deletions(-)

--
Masami Hiramatsu (Linaro) <mhiramat@kernel.org>

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-01-19 15:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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:x86/pti] " tip-bot for Masami Hiramatsu
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

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.