lkml.org 
[lkml]   [1997]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: Checking if processor honours the WP ... Stops the computer
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))
\
 
 \ /
  Last update: 2005-03-22 13:40    [W:0.059 / U:1.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site