From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756523AbbCRRlp (ORCPT ); Wed, 18 Mar 2015 13:41:45 -0400 Received: from imap.thunk.org ([74.207.234.97]:47485 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755319AbbCRRlm (ORCPT ); Wed, 18 Mar 2015 13:41:42 -0400 Date: Wed, 18 Mar 2015 13:41:36 -0400 From: "Theodore Ts'o" To: Hannes Frederic Sowa Cc: Daniel Borkmann , Stephan Mueller , mancha , linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, herbert@gondor.apana.org.au, dborkman@redhat.com Subject: Re: [BUG/PATCH] kernel RNG and its secrets Message-ID: <20150318174136.GD5663@thunk.org> Mail-Followup-To: Theodore Ts'o , Hannes Frederic Sowa , Daniel Borkmann , Stephan Mueller , mancha , linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, herbert@gondor.apana.org.au, dborkman@redhat.com References: <20150318095345.GA12923@zoho.com> <1712478.ujdQuuIYol@tauon> <1426681147.2164835.241982149.0C3DD661@webmail.messagingengine.com> <1867652.j97RWRfxn1@tauon> <550972A7.9030100@iogearbox.net> <1426691374.2212055.242060697.4DDF89CA@webmail.messagingengine.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1426691374.2212055.242060697.4DDF89CA@webmail.messagingengine.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on imap.thunk.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Maybe we should add a kernel self-test that automatically checks whether or not memset_explicit() gets optimized away? Otherwise we might not notice when gcc or how we implement barrier() or whatever else we end up using ends up changing. It shold be something that is really fast, so it might be a good idea to simply automatically run it as part of an __initcall() unconditionally. We can debate where the __initcall() lives, but I'd prefer that it be run even if the crypto layer isn't configured for some reason. Hopefully such an self-test is small enough that the kernel bloat people won't complain. :-) -Ted