LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 10-14-2010, 05:04 AM   #1
pmil
Member
 
Registered: Jul 2008
Posts: 43

Rep: Reputation: 15
Question Prevent Linux from using some x86 peripherals


Hi all,

I am trying to prevent Linux from using some x86 peripherals. For instance, I want to prevent Linux from using the PCI and the serial port 1. Do you have any idea on how to achieve this?

I though that an idea might be to edit the Linux GDT and exclude the I/O port and memory mapped locations of the peripherals I don't want it to have access to, but this will lead to a non flat model which is what Linux assumes.

Any thoughts would be much appreciated.
 
Old 10-14-2010, 05:29 AM   #2
prayag_pjs
Senior Member
 
Registered: Feb 2008
Location: Pune - India
Distribution: RHEL/Ubuntu/Debian/Fedora/Centos/K3OS
Posts: 1,159
Blog Entries: 4

Rep: Reputation: 149Reputation: 149
Hi,

Compile kernel and disable the drivers for PCI.Serial etc.

You can also remove the modules using rmmod or modprobe -r
 
Old 10-14-2010, 06:09 AM   #3
pmil
Member
 
Registered: Jul 2008
Posts: 43

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by prayag_pjs View Post
Hi,

Compile kernel and disable the drivers for PCI.Serial etc.

You can also remove the modules using rmmod or modprobe -r
Hi and thanks for your response. Unfortunately what I intent to achieve is not getting solved by just removing the drivers from the kernel. For example, a user can write a user-process or a module by which he/she accesses the I/O ports of e.g. the serial. So, access to the registers of the serial will be achieved despite the lack of a serial driver.

What I want is that every one that tries to access some particular I/O ports (e.g. 3F8h – 3FFh for serial port 1) and some particular addresses of memory mapped peripherals (e.g. PCI), not be able to do it.

I hope it is clearer now what I want to achieve.

Thanks.
 
Old 10-14-2010, 06:20 AM   #4
prayag_pjs
Senior Member
 
Registered: Feb 2008
Location: Pune - India
Distribution: RHEL/Ubuntu/Debian/Fedora/Centos/K3OS
Posts: 1,159
Blog Entries: 4

Rep: Reputation: 149Reputation: 149
Why can't a user can write a user-process or a module by which he/she for any thing else we do ( if we prevent one that tries to access some particular I/O ports (e.g. 3F8h – 3FFh for serial port 1) and some particular addresses of memory mapped peripherals (e.g. PCI), not be able to do it. some how?)
 
Old 10-14-2010, 07:41 AM   #5
pmil
Member
 
Registered: Jul 2008
Posts: 43

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by prayag_pjs View Post
Why can't a user can write a user-process or a module by which he/she for any thing else we do ( if we prevent one that tries to access some particular I/O ports (e.g. 3F8h – 3FFh for serial port 1) and some particular addresses of memory mapped peripherals (e.g. PCI), not be able to do it. some how?)
Excuse me but I find it difficult to follow you thought...
 
Old 10-14-2010, 08:44 AM   #6
cadillackid
LQ Newbie
 
Registered: Oct 2010
Posts: 4

Rep: Reputation: 0
what if you load the drivers for those devices and then start a process that uses the devices... will that not effectively block a user from accessing the said device because it is already busy?

or what if you chmod the users out of the devices you dont want them to use?

-Christopher
 
Old 10-14-2010, 11:33 AM   #7
pmil
Member
 
Registered: Jul 2008
Posts: 43

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by cadillackid View Post
what if you load the drivers for those devices and then start a process that uses the devices... will that not effectively block a user from accessing the said device because it is already busy?

or what if you chmod the users out of the devices you dont want them to use?
Hi! I would like just to prevent the access to some particular memory locations if that's possible. For example, I want Linux not being able to see particular locations.

Thanks.
 
  


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
LXer: Sabayon Linux x86/x86-64 5.2 GNOME and KDE LXer Syndicated Linux News 2 03-29-2010 08:00 AM
LXer: Sabayon Linux x86/x86-64 5.o GNOME and KDE Released LXer Syndicated Linux News 0 10-02-2009 06:21 PM
LXer: Sabayon Linux x86/x86-64 3.5 Stable release LXer Syndicated Linux News 0 07-03-2008 12:00 AM
LXer: Sabayon Linux x86/x86-64 3.5 Loop 2: Beta Release LXer Syndicated Linux News 0 03-17-2008 06:41 PM
LXer: Sabayon Linux x86/x86-64 3.4 [Stable Release] LXer Syndicated Linux News 0 07-25-2007 02:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 01:32 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