From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753235AbbFIEcM (ORCPT ); Tue, 9 Jun 2015 00:32:12 -0400 Received: from bh-25.webhostbox.net ([208.91.199.152]:41058 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750814AbbFIEcE (ORCPT ); Tue, 9 Jun 2015 00:32:04 -0400 Message-ID: <55766C3A.3070101@roeck-us.net> Date: Mon, 08 Jun 2015 21:31:54 -0700 From: Guenter Roeck User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Stephan Mueller , herbert@gondor.apana.org.au CC: Peter Zijlstra , Andy Shevchenko , Jim Davis , Stephen Rothwell , Linux-Next , linux-kernel@vger.kernel.org, "David S. Miller" , linux-crypto@vger.kernel.org, Waiman Long , Ingo Molnar , x86 Subject: Re: [PATCH] crypto: drbg - use pragmas for disabling optimization References: <3181127.KGS6GDHCq6@tachyon.chronox.de> In-Reply-To: <3181127.KGS6GDHCq6@tachyon.chronox.de> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated_sender: linux@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: linux@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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