Hi all,
I would like to know if there is any way to trap
calls to i/o port using a
driver. so that i can prevent user from accessing cmos
and doing any changes in it.
plz give a proper guidence.
regards,
Rakresh
=====
cool
“If u got cooler than me then i’ld chill”
Rakesh Yadava:
Software Engineer(PL)
Fortune Infotech Mumbai
Do you Yahoo!?
Meet the all-new My Yahoo! - Try it today!
http://my.yahoo.com
Hi Rakresh,
You can prevent access to I/O ports in user-mode, but not in kernel mode.
At least, you can’t do it without extra hardware. In theory, I suppose you
could build a piece of hardware that traps specific addresses and captures
the data being transferred. The user-mode accesses to I/O ports (from
DOS-box for instance) are filtered by the standard I/O port manager that
decides whether this I/O port is allowed to be accessed from user-mode or
not, and in many cases the access is emulated through a driver of some
sort.
If you have a defined hardware setup, you could, at least in theory, also
use SMI (System management interrupt) to trap any I/O access. But SMI isn’t
available to kernel driver, only to BIOS developers. So unless you’re doing
a specific BIOS that goes onto the motherboard that traps the access to the
CMOS area, you’re stuck.
I don’t know if there is a “clock/CMOS driver” somewhere that you could
attach a filter to and refuse certain irps.
Obviously, plain refusal to write to the CMOS will prevent certain things
to operate correctly, for instance Windows will automatically change the
Time of Day to adjust for ‘summer time’ or ‘standard time’ whenever it’s
appropriate.
Also, can you please shut off the heap of HTML that your mail contains, as
it appears like unreadable gunk in my mail-reader at least.
–
Mats
xxxxx@lists.osr.com wrote on 02/08/2005 01:49:23 PM:
Hi all,
I would like to know if there is any way to trap
calls to i/o port using a
driver. so that i can prevent user from accessing cmos
and doing any changes in it.
plz give a proper guidence.
regards,
Rakresh
Your question seems a little odd. What do you mean by “user?” If you mean
a user-mode program, then you have nothing to worry about. User-mode
programs can’t ever touch I/O ports directly.*
Even if you were talking about a kernel-mode driver, then your scheme won’t
work for at least two reasons.
-
Anything in kernel-mode has already got control over everything you
might want to protect.
-
The HAL uses the CMOS device for lots of things, so any attempt you make
to block access to in kernel-mode it will bring down the OS.
–
Jake Oshins
Windows Kernel Group
* Some drivers set up a few I/O ports so that specific processes can access
them directly. While possible, this is rare and mostly unsupported. It
certainly never happens for the CMOS ports.
This posting is provided “AS IS” with no warranties, and confers no rights.
“Rakesh Yadav” wrote in message
news:xxxxx@ntdev…
>
>
> Hi all,
>
> I would like to know if there is any way to trap
> calls to i/o port using a
> driver. so that i can prevent user from accessing cmos
> and doing any changes in it.
>
> plz give a proper guidence.
> regards,
> Rakresh
>
> =====
>
>
>
>
>
>
>
>
>
>
Rakesh
> Yadava:
>
Software
> Engineer(PL)
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Meet the all-new My Yahoo! - Try it today!
> http://my.yahoo.com
>
>
>