From e53c126bf3916ffff49dc13bd415ac3298ca8c02 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Tue, 5 Jan 2016 23:21:04 +0100 Subject: [PATCH] check the cpu features before the NX bit is set --- hermit/arch/x86/kernel/processor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hermit/arch/x86/kernel/processor.c b/hermit/arch/x86/kernel/processor.c index 618468b26..b4ebeecd1 100644 --- a/hermit/arch/x86/kernel/processor.c +++ b/hermit/arch/x86/kernel/processor.c @@ -308,7 +308,7 @@ int cpu_detection(void) { } if (cpu_info.feature3 & CPU_FEATURE_SYSCALL) { - wrmsr(MSR_EFER, rdmsr(MSR_EFER) | EFER_LMA | EFER_LME | EFER_NXE | EFER_SCE); + wrmsr(MSR_EFER, rdmsr(MSR_EFER) | EFER_LMA | EFER_LME | EFER_SCE); wrmsr(MSR_STAR, (0x1BULL << 48) | (0x08ULL << 32)); wrmsr(MSR_LSTAR, (size_t) &isrsyscall); // clear IF flag during an interrupt