Thread (26 messages) 26 messages, 4 authors, 2025-08-05

Re: [PATCH 3/7] crypto: powerpc/md5 - Remove PowerPC optimized MD5 code

From: Eric Biggers <ebiggers@kernel.org>
Date: 2025-08-03 22:56:55
Also in: linux-crypto, linux-mips, lkml, sparclinux

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help