- arch/x86/kernel/idt.c:152 -
page_fault
is used in the IDT
- arch/x86/entry/entry_64.S:1143 -
page_fault
is defined as a wrapper function for do_page_fault()
, implemented using the macro idtentry
- arch/x86/entry/entry_64.S:847 -
idtentry
macro
- arch/x86/mm/fault.c:1562 -
do_page_fault()
Once you reach do_page_fault()
, you should see clickable links to navigate the rest of the code. You can't do that for these first four steps, because Elixir doesn't understand the macro magic. It also doesn't understand assembly.
If you need to look at any other traps, some of the other handler functions (do_*
) are in turn defined by another macro, x86/kernel/traps.c:281 DO_ERROR()
.
The function that logs the segfault message is also in fault.c: show_signal_msg(). A little freebie for you. Elixir doesn't allow searching for strings in general, only identifiers. GitHub also shut down their code search. In any case it's hard to search for this message format string without actually downloading the source code, because "%s%s[%d]: segfault at %lx ip %px sp %px error %lx"
does not contain a lot of specific words or phrases :-).
The above links are to specific line numbers of the v5.0 source code. Using Elixir, which I really like :-).