Hi.
On 11/19/2013 04:56 PM, Ian Seyler wrote:
> This is pretty amazing work! Are there any issues with the app running
> in BareMetal?
>
> -Ian
>
Nothing in the small hellocpp demo.
But I found that the word with address 0 can be overwriten without any
trap.
xor rax, rax
mov [rax], rbx
It is inappropriate both for C and C++ because dereferencing of NULL
pointer
is a very frequent error. Usually the first few hundred of bytes should
be protected
(because we need also catch the case when we write to a member of a
struct referenced
by a null pointer).
I have less experience with OSDev, but I think it should be possible set
"read only" state for the first page even in the ring 0 (and also we
have -1 and -2 rings on Intel). If it is not possible we should use some
trap/debug registers.
(I just have no much time dig in CPU doc now).
--
Sergei