Re: [PATCH v7 0/1] MR10174: bcryptprimitives: Abort if `ProcessPrng` fails
On Wed Feb 25 19:16:43 2026 +0000, Paul Gofman wrote:
There is actually one real thing in that place:
int fd = open( "/dev/urandom", O_RDONLY ); That can fail due to fd exhaustion. But instead of asserting we'd probably be better off caching the fd, file open takes time while getting random values may happen often in some cases (and get_random is used very early for the first time, to fill process cookie). Even if called once it can still fail. I think we should pass the error instead of asserting and give the app a chance to handle it. Likely only a few will actually check for errors from RtlGenRandom() but those that do will get a chance to clean up and notify the user.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/10174#note_130561
participants (1)
-
Hans Leidekker (@hans)