From a3ed137f07bf7e35c537821470ce44845914ebb5 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Tue, 28 Jun 2016 20:52:36 +0200 Subject: [PATCH] trampoline code doesn't longer enable SMEP because old CPUs don't support this feature --- hermit/arch/x86/kernel/processor.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hermit/arch/x86/kernel/processor.c b/hermit/arch/x86/kernel/processor.c index d669a10b7..0d903c680 100644 --- a/hermit/arch/x86/kernel/processor.c +++ b/hermit/arch/x86/kernel/processor.c @@ -384,6 +384,8 @@ int cpu_detection(void) { kprintf("Syscall instruction: %s\n", (cpu_info.feature3 & CPU_FEATURE_SYSCALL) ? "available" : "unavailable"); } + //TODO: add check for SMEP and SMAP + // be sure that AM, NE and MP is enabled cr0 = read_cr0(); cr0 |= CR0_AM;