device drive running in priviledged mode?

device drive running in priviledged mode?

Post by Le » Fri, 30 May 2003 22:00:22



I have a newbie question on device driver.  Although I have finished a
simple dummy device driver, I am still puzzled.  The user program
using driver API are executed in user space with CPU CPL=3, and I
suppose the driver itself should be running with CPU CPL=0, privilege
mode, actually it should not have inaccessible resources.  Then how
the switch happens?  To enter system call to change CPU cpl=0, we can
use int 0x80.  What about from user to drive code?

Thanks.

Lee

 
 
 

device drive running in priviledged mode?

Post by Catalin Marina » Sat, 31 May 2003 01:12:53



> I have a newbie question on device driver.  Although I have finished a
> simple dummy device driver, I am still puzzled.  The user program
> using driver API are executed in user space with CPU CPL=3, and I
> suppose the driver itself should be running with CPU CPL=0, privilege
> mode, actually it should not have inaccessible resources.  Then how
> the switch happens?  To enter system call to change CPU cpl=0, we can
> use int 0x80.  What about from user to drive code?

You access the driver API using system calls. For example, you call
open() from the C library which calls the sys_open() system call
(through an "int 0x80", CPL becomes 0) which calls the dev_open()
function in your driver.

Catalin

 
 
 

1. Mounting Drive without root priviledges

I am trying to find a way to mount a external removable drive for a system of
multiple users without having to use root priviledges.  Does anyone have any
ideas on how to get around this?  I have a Iomega ZipDrive attached to a Sun
SparcSystem running SunOS 4.1.3 (see SunExpert June95).  Thanks in advance.
--
Steven D. Bennett
University of Delaware                  Department of Chemistry
304A Drake Hall                         (302) 831-8720

http://www.udel.edu/arcade/steves.html

2. How to batch ftps

3. setting scsi tape drive mode using minor device no..

4. Test

5. Hard Drives: Mode 3, Mode 4 Eide?????

6. Stop spammers! But how?

7. Unable to access or mount hard drive/floppy drive from Rescue mode

8. ctrl-alt-delete

9. How do I run my stereo sound device as two sound devices???

10. EIDE-drive Seagate 1Gb in two drive emulation mode - suggestions?

11. xfig? hard drive just runs & runs...

12. suse6.2 - non priviledge users can rm *ANY* file

13. device eth0 entered promiscuous mode