Re: [PATCH 1/2] livepatch: Move code for updating livepatch object relocations

From: Song Liu

Date: Fri Aug 28 2026 - 13:55:03 EST


On Fri, Aug 28, 2026 at 10:41 AM Josh Poimboeuf <jpoimboe@xxxxxxxxxx> wrote:
>
> On Fri, Aug 28, 2026 at 10:02:09AM -0700, Song Liu wrote:
> > On Fri, Aug 28, 2026 at 5:53 AM Petr Mladek <pmladek@xxxxxxxx> wrote:
> > >
> > > klp_free_object_loaded() is supposed to clear changes made by
> > > klp_init_object_loaded(). It should call klp_clear_object_relocs()
> > > which is currently defined later.
> > >
> > > Move the code for updating object relocations up.
> > >
> > > This is just a preparation step. No functional changes.
> > >
> > > Signed-off-by: Petr Mladek <pmladek@xxxxxxxx>
> >
> > Do we really need to move them? I think adding a function
> > declaration is cleaner for git log/blame, etc.
>
> Personally I prefer a cleaner end result (put the function where it more
> naturally belongs), though I wouldn't object to combining them into a
> single patch.

Noted. It is indeed a trade-off.

Thanks,
Song