???Linux????????????
???????????? ???????[ 2013/5/13 10:24:57 ] ????????
???????Щ????£???????????????Linux?????????Щ?????????????page fault???????
???????????????????£?
???????????????????????????page fault???????????????linux 3.8.0???????????з???page fault????????page fault???????????do_page_fault??????do_page_fault????????£?
dotraplinkage void __kprobes
do_page_fault(struct pt_regs *regs?? unsigned long error_code)
{
exception_enter(regs);
__do_page_fault(regs?? error_code);
exception_exit(regs);
}
?????????do_page_fault???????????????????д??????μ????default_do_page_fault??????????????????do_page_fault_handler????????default_do_page_fault?????????do_page_fault?????????ú??????do_page_fault_handler???????????????£?
void
default_do_page_fault(struct pt_regs *regs?? unsigned long error_code)
{
exception_enter(regs);
__do_page_fault(regs?? error_code);
exception_exit(regs);
}
EXPORT_SYMBOL(default_do_page_fault);
typedef void (*do_page_fault_handler_t)(struct pt_regs *?? unsigned long);
do_page_fault_handler_t do_page_fault_handler = default_do_page_fault;
EXPORT_SYMBOL(do_page_fault_handler);
dotraplinkage void __kprobes
do_page_fault(struct pt_regs *regs?? unsigned long error_code){
do_page_fault_handler(regs?? error_code);
}
????????do_page_fault_handler??EXPORT_SYMBOL???????????????????п???????????????????do_page_fault_handler??????????????page fault??????????????????????????????????????????????????????do_page_fault_handler?????default_do_page_fault???ɡ?
???????????????????£?
??????????Щ????£???????????????????????????????????????????????
???????????????????do_page_fault???????????????????????????????page fault????????С??????????????????????????????do_page_fault?????
??????????????飬????????μ?????????????IDT??????????page fault??
?????????е?IDT????????????д????????????????????????????IDT?????????????????????????ISR(Interrupt Service Routine)??page fault??ISR?????page_fault?????????????????error number??????????do_page_fault????do_page_fault????????????????????????????
??????Linux????У?ISR??????д??????磬x86_64 Linux??ISR???λ????????arch/x86/kernel/entry_64.S?У?X86_32??λ??arch/x86/kernel/entry_32.S?С???????entry_64.S????entry_32.S???????????????????????????????????????壬???????????????д?????????ISR??????
??????????????????????????????vmlinux.o????????page_fault????????????????????????linux-3.8.0 X86_64?????
ffffffff8136f6f0 <page_fault>:
ffffffff8136f6f0: 66 66 90 data32 xchg %ax??%ax
ffffffff8136f6f3: ff 15 07 0a 2b 00 callq *0x2b0a07(%rip) # ffffffff81620100 <pv_irq_ops+0x30>
ffffffff8136f6f9: 48 83 ec 78 sub $0x78??%rsp
ffffffff8136f6fd: e8 ae 01 00 00 callq ffffffff8136f8b0 <error_entry>
ffffffff8136f702: 48 89 e7 mov %rsp??%rdi
ffffffff8136f705: 48 8b 74 24 78 mov 0x78(%rsp)??%rsi
ffffffff8136f70a: 48 c7 44 24 78 ff ff movq $0xffffffffffffffff??0x78(%rsp)
ffffffff8136f711: ff ff
ffffffff8136f713: e8 1f 2e 00 00 callq ffffffff81372537 <do_page_fault>
11 ffffffff8136f718: e9 33 02 00 00 jmpq ffffffff8136f950 <error_exit>
12 ffffffff8136f71d: 0f 1f 00 nopl (%rax)
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11