summaryrefslogtreecommitdiff
path: root/virt
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2022-02-23 10:07:01 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2022-03-03 01:49:20 +0300
commit7976c1492571a5fb234c416559a0d9790855c635 (patch)
tree34d455af015e3256902f25da54e17bb52c5aeed5 /virt
parent4920a4a7262dd1c647b515c05358ccbee0ab828c (diff)
downloadlinux-7976c1492571a5fb234c416559a0d9790855c635.tar.xz
crypto: crypto_xor - use helpers for unaligned accesses
Dereferencing a misaligned pointer is undefined behavior in C, and may result in codegen on architectures such as ARM that trigger alignments traps and expensive fixups in software. Instead, use the get_aligned()/put_aligned() accessors, which are cheap or even completely free when CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y. In the converse case, the prior alignment checks ensure that the casts are safe, and so no unaligned accessors are necessary. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'virt')
0 files changed, 0 insertions, 0 deletions