Re: Creating a file in kernel Module -- working fine

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

 



Hi Jan,

Well can you put some light why this code is not good.
I know that using the top most level functions of any
system call in kernel (like sys_open, sys_close, any
function whcih starts with "sys_") will put alot of
extra overload and might not be the optimum way to do
things in kernel, but i think functionality wise it
will be same, as these function handle all the
senarios need to be handled.

I think its the easiest and safest way but definitely
not the optimum way, so we shud not use such things in
production code, but they can be used for experimental
or learning codes.

Linux_Lover,

If you want to use the same code as that of Srinivas,
you need to export the symbols explicitly in kern
using EXPORT macro and then re-compile your kernel and
boot the machine with new kernel OR do get the sources
from kernel.org as i think these symbols are exported
by default in those kernels. Yo need to compile this
also and boot your machine with new kernel.

Regards,
Gaurav



--- Jan Hudec <bulb@xxxxxx> wrote:

> On Mon, Feb 21, 2005 at 21:41:52 -0800, linux lover
> wrote:
> > Hello Shyamjithe,
> >               The same way Srinivas compile with
> his
> > Makefile. I uses that Makefile and compile it
> without
> > error. I also check /proc/ksyms and disnot find
> any
> > sys_open and sys_write exported functions symbol
> > there.
> >                What should i do now? how to insmod
> it
> > without unresolved error?
> > regards,
> > Linux_lover.
> 
> You have to use Linux, not RedHat. Anyway, PLEASE,
> FORGET THE CODE. It
> is so bogus that it's not worth trying! In other
> words, no, sys_open
> can't be used this way and it's only correct that
> RedHat disabled
> exporting it.
> 
>
-------------------------------------------------------------------------------
> 						 Jan 'Bulb' Hudec <bulb@xxxxxx>
> 

> ATTACHMENT part 2 application/pgp-signature
name=signature.asc




		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - 250MB free storage. Do more. Manage less. 
http://info.mail.yahoo.com/mail_250

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           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