Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 80050
b: refs/heads/master
c: e7b5e11
h: refs/heads/master
v: v3
  • Loading branch information
Harvey Harrison authored and Ingo Molnar committed Jan 30, 2008
1 parent 87cf5e9 commit 540b665
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ab4a574ef23cfa801a5078f7d7c2f2b76ecd6d91
refs/heads/master: e7b5e11eaaa8ef93a34e68016de51152d0d62911
14 changes: 6 additions & 8 deletions trunk/arch/x86/kernel/kprobes.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ struct kretprobe_blackpoint kretprobe_blacklist[] = {
const int kretprobe_blacklist_size = ARRAY_SIZE(kretprobe_blacklist);

/* Insert a jump instruction at address 'from', which jumps to address 'to'.*/
static __always_inline void set_jmp_op(void *from, void *to)
static void __kprobes set_jmp_op(void *from, void *to)
{
struct __arch_jmp_op {
char op;
Expand All @@ -174,7 +174,7 @@ static __always_inline void set_jmp_op(void *from, void *to)
* Returns non-zero if opcode is boostable.
* RIP relative instructions are adjusted at copying time in 64 bits mode
*/
static __always_inline int can_boost(kprobe_opcode_t *opcodes)
static int __kprobes can_boost(kprobe_opcode_t *opcodes)
{
kprobe_opcode_t opcode;
kprobe_opcode_t *orig_opcodes = opcodes;
Expand Down Expand Up @@ -392,13 +392,13 @@ static void __kprobes set_current_kprobe(struct kprobe *p, struct pt_regs *regs,
kcb->kprobe_saved_flags &= ~X86_EFLAGS_IF;
}

static __always_inline void clear_btf(void)
static void __kprobes clear_btf(void)
{
if (test_thread_flag(TIF_DEBUGCTLMSR))
wrmsr(MSR_IA32_DEBUGCTLMSR, 0, 0);
}

static __always_inline void restore_btf(void)
static void __kprobes restore_btf(void)
{
if (test_thread_flag(TIF_DEBUGCTLMSR))
wrmsr(MSR_IA32_DEBUGCTLMSR, current->thread.debugctlmsr, 0);
Expand All @@ -409,7 +409,7 @@ static void __kprobes prepare_singlestep(struct kprobe *p, struct pt_regs *regs)
clear_btf();
regs->flags |= X86_EFLAGS_TF;
regs->flags &= ~X86_EFLAGS_IF;
/*single step inline if the instruction is an int3*/
/* single step inline if the instruction is an int3 */
if (p->opcode == BREAKPOINT_INSTRUCTION)
regs->ip = (unsigned long)p->addr;
else
Expand Down Expand Up @@ -767,7 +767,7 @@ static void __kprobes resume_execution(struct kprobe *p,
case 0xe8: /* call relative - Fix return addr */
*tos = orig_ip + (*tos - copy_ip);
break;
#ifndef CONFIG_X86_64
#ifdef CONFIG_X86_32
case 0x9a: /* call absolute -- same as call absolute, indirect */
*tos = orig_ip + (*tos - copy_ip);
goto no_change;
Expand Down Expand Up @@ -813,8 +813,6 @@ static void __kprobes resume_execution(struct kprobe *p,

no_change:
restore_btf();

return;
}

/*
Expand Down

0 comments on commit 540b665

Please sign in to comment.