From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755549AbcEXVQa (ORCPT ); Tue, 24 May 2016 17:16:30 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:35582 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751497AbcEXVQZ (ORCPT ); Tue, 24 May 2016 17:16:25 -0400 Date: Tue, 24 May 2016 23:23:24 +0200 From: Emese Revfy To: Kees Cook Cc: "kernel-hardening@lists.openwall.com" , PaX Team , Brad Spengler , Michal Marek , LKML , Masahiro Yamada , linux-kbuild , "Theodore Ts'o" , Andrew Morton , Linux-MM , Jens Axboe , Al Viro , Paul McKenney , Ingo Molnar , Thomas Gleixner , bart.vanassche@sandisk.com, "David S. Miller" Subject: Re: [PATCH v1 1/3] Add the latent_entropy gcc plugin Message-Id: <20160524232324.45fbcf77916866f30b0d6cec@gmail.com> In-Reply-To: References: <20160524001405.3e6abd1d5a63a871cc366cff@gmail.com> <20160524001529.0e69232eff0b1b5bc566a763@gmail.com> X-Mailer: Sylpheed 3.5.0 (GTK+ 2.24.30; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 24 May 2016 10:32:15 -0700 Kees Cook wrote: > Also, does this matter that it's non-atomic? It seems like the u64 > below is being written to by multiple threads and even read by > multiple threads. Am I misunderstanding something? The non-atomic accesses are intentional because they can extract more latent entropy from these data races. > > [...] > > new file mode 100644 > > index 0000000..7295c39 > > --- /dev/null > > +++ b/scripts/gcc-plugins/latent_entropy_plugin.c > > I feel like most of the functions in this plugin could use some more > comments about what each one does. I think the important parts are commented (most parts just use the gcc API). Where would you like more comments? -- Emese