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

Re: Writing system calls.



   Hi  Bob,

The problem is that I don't realy want to write new system calls.
I just want to be able to access functions like skbuffer suport functions
wich can be called only within a module. Because if I'll write a module
where I put my_skbuff_mangling_function(), I don't know how to access this
function. Then I was thinking to make this function a system call.
    Maybe it sounds stupid but I'm new in kernel hacking and I don't know
what to do :(

Thanks Bob for your quick response.

----- Original Message -----
From: Bob Dilworth <bdilworth@mco.edu>
To: <kernelnewbies@nl.linux.org>
Sent: Wednesday, March 07, 2001 6:26 PM
Subject: Re: Writing system calls.


> >Does anyone know a good documentation about writing new system calls ??
>
> Hi Radu!
>
> Conventional wisdom has it that writing new system calls is not a good
idea.  Apparently all new calls have to be approved by Mr. Torvalds (each
call has its own number) and adding one for your own personal enjoyment and
edification may interfere with new ones added to new kernels forcing you to
re-code and re-compile your own personal ones.  The better strategy, again
according to conventional widsom, is to write a module that supports IOCTL
(spelling?) fuctions.  Please note that the above caveat may not be totally
accurate but that's the jist of it I've put together by lurking on this
august list.
>
> That said it seems to me that if you're thinking of writing a new system
call for your own  enjoyment and learning experience, I say go for it!  How
else would one learn how to do it except by, well, actually doing it.  As
long as you're aware of the conventional wisdom and it's various caveats I
see no harm in having a personal kernel with one's own system calls embedded
therein.  If you decide to go this route and ask for help, be prepared for
folks telling you shouldn't be doing that.  Also be prepared to tell them
that you're doing it for your own education and don't plan on putting the
system call into a production system, etc., etc.
>
> I've written one module (proc file) and found that the Linux Kernel Module
Programming Guide by Ori Pommeratz (spelling) is invaluable.  Here's a link
to a page from which you can download the Guide
 http://howto.tucows.com/guides.html ).  I'd also recommend the new O'Reilly
"Understanding the Linux Kernel book.  Between the Module Programming Guide,
the O'Reilly book, the helpful folks on this list, and hitting the right
keys on the keyboard in the right order, it was a snap ;-)
>
> Remember - have fun, keep an open mind, be prepared for varying degrees of
frustration, and ask for help.  You'll find folks are very patient and
extremely helpful.
>
> Welcome aboard!!!!!!!!!!
>
> Bob Dilworth
> Medical College of Ohio
> Toledo, Ohio
> (419)383-6071
> bdilworth@mco.edu
>
> -
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/
> IRC Channel:   irc.openprojects.net / #kernelnewbies
> Web Page:      http://www.surriel.com/kernelnewbies.shtml

-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.surriel.com/kernelnewbies.shtml