Re: [PATCH 2/2] powerpc/module_64: Fix "expected nop" error on module re-patching

2023-01-27 Thread Miroslav Benes
On Tue, 24 Jan 2023, Josh Poimboeuf wrote: > When a module with a livepatched function is unloaded and then reloaded, > klp attempts to dynamically re-patch it. On ppc64, that fails with the > following error: > > module_64: livepatch_nfsd: Expected nop after call, got e8410018 at >

Re: [PATCH 2/2] powerpc/module_64: Fix "expected nop" error on module re-patching

2023-01-25 Thread Song Liu
On Wed, Jan 25, 2023 at 10:53 AM Josh Poimboeuf wrote: > > On Wed, Jan 25, 2023 at 09:36:02AM -0800, Song Liu wrote: > > On Wed, Jan 25, 2023 at 8:46 AM Josh Poimboeuf wrote: > > > > > > On Tue, Jan 24, 2023 at 10:09:56PM -0800, Song Liu wrote: > > > > > @@ -514,9 +515,18 @@ static int

Re: [PATCH 2/2] powerpc/module_64: Fix "expected nop" error on module re-patching

2023-01-25 Thread Josh Poimboeuf
On Wed, Jan 25, 2023 at 09:36:02AM -0800, Song Liu wrote: > On Wed, Jan 25, 2023 at 8:46 AM Josh Poimboeuf wrote: > > > > On Tue, Jan 24, 2023 at 10:09:56PM -0800, Song Liu wrote: > > > > @@ -514,9 +515,18 @@ static int restore_r2(const char *name, u32 > > > > *instruction, struct module *me) >

Re: [PATCH 2/2] powerpc/module_64: Fix "expected nop" error on module re-patching

2023-01-25 Thread Song Liu
On Wed, Jan 25, 2023 at 8:46 AM Josh Poimboeuf wrote: > > On Tue, Jan 24, 2023 at 10:09:56PM -0800, Song Liu wrote: > > > @@ -514,9 +515,18 @@ static int restore_r2(const char *name, u32 > > > *instruction, struct module *me) > > > if

Re: [PATCH 2/2] powerpc/module_64: Fix "expected nop" error on module re-patching

2023-01-25 Thread Josh Poimboeuf
On Tue, Jan 24, 2023 at 10:09:56PM -0800, Song Liu wrote: > > @@ -514,9 +515,18 @@ static int restore_r2(const char *name, u32 > > *instruction, struct module *me) > > if (!instr_is_relative_link_branch(ppc_inst(*prev_insn))) > > return 0; > > > > - if (*instruction

Re: [PATCH 2/2] powerpc/module_64: Fix "expected nop" error on module re-patching

2023-01-25 Thread Petr Mladek
On Tue 2023-01-24 19:38:05, Josh Poimboeuf wrote: > When a module with a livepatched function is unloaded and then reloaded, > klp attempts to dynamically re-patch it. On ppc64, that fails with the > following error: > > module_64: livepatch_nfsd: Expected nop after call, got e8410018 at >

Re: [PATCH 2/2] powerpc/module_64: Fix "expected nop" error on module re-patching

2023-01-24 Thread Song Liu
On Tue, Jan 24, 2023 at 7:38 PM Josh Poimboeuf wrote: > > When a module with a livepatched function is unloaded and then reloaded, > klp attempts to dynamically re-patch it. On ppc64, that fails with the > following error: > > module_64: livepatch_nfsd: Expected nop after call, got e8410018 at

[PATCH 2/2] powerpc/module_64: Fix "expected nop" error on module re-patching

2023-01-24 Thread Josh Poimboeuf
When a module with a livepatched function is unloaded and then reloaded, klp attempts to dynamically re-patch it. On ppc64, that fails with the following error: module_64: livepatch_nfsd: Expected nop after call, got e8410018 at e_show+0x60/0x548 [livepatch_nfsd] livepatch: failed to