git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>,
	"Michael Felt" <aixtools@felt.demon.nl>,
	"brian m . carlson" <sandals@crustytoothpaste.net>,
	"Dan Shumow" <shumow@gmail.com>, "Jeff King" <peff@peff.net>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: [PATCH] sha1dc: update from upstream
Date: Thu,  2 Aug 2018 20:50:44 +0000	[thread overview]
Message-ID: <20180802205044.23631-1-avarab@gmail.com> (raw)
In-Reply-To: <87o9emtuf6.fsf@evledraar.gmail.com>

Update sha1dc from the latest version by the upstream
maintainer[1]. See 2db87328ef ("Merge branch 'ab/sha1dc'", 2017-07-10)
for the last update.

This fixes an issue where AIX was wrongly detected as a Little-endian
instead of a Big-endian system. See [2][3][4].

1. https://github.com/cr-marcstevens/sha1collisiondetection/commit/232357eb2ea0397388254a4b188333a227bf5b10
2. https://github.com/cr-marcstevens/sha1collisiondetection/pull/45
3. https://github.com/cr-marcstevens/sha1collisiondetection/pull/42
4. https://public-inbox.org/git/20180729200623.GF945730@genre.crustytoothpaste.net/

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---

On Wed, Aug 01 2018, Ævar Arnfjörð Bjarmason wrote:
> https://github.com/cr-marcstevens/sha1collisiondetection/pull/45
>[...]
> It should work, but as noted in the MR please test it so we can make
> sure, and then (if you have a GitHub account) comment on the MR saying
> it works for you.

This got merged upstream, and as noted in that upstream PR I've
personally tested this on AIX under both GCC and IBM's xlc on the GCC
compile farm, it works.

 sha1collisiondetection |  2 +-
 sha1dc/sha1.c          | 12 +++++++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/sha1collisiondetection b/sha1collisiondetection
index 19d97bf5af..232357eb2e 160000
--- a/sha1collisiondetection
+++ b/sha1collisiondetection
@@ -1 +1 @@
-Subproject commit 19d97bf5af05312267c2e874ee6bcf584d9e9681
+Subproject commit 232357eb2ea0397388254a4b188333a227bf5b10
diff --git a/sha1dc/sha1.c b/sha1dc/sha1.c
index 25eded1399..df0630bc6d 100644
--- a/sha1dc/sha1.c
+++ b/sha1dc/sha1.c
@@ -93,13 +93,23 @@
 #define SHA1DC_BIGENDIAN
 
 /* Not under GCC-alike or glibc or *BSD or newlib or <processor whitelist> */
+#elif (defined(_AIX))
+
+/*
+ * Defines Big Endian on a whitelist of OSs that are known to be Big
+ * Endian-only. See
+ * https://public-inbox.org/git/93056823-2740-d072-1ebd-46b440b33d7e@felt.demon.nl/
+ */
+#define SHA1DC_BIGENDIAN
+
+/* Not under GCC-alike or glibc or *BSD or newlib or <processor whitelist> or <os whitelist> */
 #elif defined(SHA1DC_ON_INTEL_LIKE_PROCESSOR)
 /*
  * As a last resort before we do anything else we're not 100% sure
  * about below, we blacklist specific processors here. We could add
  * more, see e.g. https://wiki.debian.org/ArchitectureSpecificsMemo
  */
-#else /* Not under GCC-alike or glibc or *BSD or newlib or <processor whitelist>  or <processor blacklist> */
+#else /* Not under GCC-alike or glibc or *BSD or newlib or <processor whitelist> or <os whitelist> or <processor blacklist> */
 
 /* We do nothing more here for now */
 /*#error "Uncomment this to see if you fall through all the detection"*/
-- 
2.18.0.345.g5c9ce644c3


  reply	other threads:[~2018-08-02 20:51 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-29 16:44 git broken for AIX somewhere between 2.13.2 and 2.13.3 Michael
2018-07-29 18:10 ` brian m. carlson
2018-07-29 19:46   ` Michael
2018-07-29 20:05     ` Ævar Arnfjörð Bjarmason
2018-07-29 21:40       ` Andreas Schwab
2018-07-30  6:22         ` Michael
     [not found]   ` <2309fa7f-c2d8-ee57-aff5-b9e32d2da609@felt.demon.nl>
     [not found]     ` <20180729192753.GD945730@genre.crustytoothpaste.net>
2018-07-29 19:48       ` Michael
2018-07-29 20:06         ` brian m. carlson
2018-07-29 20:50           ` Michael
2018-07-30  9:39             ` Is detecting endianness at compile-time unworkable? Ævar Arnfjörð Bjarmason
2018-07-30 14:54               ` Junio C Hamano
2018-07-30 18:32                 ` Junio C Hamano
2018-07-30 18:39                   ` Daniel Shumow
2018-07-31 10:06                     ` Michael Felt
2018-08-01  1:35                   ` Eric Wong
2018-08-01  7:16                 ` Ævar Arnfjörð Bjarmason
2018-07-31 10:39               ` Michael Felt
2018-08-01  7:31                 ` Ævar Arnfjörð Bjarmason
2018-08-02 20:50                   ` Ævar Arnfjörð Bjarmason [this message]
2018-08-02 21:29                     ` [PATCH] sha1dc: update from upstream Michael Felt (aixtools)
2018-08-02 21:32                     ` Stefan Beller
2018-07-31 12:32               ` Is detecting endianness at compile-time unworkable? Michael Felt
2018-07-31 14:01               ` Michael Felt
2018-07-31 14:25                 ` Ævar Arnfjörð Bjarmason
2018-07-31 20:06                   ` Michael
2019-05-09  8:09 [PATCH] Improving HP-UX support Osipov, Michael
2019-05-13 22:17 ` [PATCH] sha1dc: update from upstream Ævar Arnfjörð Bjarmason
2019-05-14 11:17   ` Osipov, Michael
2019-05-15 11:48     ` Ævar Arnfjörð Bjarmason
2019-05-16  7:13       ` Osipov, Michael
2019-05-16  8:31         ` Ævar Arnfjörð Bjarmason
2019-05-16  8:40           ` Osipov, Michael

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=20180802205044.23631-1-avarab@gmail.com \
    --to=avarab@gmail.com \
    --cc=aixtools@felt.demon.nl \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    --cc=sandals@crustytoothpaste.net \
    --cc=shumow@gmail.com \
    /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 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).