linux/arch/arm
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
..
boot Kbuild updates for v6.11 2024-07-23 14:32:21 -07:00
common ARM: sa1100: make match function take a const pointer 2024-07-19 13:47:20 +02:00
configs sound updates for 6.11-rc1 2024-07-19 12:39:34 -07:00
crypto crypto: arm/aes-neonbs - go back to using aes-arm directly 2024-08-17 13:55:50 +08:00
include Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00
kernel arm64 updates for 6.11: 2024-07-15 17:06:19 -07:00
lib ARM: crypto: use CC_FLAGS_FPU for NEON CFLAGS 2024-05-19 14:36:17 -07:00
mach-actions
mach-alpine
mach-artpec
mach-aspeed
mach-at91 ARM: at91: pm: set soc_pm.data.mode in at91_pm_secure_init() 2023-11-19 11:32:44 +02:00
mach-axxia
mach-bcm ARM: bcm: stop selecing CONFIG_TICK_ONESHOT 2024-02-28 10:32:25 -08:00
mach-berlin
mach-clps711x
mach-davinci ARM: davinci: Convert comma to semicolon 2024-07-10 15:22:08 +02:00
mach-digicolor
mach-dove
mach-ep93xx ARM: ep93xx: Add terminator to gpiod_lookup_table 2024-02-20 17:19:49 +01:00
mach-exynos
mach-footbridge
mach-gemini
mach-highbank
mach-hisi
mach-hpe
mach-imx ARM: imx: Assign parents for mmdc event_source devices 2024-04-22 13:41:58 +08:00
mach-ixp4xx
mach-keystone
mach-lpc18xx
mach-lpc32xx
mach-mediatek
mach-meson
mach-milbeaut
mach-mmp
mach-mstar
mach-mv78xx0
mach-mvebu
mach-mxs ARM: mxs: Do not search for "fsl,clkctrl" 2023-12-06 11:21:43 +08:00
mach-nomadik
mach-npcm
mach-omap1 ARM: omap1: remove duplicated 'select ARCH_OMAP' 2024-02-28 09:27:20 +02:00
mach-omap2 GPIO regression fixes for n8x0 2024-04-09 16:17:37 +02:00
mach-orion5x ARM: orion5x: Convert TS409 board to GPIO descriptors for LEDs 2024-05-05 18:18:18 +02:00
mach-pxa ARM: pxa: fix build breakage on PXA3xx 2024-07-15 13:53:28 +02:00
mach-qcom ARM: qcom: merge remaining subplatforms into sensible Kconfig entry 2024-02-06 15:00:02 -06:00
mach-realtek
mach-rockchip
mach-rpc
mach-s3c kbuild: use $(src) instead of $(srctree)/$(src) for source directory 2024-05-10 04:34:52 +09:00
mach-s5pv210 ARM: s5pv210: fix pm.c kernel-doc warning 2024-01-22 11:44:16 +01:00
mach-sa1100 ARM: sa1100: Open code gpio_request_array() 2024-04-03 13:07:29 +02:00
mach-shmobile
mach-socfpga
mach-spear
mach-sti
mach-stm32 ARM: stm32: Allow build irq-stm32mp-exti driver as module 2024-06-24 00:16:43 +02:00
mach-sunxi ARM: sun9i: smp: fix return code check of of_property_match_string 2024-01-02 16:45:16 +01:00
mach-tegra ARM: tegra: paz00: Use software nodes to describe GPIOs for WiFi rfkill 2024-06-28 17:52:16 +02:00
mach-ux500
mach-versatile arm: vexpress: Remove obsolete RTSM DCSCB support 2024-05-29 23:25:11 +01:00
mach-vt8500
mach-zynq ARM: zynq: Remove clk/zynq.h header 2024-01-22 14:22:10 +01:00
mm ARM: Remove address checking for MMUless devices 2024-07-09 08:53:59 -07:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-05-02 12:06:25 -07:00
nwfpe
plat-orion kbuild: use $(src) instead of $(srctree)/$(src) for source directory 2024-05-10 04:34:52 +09:00
probes
tools x86, arm: Add missing license tag to syscall tables files 2024-06-12 11:33:45 +02:00
vdso Makefile: remove redundant tool coverage variables 2024-05-14 23:35:48 +09:00
vfp ARM: 9327/1: vfp: Add missing VFP instructions to neon_support_hook 2023-12-05 11:40:27 +00:00
xen xen/arm: Convert comma to semicolon 2024-07-11 08:48:28 +02:00
Kbuild kbuild: use $(src) instead of $(srctree)/$(src) for source directory 2024-05-10 04:34:52 +09:00
Kconfig Kbuild updates for v6.11 2024-07-23 14:32:21 -07:00
Kconfig-nommu
Kconfig.assembler
Kconfig.debug ARM updates for v6.9-rc1 2024-03-23 09:17:03 -07:00
Kconfig.platforms ARM: mach-nspire: Rework support and directory structure 2023-12-22 14:23:30 +00:00
Makefile ARM: implement ARCH_HAS_KERNEL_FPU_SUPPORT 2024-05-19 14:36:17 -07:00