freebsd-skq/sys/dev/random
cem d9759abd65 random(4): Poll for signals during large reads
Occasionally poll for signals during large reads of the /dev/u?random
devices.  This allows cancellation via SIGINT of accidental invocations of
very large reads.  (A 2GB /dev/random read, which takes about 10 seconds on
my 2017 AMD Zen processor, can be aborted.)

I believe this behavior was intended since 2014 (r273997), just not fully
implemented.

This is motivated by a potential getrandom(2) interface that may not
explicitly forbid extremely large reads on 64-bit platforms -- even larger
than the 2GB limit imposed on devfs I/O by default.  Such reads, if they are
to be allowed, should be cancellable by the user or administrator.

Reviewed by:	delphij
Approved by:	secteam (delphij)
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D14684
2018-03-16 18:50:26 +00:00
..
build.sh
fortuna.c
fortuna.h
hash.c
hash.h
ivy.c
nehemiah.c
other_algorithm.c
other_algorithm.h
random_harvestq.c
random_harvestq.h
random_infra.c
randomdev.c
randomdev.h
uint128.h
unit_test.c
unit_test.h
yarrow.c
yarrow.h