| .. | .. |
|---|
| 4 | 4 | #include <linux/mm.h> /* for handle_mm_fault() */ |
|---|
| 5 | 5 | #include <linux/ftrace.h> |
|---|
| 6 | 6 | |
|---|
| 7 | | -extern void my_direct_func(struct vm_area_struct *vma, |
|---|
| 8 | | - unsigned long address, unsigned int flags); |
|---|
| 7 | +extern void my_direct_func(struct vm_area_struct *vma, unsigned long address, |
|---|
| 8 | + unsigned int flags, struct pt_regs *regs); |
|---|
| 9 | 9 | |
|---|
| 10 | | -void my_direct_func(struct vm_area_struct *vma, |
|---|
| 11 | | - unsigned long address, unsigned int flags) |
|---|
| 10 | +void my_direct_func(struct vm_area_struct *vma, unsigned long address, |
|---|
| 11 | + unsigned int flags, struct pt_regs *regs) |
|---|
| 12 | 12 | { |
|---|
| 13 | | - trace_printk("handle mm fault vma=%p address=%lx flags=%x\n", |
|---|
| 14 | | - vma, address, flags); |
|---|
| 13 | + trace_printk("handle mm fault vma=%p address=%lx flags=%x regs=%p\n", |
|---|
| 14 | + vma, address, flags, regs); |
|---|
| 15 | 15 | } |
|---|
| 16 | 16 | |
|---|
| 17 | 17 | extern void my_tramp(void *); |
|---|
| .. | .. |
|---|
| 26 | 26 | " pushq %rdi\n" |
|---|
| 27 | 27 | " pushq %rsi\n" |
|---|
| 28 | 28 | " pushq %rdx\n" |
|---|
| 29 | +" pushq %rcx\n" |
|---|
| 29 | 30 | " call my_direct_func\n" |
|---|
| 31 | +" popq %rcx\n" |
|---|
| 30 | 32 | " popq %rdx\n" |
|---|
| 31 | 33 | " popq %rsi\n" |
|---|
| 32 | 34 | " popq %rdi\n" |
|---|