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

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

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2024-03-18 02:26:46

Benjamin Gray [off-list ref] writes:
On Mon, 2024-03-18 at 08:38 +1100, Benjamin Gray wrote:
quoted
On Fri, 2024-03-15 at 07:14 +0000, Christophe Leroy wrote:
quoted
Le 15/03/2024 à 03:57, Benjamin Gray a écrit :
quoted
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
Both of those have CONFIG_FRAME_WARN=1024, so should have caught this.

But neither have CONFIG_CODE_PATCHING_SELFTEST=y, so I suspect that's
why you didn't see it.

I recommend ppc32_allmodconfig.

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