From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from trent.utfs.org (trent.utfs.org [94.185.90.103]) by ozlabs.org (Postfix) with ESMTP id 82FD92C008F for ; Tue, 4 Sep 2012 19:32:49 +1000 (EST) Date: Tue, 4 Sep 2012 02:32:36 -0700 (PDT) From: Christian Kujau To: Michael Ellerman Subject: Re: 3.5+: yaboot, Invalid memory access In-Reply-To: <1346741491.7619.12.camel@concordia> Message-ID: References: <1346741491.7619.12.camel@concordia> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: Steven Rostedt , linuxppc-dev@ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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.