lkml.org 
[lkml]   [2015]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [BUG/PATCH] kernel RNG and its secrets
Date
Am Montag, 27. April 2015, 22:34:30 schrieb Daniel Borkmann:

Hi Daniel,

> On 04/27/2015 09:10 PM, Stephan Mueller wrote:
> ...
>
> > I posted the issue on the clang mailing list on April 10 -- no word so
> > far. I would interpret this as a sign that it is a no-issue for them.
>
> Hm. ;)
>
> Here's a bug report on the topic, gcc vs llvm:
>
> https://llvm.org/bugs/show_bug.cgi?id=15495
>
> Lets add a new barrier macro to linux/compiler{,-gcc}.h, f.e.
>
> #define barrier_data(ptr) __asm__ __volatile__("" : : "r" (ptr) :
> "memory")
>
> or the version Mancha proposed. You could wrap that ...
>
> #define OPTIMIZER_HIDE(ptr) barrier_data(ptr)
>
> ... and use that one for memzero_explicit() instead:
>
> void memzero_explicit(void *s, size_t count)
> {
> memset(s, 0, count);
> OPTIMIZER_HIDE(s);
> }
>
> It certainly needs comments explaining in what situations to use
> which OPTIMIZER_HIDE* variants, etc.
>
> Do you want to send a patch?

It seems you have the code already in mind, so please if you could write it
:-)

--
Ciao
Stephan


\
 
 \ /
  Last update: 2015-04-27 23:01    [W:0.255 / U:0.736 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site