Copy Protection
Ben Laurie
ben at algroup.co.uk
Fri, 07 Sep 2001 10:05:56 +0100
Mike Brodbelt wrote:
> but I believe that you actually mean the C library here, and not the OS.
> The OS is responsible for setting up virtual address space for the child
> process's code and data, and as such, has pretty much complete control
> over the execution environment, down to the ability to inspect each
> instruction before execution, if it so wishes.
>
> I confess to being less than completely certain about this, but I'm sure
> someone here has a better understanding of the hardware than I.
Although the OS can inspect each instruction before execution it makes
it incredibly slow. You'd notice.
The f00f bug you mentioned before was worked around not by inspecting
instructions, nor by trapping particular ones (which is not, in general,
possible). What was actually done was (in effect) to block the processor
from performing the erroneous operation that caused the lock in the
first place - and this was done in a highly bug-dependent way, not using
standard facilities in the chip.
See http://www.x86.org/errata/dec97/f00fbug.htm (for example) for the
gory details. Not for the faint-hearted!
Cheers,
Ben.
--
http://www.apache-ssl.org/ben.html
"There is no limit to what a man can do or how far he can go if he
doesn't mind who gets the credit." - Robert Woodruff