Re: [PATCH] ARM: kernel: Fix interrupted SMC calls

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

 



Hi Russel,

On Mon, Jan 18, 2021 at 04:08:07PM +0000, Russell King - ARM Linux admin wrote:
> On Mon, Jan 18, 2021 at 09:21:53PM +0530, Manivannan Sadhasivam wrote:
> > @@ -27,10 +29,18 @@ UNWIND(	.fnstart)
> >  UNWIND(	.save	{r4-r7})
> >  	ldm	r12, {r4-r7}
> >  	\instr
> > +	mov	r9, r6			// Copy r6 before popping from stack
> >  	pop	{r4-r7}
> >  	ldr	r12, [sp, #(4 * 4)]
> >  	stm	r12, {r0-r3}
> > -	bx	lr
> > +	ldr	r10, [sp, #20]
> > +	cmp	r10, #0
> > +	beq	1f			// No quirk structure
> > +	ldr     r11, [r10, #ARM_SMCCC_QUIRK_ID_OFFS]
> > +	cmp     r11, #ARM_SMCCC_QUIRK_QCOM_A6
> > +	bne	1f			// No quirk present
> > +	str	r9, [r10, #ARM_SMCCC_QUIRK_STATE_OFFS]
> > +1:	bx	lr
> 
> NAK. This patch shows little regard for the C ABI. You are corrupting
> registers that must be preserved. Please find out about the C ABIs
> that are used on ARM.
> 

Sorry, my asm foo is not that great. Should've checked AAPCS. Will fix it in
next revision.

Thanks,
Mani

> Thanks.
> 
> -- 
> RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
> FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux