Re: unresolved symbol do_fork

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

 



> I'm trying to replace the sys_fork() from the sys_call_table[] in 2.4.17
> with a verbatim implementation of it that also maintains process
> hierarchy information to be used later on for gang-scheduling. I'd like
> to load a module in the kernel that will replace the sys call. The
> module compiles with no errors/warnings, but insmod complains when
> attempting to load:
> 
> gang.o: unresolved symbol do_fork
> gang.o:
> Hint: You are trying to load a module without a GPL compatible license
>       and it has unresolved symbols.  Contact the module supplier for
>       assistance, only they can help you.
> 
> Is there a way I can resolve/import the symbol or is do_fork() not
> exported by the kernel at all, forcing me to recompile the kernel to
> include the functionality of the module?
> 
> Would it be possible to simply call the sys_fork() function pointer I'm
> trying to replace, and still somehow get it's return value and append
> the functionality I need?

You don't want to do this as module except for testing (replacing syscalls
from modules is not particularly reliable - if two modules try, bad things
will happen). For testing purposes, just add do_fork to the list of exported
modules (there is a file full of EXPORT macro calls somewhere in kernel source).

--------------------------------------------------------------------------------
                  				- Jan Hudec `Bulb' <bulb@ucw.cz>
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/


[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