Thread (39 messages) 39 messages, 4 authors, 2020-04-29

Re: [PATCH v6 11/28] powerpc: Use a datatype for instructions

From: Alistair Popple <hidden>
Date: 2020-04-29 02:04:37
Subsystem: linux for powerpc (32-bit and 64-bit), the rest · Maintainers: Madhavan Srinivasan, Michael Ellerman, Linus Torvalds

Hi Jordan,

I needed the below fix for building with CONFIG_STRICT_KERNEL_RWX enabled. 
Hopefully it's correct, I have not yet had a chance to test it beyond building 
it.

- Alistair

---
 arch/powerpc/lib/code-patching.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/lib/code-patching.c b/arch/powerpc/lib/code-
patching.c
index ad5754c5f007..a8c8ffdb1ccd 100644
--- a/arch/powerpc/lib/code-patching.c
+++ b/arch/powerpc/lib/code-patching.c
@@ -166,8 +166,8 @@ static int do_patch_instruction(struct ppc_inst *addr, 
struct ppc_inst instr)
 		goto out;
 	}
 
-	patch_addr = (unsigned int *)(text_poke_addr) +
-			((kaddr & ~PAGE_MASK) / sizeof(unsigned int));
+	patch_addr = (struct ppc_inst *)(text_poke_addr) +
+		((kaddr & ~PAGE_MASK) / sizeof(unsigned int));
 
 	__patch_instruction(addr, instr, patch_addr);
 
-- 
2.20.1



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