From mboxrd@z Thu Jan 1 00:00:00 1970 From: j.neuschaefer@gmx.net (Jonathan =?utf-8?Q?Neusch=C3=A4fer?=) Date: Thu, 27 Oct 2011 18:29:06 +0200 Subject: Kernel Module from C program In-Reply-To: References: Message-ID: <20111027162906.GA1533@debian.debian> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Thu, Oct 27, 2011 at 04:07:08PM +0000, Luis Morales wrote: > > Greetings, > > > > I'm new to the world of kernel modules programming. I've read the Linux Kernel Module Programming Guide by Peter Jay Salzman, among other documents, and I have the following question: > > > I'd like to know if it's possible to take a program developed in C (in this case OpenSIPs, which is a SIP Proxy Server) and turn it into a kernel module (I know "to turn it" is probably not the right expression, what I mean is if I could modify it somehow so that it can be loaded as a kernel module) ? > > > As far as I've understand, kernel modules are developed for drivers or to do some modifications to system calls, but I like to know if it's possible to do what I stated earlier. > > Thanks, > > > Luis Morales. As you can't use the usual user space libraries in the kernel, it might take quite some time to port a user space program to the linux kernel API. And I guess it wouldn't be a good idea from a security POV, as you don't have things like memory protection in kernel space. Thanks, Jonathan Neusch?fer