title: user defined page fault and exception handlers
body: <p>I am trying to understand if we can add our page <strong>fault handlers</strong> / <strong>exception</strong> handlers in <strong>kernel</strong> / <strong>user mode</strong> and handle the fault we induced before giving the control back to the kernel.
  The task here will be not modifying the existing kernel code (<strong>do_page_fault fn</strong>) but add a user defined handler which will be looked up when a page fault or and exception is triggered</p>
  
  <p>One could find tools like "<strong><em>kprobe</em></strong>" which provide hooks at instruction, but looks like this will not serve my purpose.</p>
  
  <p>Will be great if somebody can help me understand this or point to good references.</p>