4 ms·
Sounds like bad news for 99.9% of the world not running 4.14 and the messy backwards compatibility path they have to maintain forever. That part of the code is
by revelation 9y ago
Sounds like bad news for 99.9% of the world not running 4.14 and the messy backwards compatibility path they have to maintain forever. That part of the code is already screaming "goto fail":
https://github.com/awslabs/s2n/blob/master/utils/s2n_random.c#L227 https://github.com/awslabs/s2n/blob/master/utils/s2n_random....
(And to be clear, I mean "goto fail" as in "I'm sure it's correct, but it's also very very difficult to tell")
- cbhl 9y ago"Forever" is only ten or twenty years, right?
- wbl 9y agoThe IRS master tax database has been around since the 1960s on the same machine.
- asveikau 9y agoWas trying to see how a 1960s machine is relevant to a discussion of brand new linux syscall behavior... Took me a while to see that the systems of today will look like the 60s do to us in ... The late 2060s. So if the 2067 tax database picks up an older kernel than this new madvise flag they are hosed, for some definition thereof (more like they need to be more careful when forking RNGs). Somehow that seems pretty fringe.
- colmmacc 9y agoWe can't change history, only improve the future. There are three levels of defense, precisely because until now there's been no way to robustly detect a fork(), but it will be nice to nail that for 4.14 and beyond and fleets can move surprisingly quickly to newer kernel versions and get the benefit of that. I think we have a high bar for a code readability and that the code isn't screaming goto fail. Though we do hate ifdef's and goto's and that file is one of the few places we have any, again precisely because of the ickyness of the challenge prior to 4.14. But if it helps reassure you, we also have a test case to make sure that the fork detection works: https://github.com/awslabs/s2n/blob/master/tests/unit/s2n_random_test.c https://github.com/awslabs/s2n/blob/master/tests/unit/s2n_ra... The test checks that a child and a parent really do produce different random streams.
- deleted 9y ago[deleted]