linux/include
Daniel Thompson ed0bd721c9 hwrng: core - Improve description of the ->read() interface
Currently, very few RNG drivers support single byte reads using the
->read() interface. Of the 14 drivers in drivers/char/hw_random that
support this interface only three of these actually support max == 1.
The other behaviours vary between return 0, return 2, return 4 and return
-EIO).

This is not a problem in practice because the core hw_random code never
performs a read shorter than 16 bytes. The documentation for this function
already contrains the alignment of the buffer pointer, so let's also
guarantee that the buffer is at least as large as its alignment.

This constraint is intended to be the weakest guarantee neccessary to
allow driver writers to safely simplify their code.

Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2016-08-24 21:04:48 +08:00
..
acpi treewide: replace obsolete _refok by __ref 2016-08-02 17:31:41 -04:00
asm-generic RTC for 4.8 2016-08-05 09:48:22 -04:00
clocksource
crypto A number of improvements for the /dev/random driver; the most 2016-07-27 15:11:55 -07:00
drm Merge branch 'generic-zpos-v8' of http://git.linaro.org/people/benjamin.gaignard/kernel into drm-next 2016-08-03 08:40:24 +10:00
dt-bindings ARM: DT updates for v4.8 2016-08-01 18:37:45 -04:00
keys
kvm KVM/ARM Changes for v4.8 - Take 2 2016-08-04 13:59:56 +02:00
linux hwrng: core - Improve description of the ->read() interface 2016-08-24 21:04:48 +08:00
math-emu
media dma-mapping: use unsigned long for dma_attrs 2016-08-04 08:50:07 -04:00
memory
misc cxl: Add cxl_check_and_switch_mode() API to switch bi-modal cards 2016-07-14 20:28:11 +10:00
net virtio/vhost: new features for 4.8 2016-08-06 09:20:13 -04:00
pcmcia
ras tracing, RAS: Cleanup on __get_str() usage 2016-07-15 15:51:16 -04:00
rdma Second round of merge items for 4.8 2016-08-04 20:26:31 -04:00
rxrpc
scsi Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2016-08-04 20:04:37 -04:00
soc ARM: SoC driver updates for v4.8 2016-08-01 18:36:01 -04:00
sound Merge tag 'drm-for-v4.8' of git://people.freedesktop.org/~airlied/linux 2016-08-01 21:44:08 -04:00
target target: Fix ordered task CHECK_CONDITION early exception handling 2016-07-20 00:58:40 -07:00
trace block: rename bio bi_rw to bi_opf 2016-08-07 14:41:02 -06:00
uapi virtio/vhost: new features for 4.8 2016-08-06 09:20:13 -04:00
video
xen dma-mapping: use unsigned long for dma_attrs 2016-08-04 08:50:07 -04:00
Kbuild