Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934630AbbDJOAL (ORCPT ); Fri, 10 Apr 2015 10:00:11 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:37682 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934596AbbDJOAG (ORCPT ); Fri, 10 Apr 2015 10:00:06 -0400 X-Sasl-enc: Wv88WDOltuBRuZTPyuPJZBdN02CXxaHTMDVmnIhSM/O8 1428674405 Message-ID: <1428674403.3377.4.camel@stressinduktion.org> Subject: Re: [BUG/PATCH] kernel RNG and its secrets From: Hannes Frederic Sowa To: Stephan Mueller Cc: Daniel Borkmann , mancha , tytso@mit.edu, linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, herbert@gondor.apana.org.au, dborkman@redhat.com Date: Fri, 10 Apr 2015 16:00:03 +0200 In-Reply-To: <2792913.x6Cv5ZCyOY@tauon> References: <20150318095345.GA12923@zoho.com> <550959EB.4000304@iogearbox.net> <6407649.tbmT00FeL6@tauon> <2792913.x6Cv5ZCyOY@tauon> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.11 (3.12.11-1.fc21) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1015 Lines: 36 On Fr, 2015-04-10 at 15:25 +0200, Stephan Mueller wrote: > I would like to bring up that topic again as I did some more analyses: > > For testing I used the following code: > > static inline void memset_secure(void *s, int c, size_t n) > { > memset(s, c, n); > BARRIER > } > > where BARRIER is defined as: > > (1) __asm__ __volatile__("" : "=r" (s) : "0" (s)); > > (2) __asm__ __volatile__("": : :"memory"); > > (3) __asm__ __volatile__("" : "=r" (s) : "0" (s) : "memory"); Hm, I wonder a little bit... Could you quickly test if you replace (s) with (n) just for the fun of it? I don't know if we should ask clang people about that, at least it is their goal to be as highly compatible with gcc inline asm. Thanks for looking into this! Bye, Hannes -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/