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: <3236e24d-4800-44e1-99de-4e8d0d204daa@csgroup.eu>
Date: Wed, 27 Aug 2025 19:15:45 +0200
From: Christophe Leroy <christophe.leroy@...roup.eu>
To: Mathieu Malaterre <malat@...ian.org>
Cc: linux-kernel@...r.kernel.org, Joel Stanley <joel@....id.au>,
 linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH] powerpc/lib/xor_vmx: Relax frame size for clang



Le 21/06/2019 à 10:58, Mathieu Malaterre a écrit :
> When building with clang-8 the frame size limit is hit:
> 
>    ../arch/powerpc/lib/xor_vmx.c:119:6: error: stack frame size of 1200 bytes in function '__xor_altivec_5' [-Werror,-Wframe-larger-than=]
> 
> Follow the same approach as commit 9c87156cce5a ("powerpc/xmon: Relax
> frame size for clang") until a proper fix is implemented upstream in
> clang and relax requirement for clang.
> 
> Link: https://github.com/ClangBuiltLinux/linux/issues/563
> Cc: Joel Stanley <joel@....id.au>
> Signed-off-by: Mathieu Malaterre <malat@...ian.org>

Apparently the problem is gone with recent versions of clang, frame size 
is 16.

000001b0 <__xor_altivec_5>:
  1b0:	94 21 ff f0 	stwu    r1,-16(r1)
  1b4:	93 c1 00 08 	stw     r30,8(r1)
  1b8:	54 63 d1 be 	srwi    r3,r3,6
  1bc:	39 20 00 00 	li      r9,0
  1c0:	39 40 00 10 	li      r10,16
  1c4:	39 60 00 20 	li      r11,32
  1c8:	7c 69 03 a6 	mtctr   r3
  1cc:	38 60 00 30 	li      r3,48
  1d0:	7c 44 48 ce 	lvx     v2,r4,r9
  1d4:	7d 84 4a 14 	add     r12,r4,r9
  1d8:	7c 65 48 ce 	lvx     v3,r5,r9
  1dc:	7f c5 4a 14 	add     r30,r5,r9
  1e0:	7c 86 48 ce 	lvx     v4,r6,r9
  1e4:	7c a7 48 ce 	lvx     v5,r7,r9
  1e8:	10 43 14 c4 	vxor    v2,v3,v2
  1ec:	7c 2c 50 ce 	lvx     v1,r12,r10
  1f0:	10 42 24 c4 	vxor    v2,v2,v4
  1f4:	7d 1e 50 ce 	lvx     v8,r30,r10
  1f8:	10 42 2c c4 	vxor    v2,v2,v5
  1fc:	7d 3e 58 ce 	lvx     v9,r30,r11
  200:	7d 5e 18 ce 	lvx     v10,r30,r3
  204:	7f c6 4a 14 	add     r30,r6,r9
  208:	7c 08 48 ce 	lvx     v0,r8,r9
  20c:	10 68 0c c4 	vxor    v3,v8,v1
  210:	7c cc 58 ce 	lvx     v6,r12,r11
  214:	7c ec 18 ce 	lvx     v7,r12,r3
  218:	10 42 04 c4 	vxor    v2,v2,v0
  21c:	7d 7e 50 ce 	lvx     v11,r30,r10
  220:	10 29 34 c4 	vxor    v1,v9,v6
  224:	7d 9e 58 ce 	lvx     v12,r30,r11
  228:	10 aa 3c c4 	vxor    v5,v10,v7
  22c:	7d be 18 ce 	lvx     v13,r30,r3
  230:	7f c7 4a 14 	add     r30,r7,r9
  234:	7d de 50 ce 	lvx     v14,r30,r10
  238:	10 63 5c c4 	vxor    v3,v3,v11
  23c:	10 21 64 c4 	vxor    v1,v1,v12
  240:	7d fe 58 ce 	lvx     v15,r30,r11
  244:	7e 1e 18 ce 	lvx     v16,r30,r3
  248:	7f c8 4a 14 	add     r30,r8,r9
  24c:	7e 3e 50 ce 	lvx     v17,r30,r10
  250:	10 63 74 c4 	vxor    v3,v3,v14
  254:	7e 5e 58 ce 	lvx     v18,r30,r11
  258:	7c 9e 18 ce 	lvx     v4,r30,r3
  25c:	10 63 8c c4 	vxor    v3,v3,v17
  260:	7c 44 49 ce 	stvx    v2,r4,r9
  264:	10 45 6c c4 	vxor    v2,v5,v13
  268:	10 a1 7c c4 	vxor    v5,v1,v15
  26c:	39 29 00 40 	addi    r9,r9,64
  270:	10 42 84 c4 	vxor    v2,v2,v16
  274:	7c 6c 51 ce 	stvx    v3,r12,r10
  278:	10 65 94 c4 	vxor    v3,v5,v18
  27c:	10 42 24 c4 	vxor    v2,v2,v4
  280:	7c 6c 59 ce 	stvx    v3,r12,r11
  284:	7c 4c 19 ce 	stvx    v2,r12,r3
  288:	42 00 ff 48 	bdnz    1d0 <__xor_altivec_5+0x20>
  28c:	83 c1 00 08 	lwz     r30,8(r1)
  290:	38 21 00 10 	addi    r1,r1,16
  294:	4e 80 00 20 	blr

Christophe

> ---
>   arch/powerpc/lib/Makefile | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile
> index c55f9c27bf79..b3f7d64caaf0 100644
> --- a/arch/powerpc/lib/Makefile
> +++ b/arch/powerpc/lib/Makefile
> @@ -58,5 +58,9 @@ obj-$(CONFIG_FTR_FIXUP_SELFTEST) += feature-fixups-test.o
>   
>   obj-$(CONFIG_ALTIVEC)	+= xor_vmx.o xor_vmx_glue.o
>   CFLAGS_xor_vmx.o += -maltivec $(call cc-option,-mabi=altivec)
> +ifdef CONFIG_CC_IS_CLANG
> +# See https://github.com/ClangBuiltLinux/linux/issues/563
> +CFLAGS_xor_vmx.o += -Wframe-larger-than=4096
> +endif
>   
>   obj-$(CONFIG_PPC64) += $(obj64-y)


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ