From f9d15f9c64abf8f3096e82a4a20133152423d305 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 28 Aug 2011 23:30:43 +0200 Subject: Skip kernel WP check on i486 and above * i386/i386/i386asm.sym (machine_slot.sub_type): Define. * i386/i386/locore.S (copyout_retry): Skip if machine_slot[0].cpu_type > 3. --- i386/i386/i386asm.sym | 2 ++ i386/i386/locore.S | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'i386') diff --git a/i386/i386/i386asm.sym b/i386/i386/i386asm.sym index b1670e8..39dbcaf 100644 --- a/i386/i386/i386asm.sym +++ b/i386/i386/i386asm.sym @@ -86,6 +86,8 @@ offset i386_interrupt_state i efl offset i386_tss tss esp0 offset i386_tss tss ss0 +offset machine_slot sub_type cpu_type + expr I386_PGBYTES NBPG expr VM_MIN_ADDRESS expr VM_MAX_ADDRESS diff --git a/i386/i386/locore.S b/i386/i386/locore.S index 77ca05b..29c7791 100644 --- a/i386/i386/locore.S +++ b/i386/i386/locore.S @@ -1290,11 +1290,12 @@ Entry(copyoutmsg) /* * Check whether user address space is writable - * before writing to it - hardware is broken. - * XXX only have to do this on 386's. + * before writing to it - i386 hardware is broken. */ copyout_retry: #if !defined(MACH_HYP) && !PAE + cmpl $3,machine_slot+SUB_TYPE_CPU_TYPE + ja 0f /* Skip on i486 and above */ movl %cr3,%ecx /* point to page directory */ movl %edi,%eax /* get page directory bits */ shrl $(PDESHIFT),%eax /* from user address */ -- cgit v1.2.3