Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: [netbsd-10] src/sys
Module Name: src
Committed By: martin
Date: Wed Oct 9 13:04:17 UTC 2024
Modified Files:
src/sys/dev [netbsd-10]: random.c
src/sys/kern [netbsd-10]: kern_entropy.c
src/sys/sys [netbsd-10]: entropy.h
Log Message:
Pull up following revision(s) (requested by riastradh in ticket #937):
sys/dev/random.c: revision 1.11
sys/kern/kern_entropy.c: revision 1.67
sys/kern/kern_entropy.c: revision 1.68
sys/kern/kern_entropy.c: revision 1.69
sys/sys/entropy.h: revision 1.5
entropy(9): New function entropy_consolidate_sig.
This is the same as entropy_consolidate, but it returns EINTR if
interrupted by a signal and 0 otherwise. (entropy_consolidate can
already be interrupted by a signal -- it just doesn't tell you if it
was.)
Eventually these will be merged into a single entropy_consolidate
that returns the error code, but adding a new symbol first makes it
safe for pullup-10.
PR kern/58646: /dev/random, kern.entropy.*: signal bugs
/dev/random: Fix two signal bugs.
1. If a long write to /dev/random is interrupted by a signal, it may
proceed to sleep on the entropy source lock instead of returning
promptly.
=> Don't try to consolidate entropy if we've already been
interrupted by a signal.
2. If a write to /dev/random is interrupted by a signal while
sleeping on the entropy source lock, it may fail to report EINTR.
=> Pass through EINTR from entropy consolidation via new
entropy_consolidate_sig function.
PR kern/58646: /dev/random, kern.entropy.*: signal bugs
kern.entropy.consolidate, ioctl(RNDCTL): Fail with EINTR on signal.
This can happen if another thread is currently running consolidation
and has the entropy source lock held. Use the new function
entropy_consolidate_sig to get at EINTR.
PR kern/58646: /dev/random, kern.entropy.*: signal bugs
kern.entropy.gather: Fail with EINTR on signal.
Just don't throw away the error code we already have!
PR kern/58646: /dev/random, kern.entropy.*: signal bugs
To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.10.4.1 src/sys/dev/random.c
cvs rdiff -u -r1.57.4.4 -r1.57.4.5 src/sys/kern/kern_entropy.c
cvs rdiff -u -r1.4 -r1.4.20.1 src/sys/sys/entropy.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index