On Mon, 7 Feb 2005 22:34:44 -0500 (EST)
Jurij Smakov <[EMAIL PROTECTED]> wrote:

> dev_ifconf[518]: i=0 ifr=00000001efffacf8 ifr32=00000000efffd898
> 
> alloc_size is the amount allocated by compat_alloc_user_space(). The only 
> "strange" thing I can notice is the ifr address. On a few previous calls 
> to this function starting ifr (at i=0) looks like that:
> 
> ifr=00000000efffb3b0
> ifr=00000000efffacc0
> ifr=00000000efffb328
> ifr=00000000efffb2b8
> 
> and so on. The ifr address right before the hang has an extra bit set.

Yep, and notice that the "extra bit" is (1 << 32), or the first bit
in the upper 32-bits of the 64-bit kernel pointer.  In short, we get
garbage from the upper 32-bits of the stack pointer, and need to
mask it out for 32-bit tasks.  The fix is obvious, try this:

===== include/asm-sparc64/compat.h 1.17 vs edited =====
--- 1.17/include/asm-sparc64/compat.h   2005-02-02 04:05:45 -08:00
+++ edited/include/asm-sparc64/compat.h 2005-02-07 19:51:15 -08:00
@@ -133,6 +133,8 @@
 
        if (!(test_thread_flag(TIF_32BIT)))
                usp += STACK_BIAS;
+       else
+               usp &= 0xffffffffUL;
 
        return (void __user *) (usp - len);
 }
-
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to