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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20d3df642aaff2a771e74452b81463709f7c16d1.camel@xry111.site>
Date: Thu, 28 Aug 2025 14:46:10 +0800
From: Xi Ruoyao <xry111@...111.site>
To: Wentao Guan <guanwentao@...ontech.com>, chenhuacai@...nel.org
Cc: kernel@...0n.name, linux-kernel@...r.kernel.org,
 loongarch@...ts.linux.dev, 	zhanjun@...ontech.com
Subject: Re: [PATCH] Loongarch: entry: fix syscall_get_arguments() VS
 no-bultin-memcpy

On Tue, 2025-08-26 at 19:32 +0800, Wentao Guan wrote:
> Loongarch use -fno-builtin-memcpy in Makefile,

I still think we should just remove -fno-builtin-memcpy if GCC >= 14. 
There's some wide-spread misunderstanding like "-fno-builtin-memcpy can
stop the compiler from using memcpy for copying small structs" but the
fact is very much contrary to it.

The compiler just uses memcpy for copying the structs of which the size
is larger than a threshold, no matter -fbuiltin-memcpy or not, but with
-fbuiltin-memcpy the compiler can expand some of them into ld/st
sequences, reducing the actual numbers of memcpy calls.

The reason we didn't use -fbuiltin-memcpy is GCC < 14 expands memcpy for
various sizes in a very stupid way, see https://gcc.gnu.org/PR109465.

-- 
Xi Ruoyao <xry111@...111.site>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ