3.5+: yaboot, Invalid memory access

Christian Kujau lists at nerdbynature.de
Tue Sep 4 19:32:36 EST 2012


On Tue, 4 Sep 2012 at 16:51, Michael Ellerman wrote:
> My guess would be we're calling that quite early and the __put_user()
> check is getting confused and failing. That means we'll have left some
> code unpatched, which then fails.
> 
> Can you try with the patch applied, but instead of returning if the
> __put_user() fails, just continue on anyway.

You mean, like this?

------
diff --git a/arch/powerpc/lib/code-patching.c 
b/arch/powerpc/lib/code-patching.c
index dd223b3..755b623 100644
--- a/arch/powerpc/lib/code-patching.c
+++ b/arch/powerpc/lib/code-patching.c
@@ -21,8 +21,8 @@ int patch_instruction(unsigned int *addr, unsigned int 
instr)
        int err;
 
        err = __put_user(instr, addr);
-       if (err)
-               return err;
+//     if (err)
+//             return err;
        asm ("dcbst 0, %0; sync; icbi 0,%0; sync; isync" : : "r" (addr));
        return 0;
 }
------


Thanks,
Christian.

> 
> That will isolate if it's something in the __put_user() (I doubt it), or
> just that the __put_user() is failing and leaving the code unpatched.
> 
> cheers
-- 
BOFH excuse #361:

Communist revolutionaries taking over the server room and demanding all the computers in the building or they shoot the sysadmin. Poor misguided fools.


More information about the Linuxppc-dev mailing list