Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 306634
b: refs/heads/master
c: 96379f6
h: refs/heads/master
v: v3
  • Loading branch information
Srikar Dronamraju authored and Ingo Molnar committed Feb 22, 2012
1 parent 5c6c76c commit 40c4460
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 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: 04a3d984d32e47983770d314cdb4e4d8f38fccb7
refs/heads/master: 96379f60075c75b261328aa7830ef8aa158247ac
2 changes: 0 additions & 2 deletions trunk/include/linux/uprobes.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ struct uprobe_arch_info {};
#define MAX_UINSN_BYTES 4
#endif

#define uprobe_opcode_sz sizeof(uprobe_opcode_t)

/* flags that denote/change uprobes behaviour */

/* Have a copy of original instruction */
Expand Down
6 changes: 3 additions & 3 deletions trunk/kernel/events/uprobes.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,8 @@ static int write_opcode(struct mm_struct *mm, struct uprobe *uprobe,

/* poke the new insn in, ASSUMES we don't cross page boundary */
vaddr &= ~PAGE_MASK;
BUG_ON(vaddr + uprobe_opcode_sz > PAGE_SIZE);
memcpy(vaddr_new + vaddr, &opcode, uprobe_opcode_sz);
BUG_ON(vaddr + UPROBES_BKPT_INSN_SIZE > PAGE_SIZE);
memcpy(vaddr_new + vaddr, &opcode, UPROBES_BKPT_INSN_SIZE);

kunmap_atomic(vaddr_new);
kunmap_atomic(vaddr_old);
Expand Down Expand Up @@ -293,7 +293,7 @@ static int read_opcode(struct mm_struct *mm, unsigned long vaddr, uprobe_opcode_
lock_page(page);
vaddr_new = kmap_atomic(page);
vaddr &= ~PAGE_MASK;
memcpy(opcode, vaddr_new + vaddr, uprobe_opcode_sz);
memcpy(opcode, vaddr_new + vaddr, UPROBES_BKPT_INSN_SIZE);
kunmap_atomic(vaddr_new);
unlock_page(page);

Expand Down

0 comments on commit 40c4460

Please sign in to comment.