arm64: add alignment fault hanling
2016-02-17 2:11 GMT+09:00 Catalin Marinas <[email protected]>:
Quoted 21 lines · EunTaik Lee
Quoted 20 lines
arch/arm64/mm/fault.c +8
-0@@ -371,6 +371,14 @@ static int __kprobes do_translation_fault(unsigned long addr,return 0 ; } +static int __kprobes do_alignment_fault (unsigned long addr, +unsigned int esr, +struct pt_regs *regs) +{ +do_bad_area (addr, esr, regs); +return 0 ; +} +/* * This abort handler always returns "fault". */ @@ -418,7 +426,7 @@ static struct fault_info {
Quoted 8 lines
arch/arm64/mm/fault.c static struct fault_info { · line 429
Quoted 5 lines
arch/arm64/mm/fault.c +1
-1{ do_bad, SIGBUS, 0, "synchronous parity error (translation table walk" }, { do_bad, SIGBUS, 0, "synchronous parity error (translation table walk" }, { do_bad, SIGBUS, 0, "unknown 32" }, - { do_bad, SIGBUS, BUS_ADRALN, "alignment fault" }, + { do_alignment_fault, SIGBUS, BUS_ADRALN, "alignment fault" },Do you need a new function, can you not just add
do_bad_areain thefault_infoarray?
I made a new function since do_bad_area currently does not return any value. Should I just make it return an integer instead of making a new function for the unaligned fault?
Euntaik