[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160225140638.GH21932@lst.de>
Date: Thu, 25 Feb 2016 15:06:38 +0100
From: Torsten Duwe <duwe@....de>
To: Michael Ellerman <mpe@...erman.id.au>
Cc: Balbir Singh <bsingharora@...il.com>, linuxppc-dev@...abs.org,
linux-kernel@...r.kernel.org, rostedt@...dmis.org,
kamalesh@...ux.vnet.ibm.com, pmladek@...e.com, jeyu@...hat.com,
jkosina@...e.cz, live-patching@...r.kernel.org, mbenes@...e.cz
Subject: Re: [PATCH 06/12] powerpc/module: Rework is_early_mcount_callsite()
On Thu, Feb 25, 2016 at 09:28:32PM +1100, Michael Ellerman wrote:
> On Thu, 2016-02-25 at 10:39 +1100, Balbir Singh wrote:
> > On 25/02/16 01:28, Michael Ellerman wrote:
> > > is_early_mcount_callsite() needs to detect either the two instruction or
> > > the three instruction versions of the _mcount() sequence.
> > >
> > > But if we're running a kernel with the two instruction sequence, we need
> > > to be careful not to read instruction - 2, otherwise we might fall off
> > > the front of a page and cause an oops.
> > >
> > > While we're here convert to bool to make the return semantics clear.
> > >
> > > Signed-off-by: Michael Ellerman <mpe@...erman.id.au>
I wouldn't mind if you had folded this into the previous patch, see comments there.
> > >
> > Do we even need to do this anymore?
>
> Yes. Otherwise the code in apply_relocate_add() will see a far call with no nop
> slot after it to do the toc restore, and it considers that a bug (which it
> usually is, except mcount is special).
>
> As we discussed today I'm hoping we can clean this code up a bit more in the
> medium term, but this works for now.
Agreed.
Reviewed-by: Torsten Duwe <duwe@...e.de>
Torsten
Powered by blists - more mailing lists