Share your knowledge at the LQ Wiki.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 03-05-2005, 01:39 PM   #1
LQ Newbie
Registered: Sep 2004
Posts: 5

Rep: Reputation: 0
Calling User-space program functions from Kernel modules

I want to call some user-space program functions from the kernel module that i am trying to change. I cannot copy the code of the user-space program in the kernel module as i do not have the required libraries for them. So, I was wondering if there is some way of me to be able to call a user-space program function from the kernel module such that I call the user-space function and then it returns back to the kernel module after execution of that part.

Is there some way to do this? Or is there someway to easily change the user-space code to kernel space. In the user space code I am reading files from the memory, and then acting on them, etc.

Old 03-05-2005, 03:11 PM   #2
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,601

Rep: Reputation: 202Reputation: 202Reputation: 202
There's no general way. Kernel modules can use only a limited number of functions, normal program wants usually too much. If you can, try to use a diffeent method, rewrite the function in such a way that it'll do what you want it to do and stil be simple (and work in the kernel).


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
user space daemons, kernel patches, modules ajitkth Linux - General 0 02-21-2005 09:01 AM
error while accessing math functions in kernel modules dypgrp Programming 0 01-19-2005 10:12 AM
accessing functions in kernel modules starbuck8968 Programming 5 12-14-2004 10:42 AM
calling modules from user space adhiraj Linux - Newbie 1 01-29-2004 12:44 PM
on modules and user-space programs h/w Programming 2 01-06-2004 04:42 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:55 PM.

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