diff --git a/[refs] b/[refs] index 6d762c5edf80..e0286efb67fc 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 02d194f64772aee91e7319ca033905b0bafee04c +refs/heads/master: 059987ffa7f8905fada25c8af1734e254209c55d diff --git a/trunk/arch/arm/kernel/kprobes.h b/trunk/arch/arm/kernel/kprobes.h index 36e07684fe08..12627a376bf6 100644 --- a/trunk/arch/arm/kernel/kprobes.h +++ b/trunk/arch/arm/kernel/kprobes.h @@ -95,6 +95,20 @@ static inline unsigned long it_advance(unsigned long cpsr) return cpsr; } +static inline void __kprobes bx_write_pc(long pcv, struct pt_regs *regs) +{ + long cpsr = regs->ARM_cpsr; + if (pcv & 0x1) { + cpsr |= PSR_T_BIT; + pcv &= ~0x1; + } else { + cpsr &= ~PSR_T_BIT; + pcv &= ~0x2; /* Avoid UNPREDICTABLE address allignment */ + } + regs->ARM_cpsr = cpsr; + regs->ARM_pc = pcv; +} + void __kprobes kprobe_simulate_nop(struct kprobe *p, struct pt_regs *regs); void __kprobes kprobe_emulate_none(struct kprobe *p, struct pt_regs *regs);