From 3e068bc88fe2ae6842ce84a639aaf7e569f78dfb Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Sat, 26 Dec 2015 19:24:24 +0100 Subject: [PATCH] Fix x86 Alignment Check and Security Exception handlers. The processor pushes an error code when delivering these exception. Discovered by Alexandros Alexandrou. --- kernel/x64/interrupt.S | 6 +++--- kernel/x86/interrupt.S | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/kernel/x64/interrupt.S b/kernel/x64/interrupt.S index cf400733..3ec93932 100644 --- a/kernel/x64/interrupt.S +++ b/kernel/x64/interrupt.S @@ -1,6 +1,6 @@ /******************************************************************************* - Copyright(C) Jonas 'Sortie' Termansen 2011, 2012. + Copyright(C) Jonas 'Sortie' Termansen 2011, 2012, 2013, 2014, 2015. This file is part of Sortix. @@ -129,7 +129,7 @@ isr16: .global isr17 .type isr17, @function isr17: - pushq $0 # err_code + # pushq $0 # err_code pushed by CPU pushq $17 # int_no jmp interrupt_handler_prepare .global isr18 @@ -207,7 +207,7 @@ isr29: .global isr30 .type isr30, @function isr30: - pushq $0 # err_code + # pushq $0 # err_code pushed by CPU pushq $30 # int_no jmp interrupt_handler_prepare .global isr31 diff --git a/kernel/x86/interrupt.S b/kernel/x86/interrupt.S index 5554c535..8766276b 100644 --- a/kernel/x86/interrupt.S +++ b/kernel/x86/interrupt.S @@ -1,6 +1,6 @@ /******************************************************************************* - Copyright(C) Jonas 'Sortie' Termansen 2011, 2012, 2014. + Copyright(C) Jonas 'Sortie' Termansen 2011, 2012, 2013, 2014, 2015. This file is part of Sortix. @@ -129,7 +129,7 @@ isr16: .global isr17 .type isr17, @function isr17: - pushl $0 # err_code + # pushl $0 # err_code pushed by CPU pushl $17 # int_no jmp interrupt_handler_prepare .global isr18 @@ -207,7 +207,7 @@ isr29: .global isr30 .type isr30, @function isr30: - pushl $0 # err_code + # pushl $0 # err_code pushed by CPU pushl $30 # int_no jmp interrupt_handler_prepare .global isr31