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

From: Emese Revfy
Date: Tue May 24 2016 - 17:16:32 EST


On Tue, 24 May 2016 10:32:15 -0700
Kees Cook <keescook@xxxxxxxxxxxx> 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