Jens Nerche <[EMAIL PROTECTED]>

> I played a bit with segments. Built a gdt, loaded it. While
> load all RPL were set to 3 and code segments become data
> segments to force emulation of intersegment jumps/calls.

Correct.

> I expected a GP(selector) when doing a ljmp selector,offset,
> but became a "Fatal monitor error" because the test
>     if ( context != expected_context )
> in fault.c raises its finger and cryes. So far I understand
> this, context is the esp from nexus, on stack are all registers,
> and expected_context is a pointer to the end of nexus page,
> lessened by one guest_context_t - which should be the same.
> Any idea, why no GP, but different contexts??

The typical reason for this test to fail is if a GP happens
*inside the monitor code itself*.  This will create a new
exception stack frame on the monitor stack, but not at the
very *top* of the monitor stack (which is what the test tests
for) ...

You should try to find out where inside the monitor this
fault happens. (E.g. copy the context->eip value to a debugmsg
variable and compare with an insmod-generated list of addresses
of monitor routines ...)

Bye,
Ulrich

Reply via email to