Re: [PATCH v2 1/3] Add the latent_entropy gcc plugin

2016-06-14 Thread Emese Revfy
On Tue, 14 Jun 2016 11:27:00 -0700 Kees Cook wrote: > On Mon, Jun 13, 2016 at 2:49 PM, Emese Revfy wrote: > > On Thu, 9 Jun 2016 14:51:45 -0700 > > Kees Cook wrote: > > >> > + * gcc plugin to help generate a little bit of entropy from program > >> > state, > >> > + * used throughout the uptime

Re: [PATCH v2 1/3] Add the latent_entropy gcc plugin

2016-06-14 Thread Kees Cook
On Mon, Jun 13, 2016 at 2:49 PM, Emese Revfy wrote: > On Thu, 9 Jun 2016 14:51:45 -0700 > Kees Cook wrote: > >> On Mon, May 30, 2016 at 4:31 PM, Emese Revfy wrote: >> > - GCC_PLUGINS_CFLAGS := $(addprefix >> > -fplugin=$(objtree)/scripts/gcc-plugins/, $(gcc-plugin-y)) >> > + GCC_PLUGINS_CFLAG

Re: [PATCH v2 1/3] Add the latent_entropy gcc plugin

2016-06-13 Thread Emese Revfy
On Thu, 9 Jun 2016 14:51:45 -0700 Kees Cook wrote: > On Mon, May 30, 2016 at 4:31 PM, Emese Revfy wrote: > > - GCC_PLUGINS_CFLAGS := $(addprefix > > -fplugin=$(objtree)/scripts/gcc-plugins/, $(gcc-plugin-y)) > > + GCC_PLUGINS_CFLAGS := $(strip $(addprefix > > -fplugin=$(objtree)/scripts/gcc-

Re: [PATCH v2 1/3] Add the latent_entropy gcc plugin

2016-06-09 Thread Kees Cook
On Mon, May 30, 2016 at 4:31 PM, Emese Revfy wrote: > This plugin mitigates the problem of the kernel having too little entropy > during > and after boot for generating crypto keys. > > It creates a local variable in every marked function. The value of this > variable is > modified by randomly c

Re: [kernel-hardening] Re: [PATCH v2 1/3] Add the latent_entropy gcc plugin

2016-06-09 Thread Kees Cook
On Thu, Jun 9, 2016 at 12:55 PM, Theodore Ts'o wrote: > On Thu, Jun 09, 2016 at 07:22:29PM +0200, PaX Team wrote: >> > Well, the attacker can't control when the interrupts happen, but it >> > could try to burn power by simply having a thread spin in an infinite >> > loop ("0: jmp 0"), sure. >> >>

Re: [kernel-hardening] Re: [PATCH v2 1/3] Add the latent_entropy gcc plugin

2016-06-09 Thread Theodore Ts'o
On Thu, Jun 09, 2016 at 07:22:29PM +0200, PaX Team wrote: > > Well, the attacker can't control when the interrupts happen, but it > > could try to burn power by simply having a thread spin in an infinite > > loop ("0: jmp 0"), sure. > > yes, that's one obvious way to accomplish it but even normal

Re: [kernel-hardening] Re: [PATCH v2 1/3] Add the latent_entropy gcc plugin

2016-06-09 Thread PaX Team
On 7 Jun 2016 at 9:58, Theodore Ts'o wrote: > On Tue, Jun 07, 2016 at 02:19:14PM +0200, PaX Team wrote: > > (i believe that) latent entropy is found in more than just interrupt > > timing, there're > > also data dependent computations that can have entropy, either on a single > > system or > > a

Re: [kernel-hardening] Re: [PATCH v2 1/3] Add the latent_entropy gcc plugin

2016-06-07 Thread Theodore Ts'o
On Tue, Jun 07, 2016 at 02:19:14PM +0200, PaX Team wrote: > (i believe that) latent entropy is found in more than just interrupt timing, > there're > also data dependent computations that can have entropy, either on a single > system or > across a population of them. It's not clear how much data

Re: [kernel-hardening] Re: [PATCH v2 1/3] Add the latent_entropy gcc plugin

2016-06-07 Thread PaX Team
On 6 Jun 2016 at 19:13, Theodore Ts'o wrote: > On Mon, Jun 06, 2016 at 09:30:12PM +0200, PaX Team wrote: > > > > what matters for latent entropy is not the actual values fed into the > > entropy > > pool (they're effectively compile time constants save for runtime data > > dependent > > computa

Re: [kernel-hardening] Re: [PATCH v2 1/3] Add the latent_entropy gcc plugin

2016-06-06 Thread Theodore Ts'o
On Mon, Jun 06, 2016 at 09:30:12PM +0200, PaX Team wrote: > > what matters for latent entropy is not the actual values fed into the entropy > pool (they're effectively compile time constants save for runtime data > dependent > computations) but the precise sequence of them. interrupts stir this s

Re: [kernel-hardening] Re: [PATCH v2 1/3] Add the latent_entropy gcc plugin

2016-06-06 Thread PaX Team
On 6 Jun 2016 at 7:38, David Brown wrote: > On Fri, Jun 03, 2016 at 07:42:52PM +0200, Emese Revfy wrote: > >On Wed, 1 Jun 2016 12:42:27 -0700 > >Andrew Morton wrote: > > > >> I don't think I'm really understanding. Won't this produce the same > >> value on each and every boot? > > > >No, because

Re: [kernel-hardening] Re: [PATCH v2 1/3] Add the latent_entropy gcc plugin

2016-06-06 Thread Kees Cook
On Mon, Jun 6, 2016 at 6:38 AM, David Brown wrote: > On Fri, Jun 03, 2016 at 07:42:52PM +0200, Emese Revfy wrote: >> >> On Wed, 1 Jun 2016 12:42:27 -0700 >> Andrew Morton wrote: >> >>> On Tue, 31 May 2016 01:31:45 +0200 Emese Revfy >>> wrote: >>> >>> > This plugin mitigates the problem of the ke

Re: [kernel-hardening] Re: [PATCH v2 1/3] Add the latent_entropy gcc plugin

2016-06-06 Thread David Brown
On Fri, Jun 03, 2016 at 07:42:52PM +0200, Emese Revfy wrote: On Wed, 1 Jun 2016 12:42:27 -0700 Andrew Morton wrote: On Tue, 31 May 2016 01:31:45 +0200 Emese Revfy wrote: > This plugin mitigates the problem of the kernel having too little entropy during > and after boot for generating crypto

Re: [PATCH v2 1/3] Add the latent_entropy gcc plugin

2016-06-03 Thread Emese Revfy
On Wed, 1 Jun 2016 12:42:27 -0700 Andrew Morton wrote: > On Tue, 31 May 2016 01:31:45 +0200 Emese Revfy wrote: > > > This plugin mitigates the problem of the kernel having too little entropy > > during > > and after boot for generating crypto keys. > > > > It creates a local variable in every

Re: [PATCH v2 1/3] Add the latent_entropy gcc plugin

2016-06-01 Thread Andrew Morton
On Tue, 31 May 2016 01:31:45 +0200 Emese Revfy wrote: > This plugin mitigates the problem of the kernel having too little entropy > during > and after boot for generating crypto keys. > > It creates a local variable in every marked function. The value of this > variable is > modified by random

[PATCH v2 1/3] Add the latent_entropy gcc plugin

2016-05-30 Thread Emese Revfy
This plugin mitigates the problem of the kernel having too little entropy during and after boot for generating crypto keys. It creates a local variable in every marked function. The value of this variable is modified by randomly chosen operations (add, xor and rol) and random values (gcc generate