Il 21/07/2014 13:39, Nadav Amit ha scritto:
> @@ -176,7 +176,7 @@ unsigned exception_vector(void)
> unsigned short vector;
>
> asm("mov %%gs:4, %0" : "=rm"(vector));
"rm" is wrong here, it should be "r". If we make it "q" instead, we can
use movb.
unsigned char vector;
This patch tests whether rflags.rf is set upon #UD and #GP faults as it should,
according to Intel SDM 17.3.1.1. The patch saves rflags.rf in an unused bit of
the value which is saved during exception handling to save rflags.rf.
Signed-off-by: Nadav Amit
---
lib/x86/desc.c | 14 +++---
2 matches
Mail list logo