[Bug libstdc++/57920] [c++11] Linux: std::random_device reads too much from /dev/urandom

2014-02-11 Thread gnu at binarywings dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57920 Florian Philipp gnu at binarywings dot net changed: What|Removed |Added CC||gnu at

[Bug libstdc++/57920] [c++11] Linux: std::random_device reads too much from /dev/urandom

2013-07-22 Thread f.heckenb...@fh-soft.de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57920 --- Comment #5 from Frank Heckenbach f.heckenb...@fh-soft.de --- (In reply to Paolo Carlini from comment #1) Note that in 4.8.x and mainline for modern x86 and x86_64 targets we don't use /dev/urandom at all, we use __x86_rdrand. In general, the

[Bug libstdc++/57920] [c++11] Linux: std::random_device reads too much from /dev/urandom

2013-07-22 Thread f.heckenb...@fh-soft.de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57920 --- Comment #6 from Frank Heckenbach f.heckenb...@fh-soft.de --- (In reply to Paolo Carlini from comment #3) I'm going to attach a patchlet which does the trick (fread - read) for me. Note I'm on purpose disabling the use of

[Bug libstdc++/57920] [c++11] Linux: std::random_device reads too much from /dev/urandom

2013-07-22 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57920 --- Comment #7 from Paolo Carlini paolo.carlini at oracle dot com --- Agreed, let's just commit the improvement. If/when you become aware of ways to extend the use of builtins to other CPUs / targets, please let me know, thanks.

[Bug libstdc++/57920] [c++11] Linux: std::random_device reads too much from /dev/urandom

2013-07-22 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57920 Paolo Carlini paolo.carlini at oracle dot com changed: What|Removed |Added Status|ASSIGNED|RESOLVED

[Bug libstdc++/57920] [c++11] Linux: std::random_device reads too much from /dev/urandom

2013-07-21 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57920 --- Comment #1 from Paolo Carlini paolo.carlini at oracle dot com --- Note that in 4.8.x and mainline for modern x86 and x86_64 targets we don't use /dev/urandom at all, we use __x86_rdrand. In general, the idea is that more targets should use

[Bug libstdc++/57920] [c++11] Linux: std::random_device reads too much from /dev/urandom

2013-07-21 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57920 --- Comment #2 from Paolo Carlini paolo.carlini at oracle dot com --- I mean we use __builtin_ia32_rdrand32_step ;)

[Bug libstdc++/57920] [c++11] Linux: std::random_device reads too much from /dev/urandom

2013-07-21 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57920 Paolo Carlini paolo.carlini at oracle dot com changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED

[Bug libstdc++/57920] [c++11] Linux: std::random_device reads too much from /dev/urandom

2013-07-21 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57920 --- Comment #4 from Paolo Carlini paolo.carlini at oracle dot com --- Created attachment 30534 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=30534action=edit Draft mainline patch