LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-05-2008, 02:38 AM   #1
raj.aprilfool
LQ Newbie
 
Registered: Jun 2007
Location: Mumbai, India
Posts: 4

Rep: Reputation: 0
accessing userspace libraries in lkm


hi,
as u can guess, i'm a kernel n00b....

basically we already hv code developed in userspace, now we want to move to kernel space..... but i'm a lazy usersapce developer and hv used a lot of libraries... like openssl, flex, regex
so my question is,
1. is there any way to attach these libs to lkm.... or how should i go about it....
2. much of my stuff is in c++... so can i link libstdc++ (i know this is an invitation to flames.... and it is absolutely bad idea to hv c++ code in lkm... but let me know is there any possibility to hv it in kernel??)
3. and is there any limitation on the memory we can use in lkm... i mean i might use kmalloc number of times.... or other way is it possible to pass data structure from userspace to kernel space??

plz bare with my lack of knowledge.....
TIA
 
Old 08-05-2008, 10:56 AM   #2
estabroo
Senior Member
 
Registered: Jun 2008
Distribution: debian, ubuntu, sidux
Posts: 1,126
Blog Entries: 2

Rep: Reputation: 124Reputation: 124
Wow, your best bet is to write a simple shim kernel module and leave the bulk of your program in userspace, porting that into kernel space would be a nightmare.
 
Old 08-05-2008, 10:04 PM   #3
raj.aprilfool
LQ Newbie
 
Registered: Jun 2007
Location: Mumbai, India
Posts: 4

Original Poster
Rep: Reputation: 0
i completely agree with u.... but for me nightmare has come true..

.... using userspace libs in kernel... does not make any sense.. they actually use kernel to complete their task... and i really made the partitioning such that the lib dependent code will reside in userspace ... but my superiors r keen on hving all the things inside the kernel

and the current timeline certainly don't allow me to hack these lib src to implement my own.... i would certainly see this as an option in longer term...

TIA
 
Old 08-07-2008, 12:06 AM   #4
estabroo
Senior Member
 
Registered: Jun 2008
Distribution: debian, ubuntu, sidux
Posts: 1,126
Blog Entries: 2

Rep: Reputation: 124Reputation: 124
Good Luck. Have fun. Don't go crazy.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying cdemu userspace Q.. Linux - Software 6 11-30-2007 02:37 PM
LKM talking to another LKM? Ljunge Programming 4 11-13-2007 01:29 PM
framebuffer: how to use image_blit from userspace ??? qwijibow Programming 0 01-20-2007 06:35 AM
Problem accessing libraries DDD26 Linux - Newbie 4 12-16-2004 04:38 PM
Slackware AMD64 userspace joel112 Slackware 2 10-03-2004 11:18 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration