Date: Tue, 09 Oct 2012 22:24:56 +0400 From: Andrey Chernov <ache@freebsd.org> To: Eitan Adler <eadler@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, theraven@freebsd.org Subject: Re: svn commit: r241373 - head/lib/libc/stdlib Message-ID: <50746BF8.5010307@freebsd.org> In-Reply-To: <CAF6rxgkDbyrCHfY-5eMjJ%2B7nP9ZCnXsjLgEBB1Q_p=QJ3tCkfg@mail.gmail.com> References: <201210091425.q99EPFS6020787@svn.freebsd.org> <507451DE.9060909@freebsd.org> <CAF6rxgkDbyrCHfY-5eMjJ%2B7nP9ZCnXsjLgEBB1Q_p=QJ3tCkfg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 09.10.2012 21:47, Eitan Adler wrote: > On 9 October 2012 12:33, Andrey Chernov <ache@freebsd.org> wrote: >> Do you check assembler output for _both_ cases? > > Yes. ... > http://blog.eitanadler.com/2012/10/reduced-entropy-in-rand-and-random.html At this URL I see only already known buggy assembler without 'volatile' keyword (which is fixed by adding 'volatile' in srandomdev()). As I already mention, adding 'volatile' helps any gcc and clang finally generated assembler code (checked by cc -S ...). What happens with LLVM intermediate code, I mean mentioned by David call void @srand(i32 undef) is a big question and perhaps clang bug. Please note that we use 'volatile' a lot in the kernel, just 'grep -r volatile /sys'. Some of that potentially can hit the same (probably) bug. And, in case it is the bug, it should be fixed in clang. > volatile is still undefined: see 5.1.2.2.3 and 6.7.2.4 of ISO9899 I don't have ISO9899 nearby, could you directly quote mentioned sections, please? Do you against 'volatile' usage at all? It seems whole kernel (see above) contradicts with such point of view.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50746BF8.5010307>