Re: 3.5+: yaboot, Invalid memory access
From: Christian Kujau <hidden>
Date: 2012-09-04 09:32:49
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.