linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Benjamin Gray <bgray@linux.ibm.com>,
	Christophe Leroy <christophe.leroy@csgroup.eu>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH v1 1/3] powerpc/code-patching: Test patch_instructions() during boot
Date: Mon, 18 Mar 2024 13:25:56 +1100	[thread overview]
Message-ID: <87wmq0z363.fsf@mail.lhotse> (raw)
In-Reply-To: <60d38487654911261c1d2f9f8952e0878ab7e071.camel@linux.ibm.com>

Benjamin Gray <bgray@linux.ibm.com> writes:
> On Mon, 2024-03-18 at 08:38 +1100, Benjamin Gray wrote:
>> On Fri, 2024-03-15 at 07:14 +0000, Christophe Leroy wrote:
>> > Le 15/03/2024 à 03:57, Benjamin Gray a écrit :
>> > > 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

  reply	other threads:[~2024-03-18  2:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-15  2:57 [PATCH v1 1/3] powerpc/code-patching: Test patch_instructions() during boot Benjamin Gray
2024-03-15  2:57 ` [PATCH v1 2/3] powerpc/code-patching: Use dedicated memory routines for patching Benjamin Gray
2024-03-15  3:17   ` Benjamin Gray
2024-03-15  6:36   ` Christophe Leroy
2024-03-17 21:42     ` Benjamin Gray
2024-03-15  2:57 ` [PATCH v1 3/3] powerpc/code-patching: Optimise patch_memcpy() to 4 byte chunks Benjamin Gray
2024-03-15  6:39   ` Christophe Leroy
2024-03-17 21:44     ` Benjamin Gray
2024-03-15  7:14 ` [PATCH v1 1/3] powerpc/code-patching: Test patch_instructions() during boot Christophe Leroy
2024-03-17 21:38   ` Benjamin Gray
2024-03-17 22:23     ` Benjamin Gray
2024-03-18  2:25       ` Michael Ellerman [this message]
2024-03-17 22:24     ` Benjamin Gray

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wmq0z363.fsf@mail.lhotse \
    --to=mpe@ellerman.id.au \
    --cc=bgray@linux.ibm.com \
    --cc=christophe.leroy@csgroup.eu \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).