0

There are many documents and example code snippets for Linux x86/x64 IDT hooking. But I can't find such documents for ARM.

I what I want to do is hook the ARM handler pointer of some interrupt/exception such as divide by zero, or svc 0.

It seems that ARM is somewhat different to Intel.

some advice would be nice thank you in advance.

daehee
  • 5,047
  • 7
  • 44
  • 70
  • 3
    I think you have a [concept problem](http://wiki.osdev.org/Interrupt_Descriptor_Table). See: [OSDev wiki IDT entry](http://wiki.osdev.org/Interrupt_Descriptor_Table), the IDT is specific to the x86. For the ARM (non-Cortex-M, which I guess from the **Linux** tag) there is a single interrupt, which is responsible for reading the status from an interrupt controller and then branching to the appropriate routines. See also: [Linux divide by zero](http://stackoverflow.com/questions/12526276/where-is-the-zero-divide-done-in-kernel-for-arm-cortex-a-9). Can you please clarify what you want? – artless noise Jul 10 '14 at 16:12
  • Some exception handers (e.g. data aborts) can be extended - see [`hook_fault_code`](http://lxr.free-electrons.com/ident?i=hook_fault_code), but whether that's appropriate here depends on what you're _actually_ trying to achieve. – Notlikethat Jul 10 '14 at 18:08

0 Answers0