[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250803225652.GA2142@quark>
Date: Sun, 3 Aug 2025 15:56:52 -0700
From: Eric Biggers <ebiggers@...nel.org>
To: Segher Boessenkool <segher@...nel.crashing.org>
Cc: linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org,
Ard Biesheuvel <ardb@...nel.org>,
"Jason A . Donenfeld" <Jason@...c4.com>, linux-mips@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org, sparclinux@...r.kernel.org
Subject: Re: [PATCH 3/7] crypto: powerpc/md5 - Remove PowerPC optimized MD5
code
On Sun, Aug 03, 2025 at 05:27:01PM -0500, Segher Boessenkool wrote:
> You are replacing a known-working target implementation by a lower
> performance generic implementation.
That's probably correct, though FWIW there have been quite a few cases
where optimized assembly code in the kernel actually turned out to be
slower than the C code. (That primarily happens when the assembly code
doesn't take advantage of any special CPU features, which was the case
for this PowerPC code.) I don't have PowerPC hardware to check the
exact performance differential here, but IMO even if there was a
slowdown the factors still weigh strongly in favor of retiring this.
> But is that one known-working at all? Does it come with tests? Was
> it tested to have the same outputs as the existing thing, maybe? Just
> on a few inputs maybe.
Of course. Patch 7 adds a KUnit test suite for MD5, and there are still
the older tests in crypto/testmgr.c. And of course generic code is much
easier to test than arch-specific code. So not only is it tested, but
the test coverage is much better than it was before.
- Eric
Powered by blists - more mailing lists