diff options
Diffstat (limited to 'arch/x86/include/asm/kprobes.h')
-rw-r--r-- | arch/x86/include/asm/kprobes.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/arch/x86/include/asm/kprobes.h b/arch/x86/include/asm/kprobes.h index 4421b5da409d..d1d1e5094c28 100644 --- a/arch/x86/include/asm/kprobes.h +++ b/arch/x86/include/asm/kprobes.h | |||
@@ -38,12 +38,11 @@ typedef u8 kprobe_opcode_t; | |||
38 | #define RELATIVECALL_OPCODE 0xe8 | 38 | #define RELATIVECALL_OPCODE 0xe8 |
39 | #define RELATIVE_ADDR_SIZE 4 | 39 | #define RELATIVE_ADDR_SIZE 4 |
40 | #define MAX_STACK_SIZE 64 | 40 | #define MAX_STACK_SIZE 64 |
41 | #define MIN_STACK_SIZE(ADDR) \ | 41 | #define CUR_STACK_SIZE(ADDR) \ |
42 | (((MAX_STACK_SIZE) < (((unsigned long)current_thread_info()) + \ | 42 | (current_top_of_stack() - (unsigned long)(ADDR)) |
43 | THREAD_SIZE - (unsigned long)(ADDR))) \ | 43 | #define MIN_STACK_SIZE(ADDR) \ |
44 | ? (MAX_STACK_SIZE) \ | 44 | (MAX_STACK_SIZE < CUR_STACK_SIZE(ADDR) ? \ |
45 | : (((unsigned long)current_thread_info()) + \ | 45 | MAX_STACK_SIZE : CUR_STACK_SIZE(ADDR)) |
46 | THREAD_SIZE - (unsigned long)(ADDR))) | ||
47 | 46 | ||
48 | #define flush_insn_slot(p) do { } while (0) | 47 | #define flush_insn_slot(p) do { } while (0) |
49 | 48 | ||