Hi Don
Well thanks for that direct and unhesitating reply, I appreciate it.
OK, so hardware can trap this; so far as I am aware (and my internals
knowledge is pretty good but pretty rusty) once the CPU is running with VM
support enabled, all accesses to memory go through the address translation
stage.
During this, if the address (or rather page) is found to be absent, then an
interrupt is raised, yes?
So there must be a page fault interrupt handler, but I guess even if we did
intercept this we are only intercepting page faults, not accesses.
Can that handler be replaced, (like a driver can) or is it too fundamental a
part of the kernel?
Can we thread another handler (so to speak) so that we can "do something"
then forward the interrupt to the real handler?
I guess deep down, every read/write to a page MUST involve the address
translation system, does this (to your knowledge) always involve some degree
of software or (in the case of a page that is present) are there times when
it is handled with only hardware doing the work?
This last question amounts to this:
If there were a way or Microsoft wanted to introduce a way to intercept
user-space read/writes, what could they do? or would they too be unable due
to the nature of how the hardware handles this?
Can you suggest any good books or web articles on this that go pretty low
level?
I have several Windows Internals books, these are pretty good but I always
have questions after reading them that I can't get answers to.
Thanks for your time.
Hugo
"Don Burn" wrote:
> You suspect wrong, you cannot trap memory accesses. Been there looked at
> ways to do this from NT 3.5 to present.
>
>
> --
> Don Burn (MVP, Windows DKD)
> Windows Filesystem and Driver Consulting
> Website: http://www.windrvr.com
> Blog: http://msmvps.com/blogs/WinDrvr
> Remove StopSpam to reply
>
>
>
> "Hugo >" <hugh<underbar> wrote in message
> news:0C44A04B-A6A7-46FE-8055-...
> >I want to get some idea of how to approach the following problem.
> >
> > I'm very interested in being able to intercept read/writes from/to mapped
> > memory pages, be they resident in physical memory or paged out to disk.
> > I'd
> > like to detect these operations when they arise from either a local
> > process
> > or one running on a networked machine.
> >
> > I'd also like to be able to detect when an app on some remote machine
> > opens
> > and maps a file from the local machine and unmaps it.
> >
> > I've not written a device driver before and know it is far from trivial,
> > although I am a seasoned developer and very familiar with most of the
> > internals of the OS.
> >
> > I would suspect that it is possible to craft a driver that can trap these
> > operations and then do something (or queue some work to be done later).
> >
> > This is just a vague exploration just now, not a real need, I'm just
> > trying
> > to ascertain from experts the main issues that this raises.
> >
> > Thanks
> >
> > Hugo
> >
> >
> >
> >
> >
> >
> > __________ Information from ESET NOD32 Antivirus, version of virus
> > signature database 4603 (20091113) __________
> >
> > The message was checked by ESET NOD32 Antivirus.
> >
> > http://www.eset.com
> >
> >
> >
>
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus signature database 4603 (20091113) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>
>
> .
>