[linux] 07/07: crypto: revert ABI break in poly1305
debian-kernel at lists.debian.org
debian-kernel at lists.debian.org
Sat Feb 17 17:38:39 UTC 2018
This is an automated email from the git hooks/post-receive script.
corsac pushed a commit to branch stretch
in repository linux.
commit 358e54dbb75e256f84b92c4c8c72af13ad1009c7
Author: Yves-Alexis Perez <corsac at corsac.net>
Date: Sat Feb 17 18:38:28 2018 +0100
crypto: revert ABI break in poly1305
---
debian/changelog | 1 +
...vert-crypto-poly1305-remove-setkey-method.patch | 86 ++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 88 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 1946eb5..c916ba7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -85,6 +85,7 @@ linux (4.9.82-1) UNRELEASED; urgency=medium
* Remove patches included in 4.9.82
* sched/rt: remove two patches from 4.9.82 which need to be applied on top
of a patch reverted for ABI change in 4.9.66.
+ * crypto: revert ABI break in poly1305
-- Yves-Alexis Perez <corsac at debian.org> Tue, 13 Feb 2018 17:44:41 +0100
diff --git a/debian/patches/debian/revert-crypto-poly1305-remove-setkey-method.patch b/debian/patches/debian/revert-crypto-poly1305-remove-setkey-method.patch
new file mode 100644
index 0000000..244a9f0
--- /dev/null
+++ b/debian/patches/debian/revert-crypto-poly1305-remove-setkey-method.patch
@@ -0,0 +1,86 @@
+From cf8534500a617ea07cae79458d4f99e509e11475 Mon Sep 17 00:00:00 2001
+From: Yves-Alexis Perez <corsac at debian.org>
+Date: Sat, 17 Feb 2018 18:01:41 +0100
+Subject: [PATCH] Revert "crypto: poly1305 - remove ->setkey() method"
+Forwarded: Not needed
+
+This reverts commit b93728341fb72fe0cf7ab24ada232ce0273e92db which is
+commit a16e772e664b9a261424107784804cffc8894977 upstream. Removing an
+exported function is an ABI break, so just revert the patch for now in
+case there are external users out there.
+---
+ arch/x86/crypto/poly1305_glue.c | 1 +
+ crypto/poly1305_generic.c | 17 ++++++++++++-----
+ include/crypto/poly1305.h | 2 ++
+ 3 files changed, 15 insertions(+), 5 deletions(-)
+
+diff --git a/arch/x86/crypto/poly1305_glue.c b/arch/x86/crypto/poly1305_glue.c
+index 28c372003e44..e32142bc071d 100644
+--- a/arch/x86/crypto/poly1305_glue.c
++++ b/arch/x86/crypto/poly1305_glue.c
+@@ -164,6 +164,7 @@ static struct shash_alg alg = {
+ .init = poly1305_simd_init,
+ .update = poly1305_simd_update,
+ .final = crypto_poly1305_final,
++ .setkey = crypto_poly1305_setkey,
+ .descsize = sizeof(struct poly1305_simd_desc_ctx),
+ .base = {
+ .cra_name = "poly1305",
+diff --git a/crypto/poly1305_generic.c b/crypto/poly1305_generic.c
+index bca99238948f..2df9835dfbc0 100644
+--- a/crypto/poly1305_generic.c
++++ b/crypto/poly1305_generic.c
+@@ -51,6 +51,17 @@ int crypto_poly1305_init(struct shash_desc *desc)
+ }
+ EXPORT_SYMBOL_GPL(crypto_poly1305_init);
+
++int crypto_poly1305_setkey(struct crypto_shash *tfm,
++ const u8 *key, unsigned int keylen)
++{
++ /* Poly1305 requires a unique key for each tag, which implies that
++ * we can't set it on the tfm that gets accessed by multiple users
++ * simultaneously. Instead we expect the key as the first 32 bytes in
++ * the update() call. */
++ return -ENOTSUPP;
++}
++EXPORT_SYMBOL_GPL(crypto_poly1305_setkey);
++
+ static void poly1305_setrkey(struct poly1305_desc_ctx *dctx, const u8 *key)
+ {
+ /* r &= 0xffffffc0ffffffc0ffffffc0fffffff */
+@@ -69,11 +80,6 @@ static void poly1305_setskey(struct poly1305_desc_ctx *dctx, const u8 *key)
+ dctx->s[3] = le32_to_cpuvp(key + 12);
+ }
+
+-/*
+- * Poly1305 requires a unique key for each tag, which implies that we can't set
+- * it on the tfm that gets accessed by multiple users simultaneously. Instead we
+- * expect the key as the first 32 bytes in the update() call.
+- */
+ unsigned int crypto_poly1305_setdesckey(struct poly1305_desc_ctx *dctx,
+ const u8 *src, unsigned int srclen)
+ {
+@@ -279,6 +285,7 @@ static struct shash_alg poly1305_alg = {
+ .init = crypto_poly1305_init,
+ .update = crypto_poly1305_update,
+ .final = crypto_poly1305_final,
++ .setkey = crypto_poly1305_setkey,
+ .descsize = sizeof(struct poly1305_desc_ctx),
+ .base = {
+ .cra_name = "poly1305",
+diff --git a/include/crypto/poly1305.h b/include/crypto/poly1305.h
+index d586f741cab5..894df59b74e4 100644
+--- a/include/crypto/poly1305.h
++++ b/include/crypto/poly1305.h
+@@ -30,6 +30,8 @@ struct poly1305_desc_ctx {
+ };
+
+ int crypto_poly1305_init(struct shash_desc *desc);
++int crypto_poly1305_setkey(struct crypto_shash *tfm,
++ const u8 *key, unsigned int keylen);
+ unsigned int crypto_poly1305_setdesckey(struct poly1305_desc_ctx *dctx,
+ const u8 *src, unsigned int srclen);
+ int crypto_poly1305_update(struct shash_desc *desc,
+--
+2.16.1
+
diff --git a/debian/patches/series b/debian/patches/series
index aec924c..f63283c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -188,3 +188,4 @@ debian/revert-sched-rt-Up-the-root-domain-ref-count-when-pa.patch
debian/revert-sched-rt-Simplify-the-IPI-based-RT-balancing-.patch
debian/revert-mm-fix-100-CPU-kswapd-busyloop-on-unreclaimab.patch
debian/revert-x86-asm-Move-status-from-thread_struct-to-thr.patch
+debian/revert-crypto-poly1305-remove-setkey-method.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git
More information about the Kernel-svn-changes
mailing list