From 23e8270a60891c3b2978bebe9b2fcccc93293623 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Wed, 2 Sep 2015 20:36:03 +0200 Subject: [PATCH] Enable the no-execute feature in page tables --- src/arch/x86_64/boot.asm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/arch/x86_64/boot.asm b/src/arch/x86_64/boot.asm index bdfdb820..382d12e8 100644 --- a/src/arch/x86_64/boot.asm +++ b/src/arch/x86_64/boot.asm @@ -68,7 +68,8 @@ enable_paging: ; set the long mode bit in the EFER MSR (model specific register) mov ecx, 0xC0000080 rdmsr - or eax, 1 << 8 + or eax, 1 << 8 ; enable long mode + or eax, 1 << 11 ; enable no-execute bit in page tables wrmsr ; enable paging in the cr0 register