Re: [PATCH v9] livepatch: Clear relocation targets on a module removal

From: Josh Poimboeuf
Date: Fri Jan 20 2023 - 12:28:31 EST


On Fri, Jan 20, 2023 at 09:03:55AM -0800, Song Liu wrote:
> > > > Shouldn't there also be a fix for this powerpc issue?
> > >
> > > There was a working version, but it was not very clean. We couldn't agree
> > > on the path forward for powerpc, so we are hoping to ship the fix to x86 (and
> > > s390?) first [1].
> >
> > Sorry for coming in late, I was on leave so I missed a lot of the
> > discussions on previous versions. The decision to leave powerpc broken
> > wasn't clear from reading the commit message. The bug is mentioned, and
> > the fix is implied, but surprisingly there's no fix.
> >
> > I agree that the powerpc fix should be in a separate patch, but I still
> > don't feel comfortable merging the x86 fix without the corresponding
> > powerpc fix.
> >
> > powerpc is a major arch and not a second-class citizen. If we don't fix
> > it now then it'll probably never get fixed until it blows up in the real
> > world.
> >
> > For powerpc, instead of clearing, how about just "fixing" the warning
> > site, something like so (untested)?
>
> This version looks reasonable to me.

Ok, I'll run it through testing and work up a proper patch. I just
noticed the one I posted has a major bug thanks to restore_r2()'s
surprising return semantics.

--
Josh