Skip to content

osrng: use getrandom(2) instead of /dev/random on linux/NetBSD/FreeBSD/DragonFly, open /dev/random with O_CLOEXEC#1325

Open
nabijaczleweli wants to merge 2 commits intoweidai11:masterfrom
nabijaczleweli:master
Open

osrng: use getrandom(2) instead of /dev/random on linux/NetBSD/FreeBSD/DragonFly, open /dev/random with O_CLOEXEC#1325
nabijaczleweli wants to merge 2 commits intoweidai11:masterfrom
nabijaczleweli:master

Conversation

@nabijaczleweli
Copy link
Copy Markdown

Decays gracefully in case of errors:

getrandom(0x5642c460afd0, 32, 0)        = -1 ENOSYS (Function not implemented) (INJECTED)
openat(AT_FDCWD, "/dev/random", O_RDONLY) = 3
read(3, "\233\237w#.\365d\304\240\355N\212\335\4\27h9\v\7\203e\377K@\36\34\3G\17B\327\266", 32) = 32
close(3)                                = 0

otherwise equivalent

…D/DragonFly

Decays gracefully in case of errors:
  getrandom(0x5642c460afd0, 32, 0)        = -1 ENOSYS (Function not implemented) (INJECTED)
  openat(AT_FDCWD, "/dev/random", O_RDONLY) = 3
  read(3, "\233\237w#.\365d\304\240\355N\212\335\4\27h9\v\7\203e\377K@\36\34\3G\17B\327\266", 32) = 32
  close(3)                                = 0

Otherwise equivalent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant