[DHG_packages] 01/01: haskell-cryptnite: fix aligment on some arm* kernel configurations
Gianfranco Costamagna
locutusofborg at moszumanska.debian.org
Sat Jun 24 09:24:26 UTC 2017
This is an automated email from the git hooks/post-receive script.
locutusofborg pushed a commit to branch master
in repository DHG_packages.
commit 442306e92d74161c142aad63756e66f9d3f6c2c6
Author: Steve Langasek <steve.langasek at ubuntu.com>
Date: Sat Jun 24 11:22:37 2017 +0200
haskell-cryptnite: fix aligment on some arm* kernel configurations
---
p/haskell-cryptonite/debian/changelog | 11 ++++++++++
.../debian/patches/crypto-buffer-alignment.patch | 25 ++++++++++++++++++++++
p/haskell-cryptonite/debian/patches/series | 1 +
3 files changed, 37 insertions(+)
diff --git a/p/haskell-cryptonite/debian/changelog b/p/haskell-cryptonite/debian/changelog
index 5509821..10ac20b 100644
--- a/p/haskell-cryptonite/debian/changelog
+++ b/p/haskell-cryptonite/debian/changelog
@@ -1,3 +1,14 @@
+haskell-cryptonite (0.21-2) unstable; urgency=medium
+
+ [ Gianfranco Costamagna ]
+ * Team upload
+
+ [ Steve Langasek ]
+ * debian/patches/crypto-buffer-alignment.patch: actually use the
+ aligned buffer when required. Closes: #841983.
+
+ -- Gianfranco Costamagna <locutusofborg at debian.org> Sat, 24 Jun 2017 11:21:42 +0200
+
haskell-cryptonite (0.21-1) unstable; urgency=medium
* New upstream release
diff --git a/p/haskell-cryptonite/debian/patches/crypto-buffer-alignment.patch b/p/haskell-cryptonite/debian/patches/crypto-buffer-alignment.patch
new file mode 100644
index 0000000..91d1aef
--- /dev/null
+++ b/p/haskell-cryptonite/debian/patches/crypto-buffer-alignment.patch
@@ -0,0 +1,25 @@
+Description: actually use the aligned buffer when required
+ Upstream implemented a fix for issue 108, but didn't actually use the
+ aligned buffer in place of the unaligned data. This worked fine everywhere
+ except our armhf buildds, since other archs don't actually raise SIGBUS on
+ unaligned access.
+Author: Steve Langasek <steve.langasek at ubuntu.com>
+Bug-Upstream: https://github.com/haskell-crypto/cryptonite/issues/108
+Bug-Debian: https://bugs.debian.org/841983
+Forwarded-Upstream: yes
+
+Index: haskell-cryptonite-0.21/cbits/cryptonite_sha3.c
+===================================================================
+--- haskell-cryptonite-0.21.orig/cbits/cryptonite_sha3.c
++++ haskell-cryptonite-0.21/cbits/cryptonite_sha3.c
+@@ -129,8 +129,8 @@ void cryptonite_sha3_update(struct sha3_
+ uint64_t tramp[200 - 2 * (224 / 8)];
+ ASSERT_ALIGNMENT(tramp, 8);
+ for (; len >= ctx->bufsz; len -= ctx->bufsz, data += ctx->bufsz) {
+- memcpy(tramp, data, ctx->bufsz / 8);
+- sha3_do_chunk(ctx->state, (uint64_t *) data, ctx->bufsz / 8);
++ memcpy(tramp, data, ctx->bufsz);
++ sha3_do_chunk(ctx->state, tramp, ctx->bufsz / 8);
+ }
+ } else {
+ /* process as much ctx->bufsz-block */
diff --git a/p/haskell-cryptonite/debian/patches/series b/p/haskell-cryptonite/debian/patches/series
new file mode 100644
index 0000000..e4f717e
--- /dev/null
+++ b/p/haskell-cryptonite/debian/patches/series
@@ -0,0 +1 @@
+crypto-buffer-alignment.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-haskell/DHG_packages.git
More information about the Pkg-haskell-commits
mailing list