Re: Dynamic Kernel Module Section Addresses

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 28, 2010 at 6:38 AM, Venkatram Tummala
<venkatram867@xxxxxxxxx> wrote:
> On Tue, Apr 27, 2010 at 5:04 PM, Mulyadi Santosa <mulyadi.santosa@xxxxxxxxx>
> wrote:
>>
>> Hi Venkatram...
>>
>> On Wed, Apr 28, 2010 at 05:34, Venkatram Tummala <venkatram867@xxxxxxxxx>
>> wrote:
>> >
>> > 1) Is there any way to tell the kernel not to load these module sections
>> > at
>> > different addresses every time the module is inserted & removed . That
>> > is,
>> > can we have the module loaded at exactly the same address everytime?
>>
>> None that I know. AFAIK the only way is to recheck the /sys entry and
>> reinsert the symbol file (your kernel module file, which has been
>> compiled with -g before) to proper position
>
> With this approach, i can set breakpoints in every function except for the
> function that initializes the module because i have to insert the module to
> get the kernel module section addresses from /sys  as a result of which, the
> initializition routine finishes executing which means i can not set any
> breakpoints in the module initialize function.
>
> This is not a problem for the the module exit function or any other function
> though.
>
> There should be a way to tell the kernel that "Look, I dont care where you
> put the segments of this module but put them at the same place everytime i
> re-insert the module again (atleast until the next reboot)". Conceptually,
> this should not be hard to implement (if its not there already) because it
> is the same kernel & the same unchanged KO module that i am asking it to
> insert.
>>
>> > 2) Is there any way to overcome this problem so that i can debug the
>> > module
>> > using vmware even though the module is loaded at different addresses?

Probably i didn't understand the question. Can't you find it by
looking at "p modules" from gdb ?

Thanks -
Manish


>>
>> AFAIK, again none that I know.
>>
>> --
>> regards,
>>
>> Mulyadi Santosa
>> Freelance Linux trainer and consultant
>>
>> blog: the-hydra.blogspot.com
>> training: mulyaditraining.blogspot.com
>
>



-- 
Thanks -
Manish
==================================
[$\*.^ -- I miss being one of them
==================================

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux