From: Guenter Roeck <linux@roeck-us.net>
To: Stephan Mueller <smueller@chronox.de>, herbert@gondor.apana.org.au
Cc: Peter Zijlstra
<public-peterz-wegcikhe2lqwvfeawa7xhq@plane.gmane.org>,
Andy Shevchenko <andy.shevchenko@gmail.com>,
Jim Davis <jim.epost@gmail.com>,
Stephen Rothwell <sfr@canb.auug.org.au>,
Linux-Next <linux-next@vger.kernel.org>,
linux-kernel@vger.kernel.org,
"David S. Miller" <davem@davemloft.net>,
linux-crypto@vger.kernel.org, Waiman Long <waiman.long@hp.com>,
Ingo Molnar <mingo@kernel.org>, x86 <x86@kernel.org>
Subject: Re: [PATCH] crypto: drbg - use pragmas for disabling optimization
Date: Mon, 08 Jun 2015 21:31:54 -0700 [thread overview]
Message-ID: <55766C3A.3070101@roeck-us.net> (raw)
In-Reply-To: <3181127.KGS6GDHCq6@tachyon.chronox.de>
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@chronox.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
next prev parent reply other threads:[~2015-06-09 4:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-09 2:08 [PATCH] crypto: drbg - use pragmas for disabling optimization Stephan Mueller
2015-06-09 3:22 ` Stephen Rothwell
2015-06-09 4:31 ` Guenter Roeck [this message]
2015-06-09 4:46 ` nios2: Export get_cycles Herbert Xu
2015-06-09 5:19 ` Stephen Rothwell
2015-06-09 5:50 ` Herbert Xu
2015-06-09 14:35 ` [PATCH] crypto: drbg - use pragmas for disabling optimization Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55766C3A.3070101@roeck-us.net \
--to=linux@roeck-us.net \
--cc=andy.shevchenko@gmail.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=jim.epost@gmail.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=public-peterz-wegcikhe2lqwvfeawa7xhq@plane.gmane.org \
--cc=sfr@canb.auug.org.au \
--cc=smueller@chronox.de \
--cc=waiman.long@hp.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox