Re: [PATCH v2 1/1] lib/crypto: tests: Add KUnit tests for AES
From: Holger Dengler
Date: Fri Jan 30 2026 - 05:57:34 EST
On 29/01/2026 02:18, Eric Biggers wrote:
> "AES_BLOCK_SIZE * NSEC_PER_SEC" is missing a cast to u64, as reported by
> the kernel test robot.
>
> But also as discussed in v1, using ktime_get_ns() to time one AES block
> en/decryption at a time doesn't really work. Even on x86 which has a
> high precision timer, it's spending longer getting the time than doing
> the actual AES en/decryption.
>
> You may have meant to use get_cycles() instead, which has less overhead.
>
> However, not all architectures have a cycle counter.
>
> So I recommend we go with the simple strategy that I suggested, and
> which v1 had. Just the number of iterations in v1 was way too high.
Ok, I'll send a v3.
>
> - Eric
--
Mit freundlichen Grüßen / Kind regards
Holger Dengler
--
IBM Systems, Linux on IBM Z Development
dengler@xxxxxxxxxxxxx