Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Oct 1996 09:28:24 +0200
From:      Mark Murray <mark@grondar.za>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        mark@grondar.za, sos@freefall.freebsd.org, cvs-all@freefall.freebsd.org, CVS-committers@freefall.freebsd.org, cvs-sys@freefall.freebsd.org
Subject:   Re: cvs commit: src/sys/i386/isa syscons.c 
Message-ID:  <199610270728.JAA14467@grumble.grondar.za>

next in thread | raw e-mail | index | archive | help
Bruce Evans wrote:
> >If this was fixed, could this be added back to syscons?
> 
> No.  Console i/o routines should have as few side effects as possible,
> because they might be being used to debug things that would be corrupted
> by the side effects.

Fair enough. However - keyboards are a great swource of randomness. It
is easy enough to hook the keyboard interrupt (irq1), but to hook the
keystroke as well would be nice. Any ideas there? Also the new code
(from the latest Linux kernel) has mouse randomness as well. My original
idea was to hook the mouse driver in syscons as well. Any ideas there?

> There seems to be a more serious problem with reentrancy in
> add_timer_randomness().  It is called from interrupt handlers at the
> ipls of the handlers, so it may be reentered.  It doesn't seem to be
> designed for this.  I guess it works in Linux because it is always
> called with interrupts disabled.  It should use splhigh() in FreeBSD.
> (Don't forget the design goal that interrupts should not be masked for
> too long.  20 usec is too long.)  Since it is normally (*) called from
> the keyboard interrupt handler at ipl >= tty_imask, it is now only safe
> to gather entropy for interrupts generated by tty-class devices.

Oh, boy - now I show my kernel ignorance. Do you have any example code to
show this?

Also - I am massaging a later version for inclusion. I remember (and can
now see with the PC98) that the current placement is no good. Where is
a better place to put this?

M
--
Mark Murray
46 Harvey Rd, Claremont, Cape Town 7700, South Africa
+27 21 61-3768 GMT+0200
Finger mark@grondar.za for PGP key



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199610270728.JAA14467>