google / honggfuzz

Security oriented software fuzzer. Supports evolutionary, feedback-driven fuzzing based on code coverage (SW and HW based)
https://honggfuzz.dev
Apache License 2.0
3.07k stars 515 forks source link

util_rndInitThread Linux modernisation proposal. #507

Closed devnexen closed 10 months ago

devnexen commented 10 months ago

getrandom syscall exists since enough time now (around 3.17) and we save one file descriptor usage.

robertswiecki commented 10 months ago

Thank you for this code.

For the posterity, I don't think it's essentially needed, this function is not called frequently. But it has some advantages: no need to open-fd, no need for /dev/urandom to be present (which might not be in some Linux namespaces).