Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1512675

Re: [PATCH] [ARM] Fix stack alignment when processing backtraces

From Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Newsgroups linux.kernel
Subject Re: [PATCH] [ARM] Fix stack alignment when processing backtraces
Date 2016-10-31 17:30 +0100
Message-ID <synDb-4Pf-19@gated-at.bofh.it> (permalink)
References <stG3L-4JB-11@gated-at.bofh.it> <sygBH-8tq-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Oct 31, 2016 at 08:51:26AM +0000, Russell King - ARM Linux wrote:

> > -.Ldumpstm:	stmfd	sp!, {instr, reg, stack, r7, lr}
> > +	        /* Must maintain 8 byte stack alignment */
> > +.Ldumpstm:	stmfd	sp!, {r3, instr, reg, stack, r7, lr}
> >  		mov	stack, r0
> >  		mov	instr, r1
> >  		mov	reg, #10
> > @@ -140,7 +141,7 @@ ENDPROC(c_backtrace)
> >  		teq	r7, #0
> >  		adrne	r0, .Lcr
> >  		blne	printk
> > -		ldmfd	sp!, {instr, reg, stack, r7, pc}
> > +		ldmfd	sp!, {r3, instr, reg, stack, r7, pc}
> 
> I'd prefer r8 to get used rather than r3, as it makes it look like
> r3 is somehow required to be preserved when that's not the case.
> Makes the code slightly more difficult to understand.

Sure, I will change that and send it to your tracker.

Thanks,
Jason

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH] [ARM] Fix stack alignment when processing backtraces Russell King - ARM Linux <linux@armlinux.org.uk> - 2016-10-31 10:00 +0100
  Re: [PATCH] [ARM] Fix stack alignment when processing backtraces Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2016-10-31 17:30 +0100

csiph-web