Re: Kernel module version support.

From: Rusty Russell (rusty@rustcorp.com.au)
Date: Fri Jan 03 2003 - 03:14:12 EST


In message <957BD1C2BF3CD411B6C500A0C944CA2601F11711@pdsmsx32.pd.intel.com> you
 write:
> Hi, Rusty

> There is a example that could explain why I want the module structure's
> pointer.

> If we want to place kernel probes on all PIO instrcutions of a
> device driver for debuging purpose, only knowing symbol's address is
> not enough. We need the base address of .text section. How do you
> think about this example ?

I don't know where the .text section is anymore, once the module is
loaded. And just the .text section might not be enough on some archs.

I think it would be cleaner to have a userspace program which parses
the module, figures out how it is laid out in memory (this will be
arch specific!) and then (using the base address from /proc/modules)
tells the kernel "insert a probe at address 0xc1234567". This should
be far more flexible, I think.

Thoughts?
Rusty.

--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Jan 07 2003 - 22:00:20 EST