lkml.org 
[lkml]   [2015]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [BUG/PATCH] kernel RNG and its secrets
From
Date
On Fr, 2015-04-10 at 15:25 +0200, Stephan Mueller wrote:
> I would like to bring up that topic again as I did some more analyses:
>
> For testing I used the following code:
>
> static inline void memset_secure(void *s, int c, size_t n)
> {
> memset(s, c, n);
> BARRIER
> }
>
> where BARRIER is defined as:
>
> (1) __asm__ __volatile__("" : "=r" (s) : "0" (s));
>
> (2) __asm__ __volatile__("": : :"memory");
>
> (3) __asm__ __volatile__("" : "=r" (s) : "0" (s) : "memory");

Hm, I wonder a little bit...

Could you quickly test if you replace (s) with (n) just for the fun of
it? I don't know if we should ask clang people about that, at least it
is their goal to be as highly compatible with gcc inline asm.

Thanks for looking into this!

Bye,
Hannes




\
 
 \ /
  Last update: 2015-04-10 16:41    [W:0.140 / U:5.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site