linux-mips
[Top] [All Lists]

Re: mips64 LOAD_KPTE2 fix

To: anemo@mba.ocn.ne.jp
Subject: Re: mips64 LOAD_KPTE2 fix
From: Atsushi Nemoto <nemoto@toshiba-tops.co.jp>
Date: Mon, 02 Jun 2003 20:23:45 +0900 (JST)
Cc: linux-mips@linux-mips.org, ralf@linux-mips.org
In-reply-to: <20030602.201453.48536826.nemoto@toshiba-tops.co.jp>
Organization: TOSHIBA Personal Computer System Corporation
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20030602.201453.48536826.nemoto@toshiba-tops.co.jp>
Sender: linux-mips-bounce@linux-mips.org
>>>>> On Mon, 02 Jun 2003 20:14:53 +0900 (JST), Atsushi Nemoto 
>>>>> <anemo@mba.ocn.ne.jp> said:
anemo> If a TLB exception occured on very high address (such as
anemo> 0xffffffffffffffff), invalid_vmalloc_address should be called
anemo> but currently not.

anemo> I think it is because LOAD_KPTE2 in arch/mips64/mm/tlbex-r4k.S
anemo> does not check overflow of (kptbl + offset).  Here is a patch
anemo> (both 2.4 and 2.5).

Please ignore it.  I missed an another fix.  The beqz lacks delay
slot.  Here is a new patch.

diff -u linux-mips-cvs/arch/mips64/mm/tlbex-r4k.S 
linux.new/arch/mips64/mm/tlbex-r4k.S
--- linux-mips-cvs/arch/mips64/mm/tlbex-r4k.S   Mon Apr 28 09:44:54 2003
+++ linux.new/arch/mips64/mm/tlbex-r4k.S        Mon Jun  2 20:16:41 2003
@@ -72,9 +72,12 @@
        /*
         * Determine that fault address is within vmalloc range.
         */
+       bgez    \ptr, \not_vmalloc              # check overflow
+       nop
        dla     \tmp, ekptbl
        sltu    \tmp, \ptr, \tmp
        beqz    \tmp, \not_vmalloc              # not vmalloc
+       nop
        .endm
 
 
---
Atsushi Nemoto

<Prev in Thread] Current Thread [Next in Thread>