qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 2/4] pc-bios/s390-ccw: Provide space for initial stack fra


From: Eric Farman
Subject: Re: [PATCH v2 2/4] pc-bios/s390-ccw: Provide space for initial stack frame in start.S
Date: Tue, 27 Jun 2023 06:02:52 -0400
User-agent: Evolution 3.48.3 (3.48.3-1.fc38)

On Tue, 2023-06-27 at 11:14 +0200, Philippe Mathieu-Daudé wrote:
> On 27/6/23 10:26, Marc Hartmayer wrote:
> > Thomas Huth <thuth@redhat.com> writes:
> > 
> > > Providing the space of a stack frame is the duty of the caller,
> > > so we should reserve 160 bytes before jumping into the main
> > > function.
> > > Otherwise the main() function might write past the stack array.
> > > 
> > > While we're at it, add a proper STACK_SIZE macro for the stack
> > > size
> > > instead of using magic numbers (this is also required for the
> > > following
> > > patch).
> > > 
> > > Reviewed-by: Christian Borntraeger <borntraeger@linux.ibm.com>
> > > Reviewed-by: Cédric Le Goater <clg@redhat.com>
> > > Signed-off-by: Thomas Huth <thuth@redhat.com>
> > > ---
> > >   pc-bios/s390-ccw/start.S | 4 +++-
> > >   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> 
> > > +#define STACK_SIZE 0x8000
> > > +
> > >       .globl _start
> > >   _start:
> > >   
> > > -    larl    %r15,stack + 0x8000     /* Set up stack */
> > > +    larl    %r15,stack + STACK_SIZE - 160   /* Set up stack */
> >                                           ^^^
> >                                           You can also add a macro
> > for this
> >                                           - e.g. STACK_FRAME_SIZE.
> 
> Yes please :) No need to respin.
> 
> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> 
> > Besides that,
> > Reviewed-by: Marc Hartmayer <mhartmay@linux.ibm.com>
> =

Ditto :)

Reviewed-by: Eric Farman <farman@linux.ibm.com>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]