Thread (13 messages) 13 messages, 3 authors, 2024-03-18

Re: [PATCH v1 1/3] powerpc/code-patching: Test patch_instructions() during boot

From: Benjamin Gray <hidden>
Date: 2024-03-17 22:24:33

On Mon, 2024-03-18 at 08:38 +1100, Benjamin Gray wrote:
On Fri, 2024-03-15 at 07:14 +0000, Christophe Leroy wrote:
quoted

Le 15/03/2024 à 03:57, Benjamin Gray a écrit :
quoted
patch_instructions() introduces new behaviour with a couple of
variations. Test each case of

   * a repeated 32-bit instruction,
   * a repeated 64-bit instruction (ppc64), and
   * a copied sequence of instructions

for both on a single page and when it crosses a page boundary.

Signed-off-by: Benjamin Gray <redacted>
---
  arch/powerpc/lib/test-code-patching.c | 92
+++++++++++++++++++++++++++
  1 file changed, 92 insertions(+)
diff --git a/arch/powerpc/lib/test-code-patching.c
b/arch/powerpc/lib/test-code-patching.c
index c44823292f73..35a3756272df 100644
--- a/arch/powerpc/lib/test-code-patching.c
+++ b/arch/powerpc/lib/test-code-patching.c
@@ -347,6 +347,97 @@ static void __init
test_prefixed_patching(void)
  	check(!memcmp(iptr, expected, sizeof(expected)));
  }
  
+static void __init test_multi_instruction_patching(void)
+{
+	u32 code[256];
Build failure:

   CC      arch/powerpc/lib/test-code-patching.o
arch/powerpc/lib/test-code-patching.c: In function 
'test_multi_instruction_patching':
arch/powerpc/lib/test-code-patching.c:439:1: error: the frame size
of
1040 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]
   439 | }
       | ^
cc1: all warnings being treated as errors
make[4]: *** [scripts/Makefile.build:243: 
arch/powerpc/lib/test-code-patching.o] Error 1


I have to avoid big arrays on the stack.
All good, I can do that.

I do run my patches through a couple of 32-bit configs, but I didn't
see this error. Is this a standard config I should be testing with?
Specifically pmac32_defconfig and ppc44x_defconfig
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help