Date: Wed, 05 Nov 2014 13:08:11 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 194204] getentropy(2): sys call from openbsd Message-ID: <bug-194204-8-h8P32WEi4B@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-194204-8@https.bugs.freebsd.org/bugzilla/> References: <bug-194204-8@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194204 Mateusz Guzik <mjg@FreeBSD.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mjg@FreeBSD.org --- Comment #2 from Mateusz Guzik <mjg@FreeBSD.org> --- I'm confused with this patch. OpenBSD implementation returns EIO for too big buffers, although apparently this was not the behaviour from the start. Previously it filled up to 256 bytes, but also indicated how many bytes were returned. Your patch fills up to 256 bytes and does not tell the caller how many bytes it got, which is a big no-no. We should stick to what is in OpenBSD, so please update the patch to return EIO when needed. memset you put there is buggy. explicit_zero or equivalent is needed and if we don't have that in the kernel one will need to be ported as well. Cannot comment on arc4rand usefulness for this purpose though. -- You are receiving this mail because: You are the assignee for the bug.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-194204-8-h8P32WEi4B>