android_kernel_motorola_sm6375/arch/arm
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Eric Biggers be7d8de428 UPSTREAM: crypto: arm/blake2s - add ARM scalar optimized BLAKE2s
Add an ARM scalar optimized implementation of BLAKE2s.

NEON isn't very useful for BLAKE2s because the BLAKE2s block size is too
small for NEON to help.  Each NEON instruction would depend on the
previous one, resulting in poor performance.

With scalar instructions, on the other hand, we can take advantage of
ARM's "free" rotations (like I did in chacha-scalar-core.S) to get an
implementation get runs much faster than the C implementation.

Performance results on Cortex-A7 in cycles per byte using the shash API:

	4096-byte messages:
		blake2s-256-arm:     18.8
		blake2s-256-generic: 26.0

	500-byte messages:
		blake2s-256-arm:     20.3
		blake2s-256-generic: 27.9

	100-byte messages:
		blake2s-256-arm:     29.7
		blake2s-256-generic: 39.2

	32-byte messages:
		blake2s-256-arm:     50.6
		blake2s-256-generic: 66.2

Except on very short messages, this is still slower than the NEON
implementation of BLAKE2b which I've written; that is 14.0, 16.4, 25.8,
and 76.1 cpb on 4096, 500, 100, and 32-byte messages, respectively.
However, optimized BLAKE2s is useful for cases where BLAKE2s is used
instead of BLAKE2b, such as WireGuard.

This new implementation is added in the form of a new module
blake2s-arm.ko, which is analogous to blake2s-x86_64.ko in that it
provides blake2s_compress_arch() for use by the library API as well as
optionally register the algorithms with the shash API.

Acked-by: Ard Biesheuvel <[email protected]>
Signed-off-by: Eric Biggers <[email protected]>
Tested-by: Ard Biesheuvel <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>

(cherry picked from commit 5172d322d34c30fb926b29aeb5a064e1fd8a5e13)
Bug: 152722841
Bug: 178411248
Change-Id: I0ba7a0ea53518d512ccbe54a56970d6bbe2a32e0
Signed-off-by: Eric Biggers <[email protected]>
2021-10-23 19:32:26 -07:00
..
boot This is the 5.4.146 stable release 2021-09-15 14:01:16 +02:00
common
configs UPSTREAM: ARM: bcm2835_defconfig: Explicitly restore CONFIG_DEBUG_FS 2020-11-14 16:56:22 +01:00
crypto UPSTREAM: crypto: arm/blake2s - add ARM scalar optimized BLAKE2s 2021-10-23 19:32:26 -07:00
include This is the 5.4.121 stable release 2021-05-22 11:55:46 +02:00
kernel This is the 5.4.145 stable release 2021-09-12 09:54:40 +02:00
kvm KVM: arm64: Ensure I-cache isolation between vcpus of a same VM 2021-03-17 17:03:57 +01:00
lib
mach-actions
mach-alpine
mach-artpec
mach-asm9260
mach-aspeed
mach-at91 ARM: at91: pm: of_node_put() after its usage 2020-10-29 09:57:58 +01:00
mach-axxia
mach-bcm
mach-berlin
mach-clps711x
mach-cns3xxx
mach-davinci
mach-digicolor
mach-dove
mach-ebsa110
mach-efm32
mach-ep93xx
mach-exynos ARM: exynos: add missing of_node_put for loop iteration 2021-07-20 16:10:51 +02:00
mach-footbridge ARM: footbridge: fix PCI interrupt mapping 2021-04-21 12:56:17 +02:00
mach-gemini
mach-highbank
mach-hisi
mach-imx ARM: imx: fix missing 3rd argument in macro imx_mmdc_perf_init 2021-08-12 13:20:54 +02:00
mach-integrator
mach-iop32x
mach-ixp4xx clocksource/drivers/ixp4xx: Select TIMER_OF when needed 2021-03-04 10:26:29 +01:00
mach-keystone ARM: keystone: fix integer overflow warning 2021-04-21 12:56:13 +02:00
mach-lpc18xx
mach-lpc32xx
mach-mediatek
mach-meson
mach-milbeaut
mach-mmp
mach-moxart
mach-mv78xx0
mach-mvebu
mach-mxs
mach-nomadik
mach-npcm
mach-nspire
mach-omap1 ARM: OMAP: replace setup_irq() by request_irq() 2021-06-23 14:41:31 +02:00
mach-omap2 Revert "clocksource/drivers/timer-ti-dm: Handle dra7 timer wrap errata i940" 2021-06-23 19:06:25 +02:00
mach-orion5x
mach-oxnas
mach-picoxcell
mach-prima2
mach-pxa
mach-qcom
mach-rda
mach-realview
mach-rockchip
mach-rpc
mach-s3c24xx ARM: s3c24xx: fix mmc gpio lookup tables 2020-10-29 09:57:58 +01:00
mach-s3c64xx
mach-s5pv210
mach-sa1100
mach-shmobile
mach-socfpga
mach-spear
mach-sti
mach-stm32
mach-sunxi ARM: sunxi: Add machine match for the Allwinner V3 SoC 2020-12-30 11:51:29 +01:00
mach-tango
mach-tegra
mach-u300
mach-uniphier
mach-ux500
mach-versatile
mach-vexpress
mach-vt8500
mach-zx
mach-zynq
mm This is the 5.4.120 stable release 2021-05-19 10:41:47 +02:00
net bpf: Introduce BPF nospec instruction for mitigating Spectre v4 2021-09-15 09:47:38 +02:00
nwfpe
oprofile
plat-omap
plat-orion
plat-pxa
plat-samsung ARM: samsung: fix PM debug build with DEBUG_LL but !MMU 2020-11-05 11:43:36 +01:00
plat-versatile
probes ARM: 9087/1: kprobes: test-thumb: fix for LLVM_IAS=1 2021-07-20 16:10:47 +02:00
tools
vdso
vfp ARM: 9044/1: vfp: use undef hook for VFP support detection 2021-03-24 11:26:35 +01:00
xen This is the 5.4.103 stable release 2021-03-07 12:51:29 +01:00
Kconfig This is the 5.4.75 stable release 2020-11-05 13:27:24 +01:00
Kconfig-nommu
Kconfig.debug
Makefile
OWNERS ANDROID: Add OWNERS files referring to the respective android-mainline OWNERS 2021-04-01 13:45:14 +00:00