|
Message-Id: <20160615003121.008b63c8152aa60c9c351530@gmail.com> Date: Wed, 15 Jun 2016 00:31:21 +0200 From: Emese Revfy <re.emese@...il.com> To: Kees Cook <keescook@...omium.org> Cc: "kernel-hardening@...ts.openwall.com" <kernel-hardening@...ts.openwall.com>, PaX Team <pageexec@...email.hu>, Brad Spengler <spender@...ecurity.net>, Michal Marek <mmarek@...e.com>, LKML <linux-kernel@...r.kernel.org>, Masahiro Yamada <yamada.masahiro@...ionext.com>, linux-kbuild <linux-kbuild@...r.kernel.org>, "Theodore Ts'o" <tytso@....edu>, Andrew Morton <akpm@...ux-foundation.org>, Linux-MM <linux-mm@...ck.org>, Jens Axboe <axboe@...nel.dk>, Al Viro <viro@...iv.linux.org.uk>, Paul McKenney <paulmck@...ux.vnet.ibm.com>, Ingo Molnar <mingo@...hat.com>, Thomas Gleixner <tglx@...utronix.de>, bart.vanassche@...disk.com, "David S. Miller" <davem@...emloft.net> Subject: Re: [PATCH v2 1/3] Add the latent_entropy gcc plugin On Tue, 14 Jun 2016 11:27:00 -0700 Kees Cook <keescook@...omium.org> wrote: > On Mon, Jun 13, 2016 at 2:49 PM, Emese Revfy <re.emese@...il.com> wrote: > > On Thu, 9 Jun 2016 14:51:45 -0700 > > Kees Cook <keescook@...omium.org> wrote: > > >> > + * gcc plugin to help generate a little bit of entropy from program state, > >> > + * used throughout the uptime of the kernel > >> > >> I think this comment needs a lot of expanding. What are all the ways > >> that this plugin makes changes to code? Things I think I see are: > >> pre-filling data variables with randomness, creating a local_entropy > >> variable (local to what?), mixing stack pointer (into what?), updating > >> latent_entropy global. > > > > I demonstrated the details here: > > https://github.com/ephox-gcc-plugins/latent_entropy/commit/049acd9f478d47ee6526d8e93ab8cfcc3ff91b13 > > That helps, thanks. Can you also mention how __latent_entropy changes > non-functions? (i.e. initializes them with random data.) > > Also, I think this isn't accurate: > > * local_entropy ^= get_random_long(); > > Looking at the disassembly, it seems that static random values (i.e. > randomly chosen at gcc runtime) are added, rather than making calls to > the kernel's get_random_long() function. The plugin doesn't insert calls to the kernel's get_random_long(). That was just an example (the plugin instrumentation would look like this in the kernel). I rewrote these calls to a random constant. -- Emese
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.