mirror of
https://github.com/adulau/aha.git
synced 2024-12-30 20:56:23 +00:00
prevent boosting kprobes on exception address
Don't boost at the addresses which are listed on exception tables, because major page fault will occur on those addresses. In that case, kprobes can not ensure that when instruction buffer can be freed since some processes will sleep on the buffer. kprobes-ia64 already has same check. Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com> Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
18439c39e8
commit
30390880de
1 changed files with 3 additions and 0 deletions
|
@ -193,6 +193,9 @@ static int __kprobes can_boost(kprobe_opcode_t *opcodes)
|
||||||
kprobe_opcode_t opcode;
|
kprobe_opcode_t opcode;
|
||||||
kprobe_opcode_t *orig_opcodes = opcodes;
|
kprobe_opcode_t *orig_opcodes = opcodes;
|
||||||
|
|
||||||
|
if (search_exception_tables(opcodes))
|
||||||
|
return 0; /* Page fault may occur on this address. */
|
||||||
|
|
||||||
retry:
|
retry:
|
||||||
if (opcodes - orig_opcodes > MAX_INSN_SIZE - 1)
|
if (opcodes - orig_opcodes > MAX_INSN_SIZE - 1)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue