Commit 52973ec4 authored by Ard Biesheuvel's avatar Ard Biesheuvel Committed by Yongqiang Liu
Browse files

crypto: tcrypt - avoid signed overflow in byte count



stable inclusion
from stable-v4.19.179
commit 2fd58d8bb0853c3f424a089f71805e26b9b5e899
category: bugfix
bugzilla: 188240
CVE: NA

--------------------------------

[ Upstream commit 303fd3e1 ]

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: default avatarArd Biesheuvel <ardb@kernel.org>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarGUO Zihua <guozihua@huawei.com>
Reviewed-by: default avatarWang Weiyang <wangweiyang2@huawei.com>
Signed-off-by: default avatarYongqiang Liu <liuyongqiang13@huawei.com>
parent ba34d9d3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment