]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
crypto: tcrypt - avoid signed overflow in byte count
authorArd Biesheuvel <ardb@kernel.org>
Tue, 8 Dec 2020 14:34:41 +0000 (15:34 +0100)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Apr 2021 16:31:46 +0000 (18:31 +0200)
commit4bc852eb8d051203d0893bd340a885e596582b31
treead8be43bc301896e5cff19d1d2a8ffc2599a50e0
parentffe16399c12b8da0c96e943ca36d9f4773b9bc0d
crypto: tcrypt - avoid signed overflow in byte count

BugLink: https://bugs.launchpad.net/bugs/1920235
[ Upstream commit 303fd3e1c771077e32e96e5788817f025f0067e2 ]

The signed long type used for printing the number of bytes processed in
tcrypt benchmarks limits the range to -/+ 2 GiB, which is not sufficient
to cover the performance of common accelerated ciphers such as AES-NI
when benchmarked with sec=1. So switch to u64 instead.

While at it, fix up a missing printk->pr_cont conversion in the AEAD
benchmark.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
crypto/tcrypt.c