Description of problem: Now that the kernel exports the getrandom syscall, it would be helpful if glibc provides a getrandom library call and a matching prototype, preferredly in unistd.h, just like in case of getentropy on OpenBSD. Additional info: Having the prototype in a non-Linux specific header would be most important for compatibility reasons: As Cygwin maintainer I'd like to provide the call in a fully compatible way on the C library level. Providing the prototype in an OS-specific header only would disallow this. A _GNU_SOURCE guard would be ok, though. Thanks, Corinna
Thanks for this report. We will have to take this upstream and make sure we do it there, then the next rawhide pull from upstream will include the fix. Can you give me a little more information? Which kernel version and commit adds the new support? Is it in a stable kernel?
Hi Carlos, the call has been added by Theodore Ts'o: http://lists.openwall.net/linux-kernel/2014/07/17/235 It has been added to the 3.17 kernel, and thus is available in current F20: $ uname -svr Linux 3.17.2-200.fc20.x86_64 #1 SMP Tue Nov 4 18:04:56 UTC 2014 $ grep -r getrandom /usr/include /usr/include/asm-generic/unistd.h:#define __NR_getrandom 278 /usr/include/asm-generic/unistd.h:__SYSCALL(__NR_getrandom, sys_getrandom) /usr/include/linux/random.h: * Flags for getrandom(2) /usr/include/asm/unistd_64.h:#define __NR_getrandom 318 /usr/include/asm/unistd_32.h:#define __NR_getrandom 355 /usr/include/asm/unistd_x32.h:#define __NR_getrandom (__X32_SYSCALL_BIT + 318) If I may add the suggestion that, from a compatibility POV, it would make sense to add the OpenBSD getentropy call as well. It's just a call to the getrandom syscall with 0 flags anyway. Thanks, Corinna
Added upstream bug report for reference.
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle. Changing version to '22'. More information and reason for this action is here: https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22
*** Bug 1253474 has been marked as a duplicate of this bug. ***
Is there any blocker for this inclusion? As I mentioned in #1253474 that is a very good addition for Fedora (and glibc in general).
(In reply to Nikos Mavrogiannopoulos from comment #6) > Is there any blocker for this inclusion? As I mentioned in #1253474 that is > a very good addition for Fedora (and glibc in general). The blocker is that this is a global API addition that could make Fedora incompatible with every other distribution. We want this to go upstream first. I'm setting devel_cond_nak/upstream to indicate that this needs to go upstream. It can remain open here to track the upstream fix. I've reiterated in upstream what I believe the right solution would be: https://sourceware.org/ml/libc-alpha/2015-08/msg00576.html
Sounds reasonable. Thanks.
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle. Changing version to '24'. More information and reason for this action is here: https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase
This bug appears to have been reported against 'rawhide' during the Fedora 25 development cycle. Changing version to '25'.
Hi, I've been running a fc25-rawhide (fc26) system and have started seeing these messages. Fatal: [ 110.329306] traps: init[1] general protection ip:7f49c784f352 sp:7ffc6cd8dd70 error:0no entropy gathe[ 110.765476] in libc-2.24.90.so[7f49c7817000+1c3000] Could this be related to this bug? I see libc-2.24.90 in the message. "my" bug report is [Bug 1419432] New: kernel panic " general protection no entropy gathe libc-2.24.90.so Thanks, George...
(In reply to George R. Goffe from comment #16) > Could this be related to this bug? I see libc-2.24.90 in the message. > > "my" bug report is [Bug 1419432] New: kernel panic " general protection no > entropy gathe libc-2.24.90.so It's unrelated. I commented on the other bug.