Re: Need help with register_page_fault_notifier() replacement in 2.6.24



On Sun, 18 Nov 2007 12:40:16 -0500
Pavel Roskin <proski@xxxxxxx> wrote:

Hello!

I'm trying to update a special tracing version of madwifi (driver for
Atheros wireless cards) for Linux 2.6.24. This version was created to
help reverse engineering the non-free part of the driver (also known
as HAL, hardware abstraction layer).

The problem is that functions register_page_fault_notifier() and
unregister_page_fault_notifier() are gone in the current kernel git
repository.

They are needed to intercept access to the card by causing page fault
and intercepting it.

Those functions were removed on i386 platform because kprobes now
registers the flat handler directly. The log says that other callers
are supposed to use kprobes now.

But what would be the right way to do it? I can intercept
do_page_fault() with kprobes, but that looks unsafe, since
do_page_fault() is used by kprobes internally.

Or maybe I should install a fault handler with register_kprobe()? The
problem is, it is only called for faults in kp->pre_handler and
kp->post_handler and for single-stepping. I don't want to single-step
anything, and moving all driver functionality in kp->pre_handler would
be strange.

Perhaps I'm missing something obvious. Any help will be appreciated.


if it's just for a custom case (as it sounds like).. a simple small
change to the pagefault handler sounds like the easiest thing to do...
(eg just a direct function call to what would have been your notifier)

--
If you want to reach me at my work email, use arjan@xxxxxxxxxxxxxxx
For development, discussion and tips for power savings,
visit http://www.lesswatts.org
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Need help with register_page_fault_notifier() replacement in 2.6.24
    ... Atheros wireless cards) for Linux 2.6.24. ... help reverse engineering the non-free part of the driver (also known as ... Those functions were removed on i386 platform because kprobes now ...
    (Linux-Kernel)
  • Re: [patch 4/4] genirq: add support for threaded interrupt handlers
    ... _all_ drivers to have their interrupt handlers automagically called from ... process context with no driver changes. ... the threaded interrupt handler model contrary to the preempt-rt patch ... stuff that now needs softirq could be directly done in the ...
    (Linux-Kernel)
  • Re: [PATCH] OMAP: Keypad driver
    ... I don't think the tasklet stopping code is correct. ... But the just-killed timer handler might have ... I will update the driver and submit the patch. ... May changelog needs URL entry like http://linux.omap.com _or_ ...
    (Linux-Kernel)
  • Re: 2.6.31-rt11 freeze on userland start on ARM
    ... The goal was making its interrupt handler suitable for -rt as well as ... The interface to the generic serial driver is ...
    (Linux-Kernel)
  • Re: Wifi woes - views on this PB debug trace?
    ... standard 802.3 driver to the ip stack, ... contact with the vendor, but I'd its always worth getting a basic ... SetSlotInterface: ... NOT using OPTIMIZED RX handler ...
    (microsoft.public.windowsce.platbuilder)