svn commit: r256377 - in head: etc/defaults etc/rc.d share/examples/kld/random_adaptor share/man/man4 sys/boot/forth sys/conf sys/dev/glxsb sys/dev/hifn sys/dev/random sys/dev/rndtest sys/dev/safe ...

Mark R V Murray mark at grondar.org
Sun Oct 13 17:03:14 UTC 2013


On 13 Oct 2013, at 17:18, Ian Lepore <ian at FreeBSD.org> wrote:

> On Sun, 2013-10-13 at 16:18 +0100, Mark R V Murray wrote:
>> On 13 Oct 2013, at 16:13, Konstantin Belousov <kostikbel at gmail.com> wrote:
>>> Surely this works, thank you. The rwfile.c content probably should be
>>> taken under the #ifdef RANDOM_RWFILE.
>> 
>> OK - thanks for the feedback!
>> 
>>> But I do not see much use for the randomdev_read_file() and
>>> randomdev_write_file() functions. It would be better to directly code
>>> the VFS calls in the random_harvestq_cache(). For one thing, it would
>>> eliminate unneccessary close and open of the entropy file.
>> 
>> There is some uncertainty about the future of that code, so I want
>> to keep it that way for now. Writing files from the kernel is making so@
>> very uncomfortable, and there is too much scope for error there.
>> 
> 
> Indeed, it makes me nervous too, as a heavy user of readonly root
> filesystems.  If writing this file is so critical that it has to be done
> by the kernel, then what happens when it fails?  Right now it prints an
> error and continues -- if it is not so critical that failure means
> panic, then why is the kernel doing it at all?

Good points all. The intent is not to win the arms-race outright, but to
win the common-case battles as convincingly as possible. That said, its
not looking good for the process, but I still want to give it a decent
look before/if yanking it.

> Why is the file even in the root filesystem?  /var/db seems to be the
> right place for a transient file needed by the system.

Because that appears to be the best place to put first-boot entropy from
sysinstall/bsdinstall. /var/db/entropy/... will also be used if possible;
watch this space.

> Speaking of errors, that might include things like the current code
> calling vn_close() with the FREAD flag on a file open for writing.


Thanks :-( :-)

M
-- 
Mark R V Murray

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 353 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/svn-src-head/attachments/20131013/a3a0df68/attachment.sig>


More information about the svn-src-head mailing list