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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <55766C3A.3070101@roeck-us.net>
Date:	Mon, 08 Jun 2015 21:31:54 -0700
From:	Guenter Roeck <linux@...ck-us.net>
To:	Stephan Mueller <smueller@...onox.de>, herbert@...dor.apana.org.au
CC:	Peter Zijlstra 
	<public-peterz-wegcikhe2lqwvfeawa7xhq@...ne.gmane.org>,
	Andy Shevchenko <andy.shevchenko@...il.com>,
	Jim Davis <jim.epost@...il.com>,
	Stephen Rothwell <sfr@...b.auug.org.au>,
	Linux-Next <linux-next@...r.kernel.org>,
	linux-kernel@...r.kernel.org,
	"David S. Miller" <davem@...emloft.net>,
	linux-crypto@...r.kernel.org, Waiman Long <waiman.long@...com>,
	Ingo Molnar <mingo@...nel.org>, x86 <x86@...nel.org>
Subject: Re: [PATCH] crypto: drbg - use pragmas for disabling optimization

On 06/08/2015 07:08 PM, Stephan Mueller wrote:
> Hi,
>
> I performed measurements of the upper and lower boundary of the minimum and
> Shannon entropy for the RNG before the patch and after the patch. The values
> are very similar which demonstrates that the change does not affect the
> cryptographic characteristics of the RNG.
>
> The tests are available at:
>
> [1] shows the lower boundary of the fully non-optimized RNG
>
> [2] shows the lower boundary of the RNG with the patch below
>
> [3] shows the upper boundary of the fully non-optimized RNG
>
> [4] shows the upper boundary of the RNG with the patch below
>
> The pictures are fully explained in [5], but the key values are the minimum
> and Shannon entropy numbers in the legend of the graphs.
>
> [1] http://www.eperm.de/userspace-foldtime-testO0.data-single-time-dist-delta-3036-hist.pdf
>
> [2] http://www.eperm.de/userspace-foldtime-test-pragmas-O2.data-single-time-dist-delta-2370-hist.pdf
>
> [3] http://www.eperm.de/userspace-foldtime-testO0.data-varying-time-dist-delta-7302-hist.pdf
>
> [4] http://www.eperm.de/userspace-foldtime-test-pragmas-O2.data-varying-time-dist-delta-7055-hist.pdf
>
> [5] http://www.chronox.de/jent/doc/CPU-Jitter-NPTRNG.pdf
>
> ---8<---
> Replace the global -O0 compiler flag from the Makefile with GCC
> pragmas to mark only the functions required to be compiled without
> optimizations.
>
> This patch also adds a comment describing the rationale for the
> functions chosen to be compiled without optimizations.
>
> Signed-off-by: Stephan Mueller <smueller@...onox.de>

With openrisc, I get:

   CC [M]  crypto/jitterentropy.o
crypto/jitterentropy.c:266:9: warning: #pragma GCC target is not supported for this machine

which may not be perfect, but is better than a compile error ;-).

nios2 still fails to build with

ERROR: "get_cycles" [crypto/jitterentropy.ko] undefined!

Guenter



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ