From: Eric Biggers <ebiggers@kernel.org>
To: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
Ard Biesheuvel <ardb@kernel.org>,
"Jason A . Donenfeld" <Jason@zx2c4.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
linux-mips@vger.kernel.org,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Subject: Re: [PATCH] lib/crypto: mips: Drop optimized MD5 code
Date: Sat, 18 Apr 2026 18:08:35 -0700 [thread overview]
Message-ID: <20260419010835.GB18115@quark> (raw)
In-Reply-To: <aeQjj0J1k7siaqOF@darkstar.musicnaut.iki.fi>
On Sun, Apr 19, 2026 at 03:36:31AM +0300, Aaro Koskinen wrote:
> Hi,
>
> On Thu, Mar 26, 2026 at 01:48:24PM -0700, Eric Biggers wrote:
> > MD5 is obsolete. Continuing to maintain architecture-optimized
> > implementations of MD5 is unnecessary and risky. It diverts resources
> > from the modern algorithms that are actually important.
> >
> > While there was demand for continuing to maintain the PowerPC optimized
> > MD5 code to accommodate userspace programs that are misusing AF_ALG
> > (https://lore.kernel.org/linux-crypto/c4191597-341d-4fd7-bc3d-13daf7666c41@csgroup.eu/),
> > no such demand has been seen for the MIPS Cavium Octeon optimized MD5
> > code. Note that this code runs on only one particular line of SoCs.
> >
> > Thus, let's drop it and focus effort on the more modern SHA algorithms,
> > which already have optimized code for the same SoCs.
>
> I don't mind deleting this (I shut down all my MIPS hardware already
> in new year 2020 to start a "fresh" decade), but just for the record,
> this will probably downgrade the performance of TCP_MD5SIG which I recall
> was the original reason this code got added...
Sure, for any removal of optimized code it's always possible to
hypothesize a case where it regresses performance. The question is
whether it actually matters and is worth keeping around. You mentioned
that you did care about this code, but no longer do. I think anyone who
may have cared about this in the past is likely to have had a similar
experience.
After all, the only line of SoCs that could run this code switched from
MIPS to ARM in 2016. Meanwhile, TCP-MD5 itself is insecure and has been
superseded by TCP-AO. (Note that TCP-AO supports HMAC-SHA1 and
HMAC-SHA256, which are still accelerated on MIPS Cavium Octeon.)
Yes, there are still people using TCP-MD5 anyway (on some platforms, not
necessarily this particular one). But a nudge towards upgrading to
TCP-AO isn't necessarily a bad thing, either...
> Also that PowerPC case about "misusing AF_ALG" is interesting - I often do
> similar on small systems (just to save binary space and avoid duplicate
> implementation) - why AF_ALG even allows such use if it's considered
> a bug?
It's just a mistake from a long time ago (2010) that still has to be
maintained for backwards compatibility. It's not something that would
be accepted in the kernel if it was proposed today.
- Eric
next prev parent reply other threads:[~2026-04-19 1:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-26 20:48 [PATCH] lib/crypto: mips: Drop optimized MD5 code Eric Biggers
2026-03-27 16:16 ` Ard Biesheuvel
2026-03-30 19:36 ` Eric Biggers
2026-04-19 0:36 ` Aaro Koskinen
2026-04-19 1:08 ` Eric Biggers [this message]
2026-04-19 1:43 ` Eric Biggers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260419010835.GB18115@quark \
--to=ebiggers@kernel.org \
--cc=Jason@zx2c4.com \
--cc=aaro.koskinen@iki.fi \
--cc=ardb@kernel.org \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=tsbogend@alpha.franken.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.