From 8d963bfd84eb6b266b8bab2084f77f7dee4eac7e Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 7 Nov 2022 01:42:52 +0200 Subject: [PATCH] Disable SMEP and SMAP for now --- Core/CPU.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Core/CPU.cpp b/Core/CPU.cpp index 7ff1616..7334fbf 100644 --- a/Core/CPU.cpp +++ b/Core/CPU.cpp @@ -213,13 +213,15 @@ namespace CPU { if (!BSP) KPrint("SMEP is supported."); - cr4.SMEP = 1; + fixme("Not going to enable SMEP."); + // cr4.SMEP = 1; } if (rdx & x64::CPUID_FEAT_RDX_SMAP) { if (!BSP) KPrint("SMAP is supported."); - cr4.SMAP = 1; + fixme("Not going to enable SMAP."); + // cr4.SMAP = 1; } if (strcmp(Hypervisor(), x86_CPUID_VENDOR_VIRTUALBOX) != 0 && strcmp(Hypervisor(), x86_CPUID_VENDOR_TCG) != 0)