Thread (11 messages) flat view 11 messages, 3 authors, 2024-02-05

Re: [PATCH v2 2/3] powerpc/64: Convert patch_instruction() to patch_u32()

From: Naveen N Rao <naveen@kernel.org>
Date: 2023-11-30 10:39:34

On Mon, Oct 16, 2023 at 04:01:46PM +1100, Benjamin Gray wrote:
This use of patch_instruction() is working on 32 bit data, and can fail
if the data looks like a prefixed instruction and the extra write
crosses a page boundary. Use patch_u32() to fix the write size.

Fixes: 8734b41b3efe ("powerpc/module_64: Fix livepatching for RO modules")
Link: https://lore.kernel.org/all/20230203004649.1f59dbd4@yea/ (local)
Signed-off-by: Benjamin Gray <redacted>

---

v2: * Added the fixes tag, it seems appropriate even if the subject does
      mention a more robust solution being required.

patch_u64() should be more efficient, but judging from the bug report
it doesn't seem like the data is doubleword aligned.
That doesn't look to be the case anymore due to commits 77e69ee7ce07 
("powerpc/64: modules support building with PCREL addresing") and 
7e3a68be42e1 ("powerpc/64: vmlinux support building with PCREL 
addresing")

- Naveen
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help