lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210118175042.GA20457@thinkpad>
Date:   Mon, 18 Jan 2021 23:20:42 +0530
From:   Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
To:     Russell King - ARM Linux admin <linux@...linux.org.uk>
Cc:     will@...nel.org, linux-arm-msm@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        bjorn.andersson@...aro.org
Subject: Re: [PATCH] ARM: kernel: Fix interrupted SMC calls

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!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ