From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751735AbcFVUOM (ORCPT ); Wed, 22 Jun 2016 16:14:12 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:60253 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750890AbcFVUOJ (ORCPT ); Wed, 22 Jun 2016 16:14:09 -0400 From: Arnd Bergmann To: y2038@lists.linaro.org Cc: Stephan Mueller , herbert@gondor.apana.org.au, John Stultz , Kees Cook , Alexander Kuleshov , linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, "David S. Miller" Subject: Re: [Y2038] [PATCH v2] crypto: Jitter RNG - use ktime_get_ns as fallback Date: Wed, 22 Jun 2016 22:16:03 +0200 Message-ID: <3682553.NXCjD7b2Nc@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-22-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <2249326.PVY2Dy3CIm@positron.chronox.de> References: <2249326.PVY2Dy3CIm@positron.chronox.de> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:Xgv1CoPUj58v58qMd1jObmIEc+2f5NsqAajFPlzQ5pDzuWGPy2q qj9Ys4zimXa44erpB4ZVwTnEJsrwGnJyEylAQeBQUzL4Mtb7b7mBpwxm1stxOPiggUF3MlH 2HEyMh/eho3uWL1Gqoxr0aRJskxj1MAhyzpvJL6RkPav91AKPUnhvNQ28YFcEgGNvYjjU0e o8+klGrkZqIFwPKn57ubA== X-UI-Out-Filterresults: notjunk:1;V01:K0:YJLoAoT4zVQ=:JyFhVln3z73d1gDAnOvHxS 78msrPrqVkz7R0Chk84IzDRgJRfL6xvDEgmTIiE3IOCb5HpIl+uPLPYuV9i4joMxFnzX7JiFr oT1HeWNBfslOnP8WW15IVeYp++KehuGLRY6rcQCARMe9tc44/5MBb+RP/p9IMbbX4Rcng4JrX Fw/AXcEYSh3ZUOug4gPCWIVNrH2mTGNGpxZVUVP4Q/+iGo8+dtD4v9q6r3sORnGo31DiDxPK1 XBBShGaTcJDzBLqkqdyT9/KQQ3q5DZNGeFTuJm8Hjpqq8iHKYZC/C9utjuh0Gy8iNypHNE3md 36je8UEmqieuP3sWXZvhaEKDZZafgb4fwLqm4h5RvFslGvqoXgJv6SwLx3e9kbcqpn8B5acWD 1WMbHXcau9ZAD17IjQ1ho0xGlR9+QOc9Q5Ds1DfB7PiEx3d3+Qo49fk32GLBFEaRS6N3j3Yfm uRbBSgK6OfIlsh9j7/kOXkmaFqspOqLmaRzYCNnG8EOWmw9HZsKR9awi7FO9Lv7/BBBrMjGTL V+XdRIVA0zJ49YdbZoXwin8NfN94oir3y51i609ALR8JGz2itor/GbxK2v1fWSZX/7HUOdez+ XTEgDRXk3Jo+YFvoDbZyuxdjtX/f9AsrR9Mo7ZO9R6wZJBR/UlVj33EedRy28jUxJbUPfil/S K2BQHPzW64LYAodhIk0IOUIwbTLDWhUjEAnVY08TxiIcCz5TmI/Dw/VWvEj0luATM8+7pySb7 CgwlspJpQeyt3EEE Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday, June 22, 2016 7:26:06 PM CEST Stephan Mueller wrote: > As part of the Y2038 development, __getnstimeofday is not supposed to be > used any more. It is now replaced with ktime_get_ns. The Jitter RNG uses > the time stamp to measure the execution time of a given code path and > tries to detect variations in the execution time. Therefore, the only > requirement the Jitter RNG has, is a sufficient high resolution to > detect these variations. > > The change was tested on x86 to show an identical behavior as RDTSC. The > used test code simply measures the execution time of the heart of the > RNG: > > jent_get_nstime(&time); > jent_memaccess(ec, min); > jent_fold_time(NULL, time, &folded, min); > jent_get_nstime(&time2); > return ((time2 - time)); > > Signed-off-by: Stephan Mueller > --- > Acked-by: Arnd Bergmann