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

Kevin M. Bealer (kmb203@psu.edu)
Sat, 28 Jun 1997 03:46:25 -0400


"Federico G. Gasparrini" wrote:
>Hi,
>
>
>I've got Linux-2.1.40 with all the updated versions of the
>software needed. When I compile the kernel and try to reboot, it
>appears the message ... if processor honours the WP ... and
>never goes on. It stops there.
>
>In my previous version of Linux (2.0.28) it answers OK, Good to
>that checking and goes on booting.
>
>Any suggestion???
>
>
>
>Thanks,
>
>Federico Gasparrini
>linux@fgaspar.demon.co.uk
>

I have the same problem, in 2.1.43, 2.1.42 and before. I traced it
down to the inline assembly block in arch/i386/mm/init.c.

I don't know -why- it is dying, or what the WP is, but if you comment
out the inline assembly and force the "test" to "no" you can get it to
run again.

(Obviously not the "right" fix:)

--- linux/arch/i386/mm/init.c Mon May 12 13:35:38 1997
+++ linux-2.1.43/arch/i386/mm/init.c Sat Jun 28 03:44:06 1997
@@ -347,16 +347,23 @@
pg0[0] = pte_val(mk_pte(PAGE_OFFSET, PAGE_READONLY));
local_flush_tlb();
current->mm->mmap->vm_start += PAGE_SIZE;
+
+/*
__asm__ __volatile__(
"movb %0,%1 ; movb %1,%0"
:"=m" (*(char *) __va(0)),
"=q" (tmp_reg)
- :/* no inputs */
+ :/ * no inputs * /
:"memory");
+
+*/
pg0[0] = old;
local_flush_tlb();
current->mm->mmap->vm_start -= PAGE_SIZE;
- if (wp_works_ok < 0) {
+/* Switching manually to "failure" result
+ was: if (wp_works_ok < 0) {
+ */
+ if ((0==0) || (wp_works_ok < 0)) {
wp_works_ok = 0;
printk("No.\n");
} else

--kmb203@psu.edu----------------Debian/GNU--1.3---Linux--2.0.30---
"You are in a maze of twisty little passages, all alike."