linux/arch
Eric Biggers f235bc11cc crypto: arm/aes-neonbs - go back to using aes-arm directly
In aes-neonbs, instead of going through the crypto API for the parts
that the bit-sliced AES code doesn't handle, namely AES-CBC encryption
and single-block AES, just call the ARM scalar AES cipher directly.

This basically goes back to the original approach that was used before
commit b56f5cbc7e ("crypto: arm/aes-neonbs - resolve fallback cipher
at runtime").  Calling the ARM scalar AES cipher directly is faster,
simpler, and avoids any chance of bugs specific to the use of fallback
ciphers such as module loading deadlocks which have happened twice.  The
deadlocks turned out to be fixable in other ways, but there's no need to
rely on anything so fragile in the first place.

The rationale for the above-mentioned commit was to allow people to
choose to use a time-invariant AES implementation for the fallback
cipher.  There are a couple problems with that rationale, though:

- In practice the ARM scalar AES cipher (aes-arm) was used anyway, since
  it has a higher priority than aes-fixed-time.  Users *could* go out of
  their way to disable or blacklist aes-arm, or to lower its priority
  using NETLINK_CRYPTO, but very few users customize the crypto API to
  this extent.  Systems with the ARMv8 Crypto Extensions used aes-ce,
  but the bit-sliced algorithms are irrelevant on such systems anyway.

- Since commit 913a3aa07d ("crypto: arm/aes - add some hardening
  against cache-timing attacks"), the ARM scalar AES cipher is partially
  hardened against cache-timing attacks.  It actually works like
  aes-fixed-time, in that it disables interrupts and prefetches its
  lookup table.  It does use a larger table than aes-fixed-time, but
  even so, it is not clear that aes-fixed-time is meaningfully more
  time-invariant than aes-arm.  And of course, the real solution for
  time-invariant AES is to use a CPU that supports AES instructions.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2024-08-17 13:55:50 +08:00
..
alpha
arc arc: convert to generic syscall table 2024-07-10 14:23:38 +02:00
arm crypto: arm/aes-neonbs - go back to using aes-arm directly 2024-08-17 13:55:50 +08:00
arm64 crypto: arm64/poly1305 - move data to rodata section 2024-08-17 13:55:49 +08:00
csky ftrace: Rewrite of function graph tracer 2024-07-18 13:36:33 -07:00
hexagon hexagon: use new system call table 2024-07-10 14:23:38 +02:00
loongarch RISC-V Patches for the 6.11 Merge Window, Part 2 2024-07-27 10:14:34 -07:00
m68k Kbuild updates for v6.11 2024-07-23 14:32:21 -07:00
microblaze syscalls: mmap(): use unsigned offset type consistently 2024-06-25 15:57:38 +02:00
mips - Use improved timer sync for Loongson64 2024-07-25 12:41:53 -07:00
nios2 Kbuild updates for v6.11 2024-07-23 14:32:21 -07:00
openrisc openrisc: convert to generic syscall table 2024-07-10 14:23:38 +02:00
parisc parisc architecture fixes and updates for kernel v6.11-rc1: 2024-07-25 12:37:42 -07:00
powerpc crypto: ppc/curve25519 - add missing MODULE_DESCRIPTION() macro 2024-08-02 21:11:20 +08:00
riscv RISC-V Patches for the 6.11 Merge Window, Part 2 2024-07-27 10:14:34 -07:00
s390 more s390 updates for 6.11 merge window 2024-07-26 10:47:53 -07:00
sh sh updates for v6.11 2024-07-23 11:57:52 -07:00
sparc Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00
um This pull request contains the following changes for UML: 2024-07-25 12:33:08 -07:00
x86 crypto: x86/aes-gcm - fix PREEMPT_RT issue in gcm_crypt() 2024-08-10 12:25:34 +08:00
xtensa - 875fa64577da ("mm/hugetlb_vmemmap: fix race with speculative PFN 2024-07-21 17:15:46 -07:00
.gitignore
Kconfig Revert "mm: mmap: allow for the maximum number of bits for randomizing mmap_base by default" 2024-06-17 12:57:03 -07:00