LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-17-2009, 05:28 PM   #1
pmil
Member
 
Registered: Jul 2008
Posts: 43

Rep: Reputation: 15
Question Can a user application run entirely in kernel-mode?


Hi all,

I have a question regarding application/process execution and it's the following:

Is it possible a user application (which will regularly be executed at user-space) to be re-written as a kernel-module to allow the entire execution to be under kernel-mode (i.e. no system calls should be needed)? I am not saying that this is the right thing to do; I am just asking if it's doable.

Thanks in advance.
 
Old 12-17-2009, 07:06 PM   #2
raju.mopidevi
Senior Member
 
Registered: Jan 2009
Location: vijayawada, India
Distribution: openSUSE 11.2, Ubuntu 9.0.4
Posts: 1,155
Blog Entries: 12

Rep: Reputation: 92
Cool

To enable Kernel Mode Linux, say Y in Kernel Mode Linux field of kernel configuration, build and install the kernel, and reboot. Then, all executables under directory /trusted are executed in kernel mode in current Kernel Mode Linux implementation. For example, to execute a program named "cat" in kernel mode, copy the program to directory /trusted and execute it as follows (if the /trusted directory does not exist, mkdir it first):

Code:
/trusted/cat
To know about Kernel mode linux click it.
 
1 members found this post helpful.
Old 12-18-2009, 05:53 AM   #3
pmil
Member
 
Registered: Jul 2008
Posts: 43

Original Poster
Rep: Reputation: 15
Thanks very much for the reply.

I know that with KML you can do that but I was wondering if you can write a user application as a kernel module. Is this something that you can do, or there are limitations on doing that?

Thanks a lot.
 
Old 12-18-2009, 05:57 AM   #4
raju.mopidevi
Senior Member
 
Registered: Jan 2009
Location: vijayawada, India
Distribution: openSUSE 11.2, Ubuntu 9.0.4
Posts: 1,155
Blog Entries: 12

Rep: Reputation: 92
You are welcome !! gud luck
 
Old 12-18-2009, 07:52 AM   #5
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,609
Blog Entries: 4

Rep: Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905
Actually, that answer is misleading.

True kernel mode is a special execution environment that exists for only one purpose: to control the hardware, and thereby to create the environment in which ordinary applications expect to run. That's the only reason why we have a "Linux kernel," and so, that's the only reason why there is a "kernel mode" of execution.

"Kernel mode Linux" is a technique for mapping kernel-space memory so that it is accessible to an otherwise-ordinary (but highly trusted) user process. This is a great way to shoot yourself in the foot, but for certain (i.e. real time) apps it might avoid the overhead of system calls, which might in those very rare cases be important enough to put the entire system at great risk of crashing.
 
  


Reply


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to identify processes running in user mode and kernel mode subha109 Linux - Kernel 1 10-21-2009 11:37 AM
Run an application in stealth mode manoj96067 Programming 4 05-27-2009 08:27 AM
how to run an application from terminal mode 450Nappa Linux - Newbie 12 09-22-2008 03:51 PM
Run application window in su mode liaty Linux - Software 8 07-25-2006 08:49 AM
user mode issues - change default application pp7k Linux - Newbie 5 03-02-2005 04:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:28 AM.

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