[PATCH 15/33] powerpc: Fix ABIv2 issues with stack offsets in assembly code

Philippe Bergheaud felix at linux.vnet.ibm.com
Wed Apr 2 00:54:18 EST 2014


Anton Blanchard wrote:
> diff --git a/arch/powerpc/lib/memcpy_64.S b/arch/powerpc/lib/memcpy_64.S
> index 72ad055..01da956 100644
> --- a/arch/powerpc/lib/memcpy_64.S
> +++ b/arch/powerpc/lib/memcpy_64.S
> @@ -12,7 +12,7 @@
>  	.align	7
>  _GLOBAL(memcpy)
>  BEGIN_FTR_SECTION
> -	std	r3,48(r1)	/* save destination pointer for return value */
> +	std	r3,STK_PARAM(R3)(r1)	/* save destination pointer for return value */
>  FTR_SECTION_ELSE
>  #ifndef SELFTEST
>  	b	memcpy_power7

This chunk is rejected when applied to linux-3.14, because of the reference to SELTEST.
The last three context lines should rather read:

  FTR_SECTION_ELSE
  	b	memcpy_power7
  ALT_FTR_SECTION_END_IFCLR(CPU_FTR_VMX_COPY)

Same issue with [PATCH 16/33] powerpc: Fix unsafe accesses to parameter area in ELFv2.

Philippe



More information about the Linuxppc-dev mailing list