[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
Re: [LI] Hiding LKM's -- Beta-test
On Tue, Jan 18, 2000 at 11:09:48PM -0800, Arun Sharma wrote:
> f()
> {
> register long p asm("%ebx");
>
> printf("ebx: %x\n", p);
> }
>
> main()
> {
> struct s s1 = { 10, &f };
>
> printf("s1.func: %x\n", s1.func);
> s1.func();
> }
I hope I dont bother you too much, but in the kernel code, EBX
is the equivalent of s1, and not s1.func. Maybe, "mod" is being pushed into
a register for optimization (it is being used by other nearby instructions).
But, what surprises me most is that "mod" being in EBX seems to be a pretty
constant fact over a bunch of kernels versions and kernel compilations
(on the x86 arch. anyway). I tried it on two kernels compiled with egcs
(with optimizations, that too) and it worked on both. Strange are the ways of
kernels!
Maybe I should just pull sys_init_module() out from /dev/kmem and feed it
into some debugger.
--vml
--------------------------------------------------------------------
The Linux India Mailing List Archives are now available. Please search
the archive at http://lists.linux-india.org/ before posting your question
to avoid repetition and save bandwidth.