aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/uprobes.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/x86/kernel/uprobes.c b/arch/x86/kernel/uprobes.c
index 187be0e15e1d..5df1bca7c2bc 100644
--- a/arch/x86/kernel/uprobes.c
+++ b/arch/x86/kernel/uprobes.c
@@ -330,16 +330,17 @@ static void riprel_analyze(struct arch_uprobe *auprobe, struct insn *insn)
330 * If we're emulating a rip-relative instruction, save the contents 330 * If we're emulating a rip-relative instruction, save the contents
331 * of the scratch register and store the target address in that register. 331 * of the scratch register and store the target address in that register.
332 */ 332 */
333static void riprel_pre_xol(struct arch_uprobe *auprobe, struct pt_regs *regs, 333static void riprel_pre_xol(struct arch_uprobe *auprobe, struct pt_regs *regs)
334 struct arch_uprobe_task *autask)
335{ 334{
335 struct uprobe_task *utask = current->utask;
336
336 if (auprobe->def.fixups & UPROBE_FIX_RIP_AX) { 337 if (auprobe->def.fixups & UPROBE_FIX_RIP_AX) {
337 autask->saved_scratch_register = regs->ax; 338 utask->autask.saved_scratch_register = regs->ax;
338 regs->ax = current->utask->vaddr; 339 regs->ax = utask->vaddr;
339 regs->ax += auprobe->def.riprel_target; 340 regs->ax += auprobe->def.riprel_target;
340 } else if (auprobe->def.fixups & UPROBE_FIX_RIP_CX) { 341 } else if (auprobe->def.fixups & UPROBE_FIX_RIP_CX) {
341 autask->saved_scratch_register = regs->cx; 342 utask->autask.saved_scratch_register = regs->cx;
342 regs->cx = current->utask->vaddr; 343 regs->cx = utask->vaddr;
343 regs->cx += auprobe->def.riprel_target; 344 regs->cx += auprobe->def.riprel_target;
344 } 345 }
345} 346}
@@ -377,8 +378,7 @@ static inline bool is_64bit_mm(struct mm_struct *mm)
377static void riprel_analyze(struct arch_uprobe *auprobe, struct insn *insn) 378static void riprel_analyze(struct arch_uprobe *auprobe, struct insn *insn)
378{ 379{
379} 380}
380static void riprel_pre_xol(struct arch_uprobe *auprobe, struct pt_regs *regs, 381static void riprel_pre_xol(struct arch_uprobe *auprobe, struct pt_regs *regs)
381 struct arch_uprobe_task *autask)
382{ 382{
383} 383}
384static void riprel_post_xol(struct arch_uprobe *auprobe, struct pt_regs *regs, 384static void riprel_post_xol(struct arch_uprobe *auprobe, struct pt_regs *regs,
@@ -401,7 +401,7 @@ static inline int sizeof_long(void)
401 401
402static int default_pre_xol_op(struct arch_uprobe *auprobe, struct pt_regs *regs) 402static int default_pre_xol_op(struct arch_uprobe *auprobe, struct pt_regs *regs)
403{ 403{
404 riprel_pre_xol(auprobe, regs, &current->utask->autask); 404 riprel_pre_xol(auprobe, regs);
405 return 0; 405 return 0;
406} 406}
407 407