archive mirror
 help / color / mirror / Atom feed
From: "brian m. carlson" <>
To: "Ævar Arnfjörð Bjarmason" <>
Cc:, "Junio C Hamano" <>,
	"Mike Hommey" <>,
	"Carlo Marcelo Arenas Belón" <>,
	"Taylor Blau" <>
Subject: Re: [PATCH v2] ppc: remove custom SHA-1 implementation
Date: Mon, 21 Mar 2022 21:19:49 +0000	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

[-- Attachment #1: Type: text/plain, Size: 2270 bytes --]

On 2022-03-21 at 17:06:12, Ævar Arnfjörð Bjarmason wrote:
> Remove the PPC_SHA1 implementation added in a6ef3518f9a ([PATCH] PPC
> assembly implementation of SHA1, 2005-04-22). When this was added
> Apple consumer hardware used the PPC architecture, and the
> implementation was intended to improve SHA-1 speed there.
> Since it was added we've moved to DC_SHA1 by default, and anyone
> wanting hard-rolled non-DC SHA-1 implementation can use OpenSSL's via
> the OPENSSL_SHA1 knob.
> I'm unsure if this was ever supposed to work on 64-bit PPC. It clearly
> originally targeted 32 bit PPC, but there's some mailing list
> references to this being tried on G5 (PPC 970). I can't get it to do
> anything but segfault on the BE POWER8 machine in the GCC compile
> farm. Anyone caring about speed on PPC these days is likely to be
> using IBM's POWER, not PPC 970.
> There have been proposals to entirely remove non-DC_SHA1
> implementations from the tree[1]. I think per [2] that would be a bit
> overzealous. I.e. there are various set-ups git's speed is going to be
> more important than the relatively implausible SHA-1 collision attack,
> or where such attacks are entirely mitigated by other means (e.g. by
> incoming objects being checked with DC_SHA1).
> The main reason for doing so at this point is to simplify follow-up
> Makefile change. Since PPC_SHA1 included the only in-tree *.S assembly
> file we needed to keep around special support for building objects
> from it. By getting rid of it we know we'll always build *.o from *.c
> files, which makes the build process simpler.
> As an aside the code being removed here was also throwing warnings
> with the "-pedantic" flag, but let's remove it instead of fixing it,
> as 544d93bc3b4 (block-sha1: remove use of obsolete x86 assembly,
> 2022-03-10) did for block-sha1/*.

While I don't agree that we shouldn't remove the other non-DC SHA-1
implementations, I do agree that we should remove this one.  Given the
testing you've done and the fact that almost everyone desiring speed is
using a 64-bit machine these days, I think it's unlikely that anyone is
using this in the real world.
brian m. carlson (he/him or they/them)
Toronto, Ontario, CA

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

  reply	other threads:[~2022-03-21 21:20 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-12  8:56 SHA1dc on mac Mike Hommey
2020-02-12 16:46 ` Eric Sunshine
2020-02-12 22:31   ` Mike Hommey
2020-02-12 22:40     ` Junio C Hamano
2020-02-23 22:37       ` [PATCH] Remove non-SHA1dc sha1 implementations Mike Hommey
2020-02-24  4:47         ` Jeff King
2020-02-24  4:52           ` Jeff King
2022-03-19  1:02         ` [PATCH] ppc: remove custom SHA-1 implementation Ævar Arnfjörð Bjarmason
2022-03-21 16:39           ` Junio C Hamano
2022-03-21 17:06           ` [PATCH v2] " Ævar Arnfjörð Bjarmason
2022-03-21 21:19             ` brian m. carlson [this message]
2022-08-31  9:18             ` [PATCH v3 0/2] Makefile + hash.h: remove PPC_SHA1 implementation Ævar Arnfjörð Bjarmason
2022-08-31  9:18               ` [PATCH v3 1/2] " Ævar Arnfjörð Bjarmason
2022-08-31  9:18               ` [PATCH v3 2/2] Makefile: use $(OBJECTS) instead of $(C_OBJ) Ævar Arnfjörð Bjarmason
2022-08-31 21:44                 ` Junio C Hamano
2022-09-01 14:52                   ` Ævar Arnfjörð Bjarmason
2022-09-01 15:48                     ` Junio C Hamano

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \

* 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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).