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: <ZtSuO2Bzbo5wL9se@zx2c4.com>
Date: Sun, 1 Sep 2024 20:11:07 +0200
From: "Jason A. Donenfeld" <Jason@...c4.com>
To: Christophe Leroy <christophe.leroy@...roup.eu>
Cc: Shuah Khan <shuah@...nel.org>, linux-kernel@...r.kernel.org,
	linuxppc-dev@...ts.ozlabs.org, linux-kselftest@...r.kernel.org
Subject: Re: [PATCH] selftests: vDSO: Build vDSO tests with O2 optimisation

On Sun, Sep 01, 2024 at 07:24:03PM +0200, Christophe Leroy wrote:
> Without -O2, the generated code for testing chacha function is awful.
> GCC even implements rol32() as a function instead of just using the
> rotlwi instruction, that function is 20 instructions long.
> 
> 	~# time ./vdso_test_chacha
> 	TAP version 13
> 	1..1
> 	ok 1 chacha: PASS
> 	real    0m 37.16s
> 	user    0m 36.89s
> 	sys     0m 0.26s
> 
> Several other selftests directory add -O2, and the kernel is also
> always built with optimisation active. Do the same for vDSO selftests.
> 
> With this patch the time is reduced by approx 15%.
> 
> 	~# time ./vdso_test_chacha
> 	TAP version 13
> 	1..1
> 	ok 1 chacha: PASS
> 	real    0m 32.09s
> 	user    0m 31.86s
> 	sys     0m 0.22s
> 

Seems reasonable. I'll queue it up.

Thanks.

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ