Re: [PATCH 1/3] powerpc/code-patching: Add generic memory patching

2023-02-09 Thread Benjamin Gray
On Thu, 2023-02-09 at 07:15 +, Christophe Leroy wrote: > > +static inline int patch_uint(u32 *addr, unsigned int val) > > +{ > > +   return patch_instruction(addr, ppc_inst(val)); > > Would it make more sense that patch_instruction() calls patch_uint() > instead of the reverse ? > That'

Re: [PATCH 1/3] powerpc/code-patching: Add generic memory patching

2023-02-08 Thread Christophe Leroy
Le 07/02/2023 à 02:56, Benjamin Gray a écrit : > patch_instruction() is designed for patching instructions in otherwise > readonly memory. Other consumers also sometimes need to patch readonly > memory, so have abused patch_instruction() for arbitrary data patches. > > This is a problem on ppc64

[PATCH 1/3] powerpc/code-patching: Add generic memory patching

2023-02-06 Thread Benjamin Gray
patch_instruction() is designed for patching instructions in otherwise readonly memory. Other consumers also sometimes need to patch readonly memory, so have abused patch_instruction() for arbitrary data patches. This is a problem on ppc64 as patch_instruction() decides on the patch width using th