aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/xor.c
diff options
context:
space:
mode:
authorDaniel Thompson <daniel.thompson@linaro.org>2016-08-18 13:37:21 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2016-08-24 21:04:48 +0800
commited0bd721c9322e8e6ee953884706080d40106a6e (patch)
tree87608b6b815dadce853a27dff1bc93b3429f5111 /crypto/xor.c
parentcrypto: doc - fix documentation for bulk registration functions (diff)
downloadlinux-dev-ed0bd721c9322e8e6ee953884706080d40106a6e.tar.xz
linux-dev-ed0bd721c9322e8e6ee953884706080d40106a6e.zip
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>
Diffstat (limited to 'crypto/xor.c')
0 files changed, 0 insertions, 0 deletions