Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 234515
b: refs/heads/master
c: 2a8247a
h: refs/heads/master
i:
  234513: 84a16ef
  234511: 565a53e
v: v3
  • Loading branch information
Jiri Olsa authored and Ingo Molnar committed Mar 8, 2011
1 parent 47c4996 commit 153ffe6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ea7145477a461e09d8d194cac4b996dc4f449107
refs/heads/master: 2a8247a2600c3e087a568fc68a6ec4eedac27ef1
8 changes: 8 additions & 0 deletions trunk/arch/x86/kernel/kprobes.c
Original file line number Diff line number Diff line change
Expand Up @@ -1276,6 +1276,14 @@ static int __kprobes can_optimize(unsigned long paddr)
if (!kallsyms_lookup_size_offset(paddr, &size, &offset))
return 0;

/*
* Do not optimize in the entry code due to the unstable
* stack handling.
*/
if ((paddr >= (unsigned long )__entry_text_start) &&
(paddr < (unsigned long )__entry_text_end))
return 0;

/* Check there is enough space for a relative jump. */
if (size - offset < RELATIVEJUMP_SIZE)
return 0;
Expand Down

0 comments on commit 153ffe6

Please sign in to comment.