lkml.org 
[lkml]   [2018]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH v2 tip/master 0/3] kprobes/x86: retpoline: Fix kprobes for retpoline
Date
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>

\
 
 \ /
  Last update: 2018-01-18 17:15    [W:0.084 / U:0.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site