Re: Checking if processor honours the WP ... Stops the computer

Martin Mares (mj@mj.gts.cz)
Fri, 12 Sep 1997 10:06:44 +0200


Hi,

The patch I promised to send was a bit ... well, missing :)

Have a nice fortnight

-- 
Martin `MJ' Mares   <mj@gts.cz>   http://atrey.karlin.mff.cuni.cz/~mj/
Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth
"Foolproof operation:  All parameters are hard coded."

diff -u -r1.20 fault.c --- fault.c 1997/08/20 03:49:33 1.20 +++ fault.c 1997/09/11 14:25:57 @@ -186,10 +186,11 @@ * * First we check if it was the bootup rw-test, though.. */ - if (wp_works_ok < 0 && address == TASK_SIZE && (error_code & 1)) { + if (wp_works_ok < 0 && address == PAGE_OFFSET && (error_code & 1)) { wp_works_ok = 1; - pg0[0] = pte_val(mk_pte(TASK_SIZE, PAGE_SHARED)); - flush_tlb(); + pg0[0] = pte_val(mk_pte(PAGE_OFFSET, PAGE_KERNEL)); + local_flush_tlb(); + printk("Ok"); goto out; } if (address < PAGE_SIZE) diff -u -r1.28 init.c --- init.c 1997/08/05 19:18:50 1.28 +++ init.c 1997/09/11 14:25:59 @@ -295,7 +295,7 @@ panic("This kernel doesn't support CPU's with broken WP. Recompile it for a 386!"); #endif } else - printk("Ok.\n"); + printk(".\n"); } __initfunc(void mem_init(unsigned long start_mem, unsigned long end_mem))