• Eric Biggers's avatar
    crypto: chacha20 - Fix keystream alignment for chacha20_block() · 9f480fae
    Eric Biggers authored
    When chacha20_block() outputs the keystream block, it uses 'u32' stores
    directly.  However, the callers (crypto/chacha20_generic.c and
    drivers/char/random.c) declare the keystream buffer as a 'u8' array,
    which is not guaranteed to have the needed alignment.
    
    Fix it by having both callers declare the keystream as a 'u32' array.
    For now this is preferable to switching over to the unaligned access
    macros because chacha20_block() is only being used in cases where we can
    easily control the alignment (stack buffers).
    Signed-off-by: 's avatarEric Biggers <ebiggers@google.com>
    Signed-off-by: 's avatarHerbert Xu <herbert@gondor.apana.org.au>
    9f480fae
Name
Last commit
Last update
Documentation Loading commit data...
arch Loading commit data...
block Loading commit data...
certs Loading commit data...
crypto Loading commit data...
drivers Loading commit data...
firmware Loading commit data...
fs Loading commit data...
include Loading commit data...
init Loading commit data...
ipc Loading commit data...
kernel Loading commit data...
lib Loading commit data...
mm Loading commit data...
net Loading commit data...
samples Loading commit data...
scripts Loading commit data...
security Loading commit data...
sound Loading commit data...
tools Loading commit data...
usr Loading commit data...
virt Loading commit data...
.cocciconfig Loading commit data...
.get_maintainer.ignore Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
Kbuild Loading commit data...
Kconfig Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README Loading commit data...