Re: [PATCH] powerpc/module_64: Fix livepatching for RO modules

2021-12-14 Thread Michael Ellerman
On Tue, 23 Nov 2021 18:15:20 +1000, Russell Currey wrote: > Livepatching a loaded module involves applying relocations through > apply_relocate_add(), which attempts to write to read-only memory when > CONFIG_STRICT_MODULE_RWX=y. Work around this by performing these > writes through the text poke

Re: [PATCH] powerpc/module_64: Fix livepatching for RO modules

2021-12-09 Thread Joe Lawrence
On 12/9/21 2:00 AM, Michael Ellerman wrote: > Russell Currey writes: >> On Tue, 2021-12-07 at 09:44 -0500, Joe Lawrence wrote: >>> On 11/23/21 3:15 AM, Russell Currey wrote: >>> >>> [[ cc += livepatching list ]] >>> >>> Hi Russell, >>> >>> Thanks for writing a minimal fix for stable /

Re: [PATCH] powerpc/module_64: Fix livepatching for RO modules

2021-12-08 Thread Michael Ellerman
Russell Currey writes: > On Tue, 2021-12-07 at 09:44 -0500, Joe Lawrence wrote: >> On 11/23/21 3:15 AM, Russell Currey wrote: >> >> [[ cc += livepatching list ]] >> >> Hi Russell, >> >> Thanks for writing a minimal fix for stable / backporting.  As I >> mentioned on the github issue [1], this

Re: [PATCH] powerpc/module_64: Fix livepatching for RO modules

2021-12-07 Thread Russell Currey
On Tue, 2021-12-07 at 09:44 -0500, Joe Lawrence wrote: > On 11/23/21 3:15 AM, Russell Currey wrote: > > [[ cc += livepatching list ]] > > Hi Russell, > > Thanks for writing a minimal fix for stable / backporting.  As I > mentioned on the github issue [1], this avoided the crashes I > reported >

Re: [PATCH] powerpc/module_64: Fix livepatching for RO modules

2021-12-07 Thread Joe Lawrence
On 11/23/21 3:15 AM, Russell Currey wrote: > Livepatching a loaded module involves applying relocations through > apply_relocate_add(), which attempts to write to read-only memory when > CONFIG_STRICT_MODULE_RWX=y. Work around this by performing these > writes through the text poke area by using

[PATCH] powerpc/module_64: Fix livepatching for RO modules

2021-11-23 Thread Russell Currey
Livepatching a loaded module involves applying relocations through apply_relocate_add(), which attempts to write to read-only memory when CONFIG_STRICT_MODULE_RWX=y. Work around this by performing these writes through the text poke area by using patch_instruction(). R_PPC_REL24 is the only