Your message dated Thu, 14 May 2020 23:19:01 +0000
with message-id <[email protected]>
and subject line Bug#960588: fixed in gost-crypto 0.3.3-1
has caused the Debian Bug report #960588,
regarding gost-crypto-dkms: Linux 5.6 build failure
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
960588: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=960588
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: gost-crypto-dkms
Version: 0.3.2-2
Severity: important

Dear Maintainer,

gost-crypto fails to build against Linux 5.6:

...
  CC [M]  /home/ubuntu/gost-crypto/gost-crypto-0.3.2/gost28147_basic.o
/home/ubuntu/gost-crypto/gost-crypto-0.3.2/gost28147_basic.c: In function 
‘crypto_gost28147_set_key’:
/home/ubuntu/gost-crypto/gost-crypto-0.3.2/gost28147_basic.c:103:29: error: 
‘CRYPTO_TFM_RES_BAD_KEY_LEN’ undeclared (first use in this function); did you 
mean ‘CRYPTO_TFM_NEED_KEY’?
  103 |   crypto_tfm_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN);
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~
      |                             CRYPTO_TFM_NEED_KEY
/home/ubuntu/gost-crypto/gost-crypto-0.3.2/gost28147_basic.c:103:29: note: each 
undeclared identifier is reported only once for each function it appears in
/home/ubuntu/gost-crypto/gost-crypto-0.3.2/gost28147_basic.c: In function 
‘gost28147imit_setkey’:
/home/ubuntu/gost-crypto/gost-crypto-0.3.2/gost28147_basic.c:316:31: error: 
‘CRYPTO_TFM_RES_BAD_KEY_LEN’ undeclared (first use in this function); did you 
mean ‘CRYPTO_TFM_NEED_KEY’?
  316 |   crypto_shash_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~
      |                               CRYPTO_TFM_NEED_KEY
make[2]: *** [scripts/Makefile.build:276:
/home/ubuntu/gost-crypto/gost-crypto-0.3.2/gost28147_basic.o] Error 1
...

The attached debdiff fixes it.

-- System Information:
Debian Release: bullseye/sid
  APT prefers focal-updates
  APT policy: (500, 'focal-updates'), (500, 'focal-security'), (500, 
'focal-proposed'), (500, 'focal'), (100, 'focal-backports')
Architecture: amd64 (x86_64)

Kernel: Linux 5.4.0-31-generic (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to C.UTF-8), LANGUAGE=en_US:en (charmap=UTF-8) (ignored: LC_ALL set to 
C.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages gost-crypto-dkms depends on:
ii  dkms  2.8.1-5ubuntu1

gost-crypto-dkms recommends no packages.

gost-crypto-dkms suggests no packages.
diff -Nru gost-crypto-0.3.2/debian/changelog gost-crypto-0.3.2/debian/changelog
--- gost-crypto-0.3.2/debian/changelog  2019-08-05 01:15:18.000000000 +0000
+++ gost-crypto-0.3.2/debian/changelog  2020-05-14 09:15:50.000000000 +0000
@@ -1,3 +1,9 @@
+gost-crypto (0.3.2-3) unstable; urgency=medium
+
+  * Fix build for Linux 5.6.
+
+ -- Paolo Pisati <[email protected]>  Thu, 14 May 2020 09:15:50 +0000
+
 gost-crypto (0.3.2-2) unstable; urgency=medium
 
   * d/control: bump Standards-Version to 4.4.0 (no changes needed)
diff -Nru 
gost-crypto-0.3.2/debian/patches/0001-Linux-5.6-garbage-collect-CRYPTO_TFM_RES_BAD_KEY_LEN.patch
 
gost-crypto-0.3.2/debian/patches/0001-Linux-5.6-garbage-collect-CRYPTO_TFM_RES_BAD_KEY_LEN.patch
--- 
gost-crypto-0.3.2/debian/patches/0001-Linux-5.6-garbage-collect-CRYPTO_TFM_RES_BAD_KEY_LEN.patch
    1970-01-01 00:00:00.000000000 +0000
+++ 
gost-crypto-0.3.2/debian/patches/0001-Linux-5.6-garbage-collect-CRYPTO_TFM_RES_BAD_KEY_LEN.patch
    2020-05-14 09:15:28.000000000 +0000
@@ -0,0 +1,93 @@
+From 7754f7c84e6330a9c0918a4534fedfd1095295c7 Mon Sep 17 00:00:00 2001
+From: Paolo Pisati <[email protected]>
+Date: Thu, 14 May 2020 09:11:04 +0000
+Subject: [PATCH] Linux 5.6: garbage collect CRYPTO_TFM_RES_BAD_KEY_LEN flag
+
+commit 674f368a952c48ede71784935a799a5205b92b6c "crypto: remove
+CRYPTO_TFM_RES_BAD_KEY_LEN" in Linux 5.6 removed the above flag since it wasn't
+enforced anywhere (and thus useless) and any external modules now using it end
+up FTBFS.
+
+Signed-off-by: Paolo Pisati <[email protected]>
+---
+ gost28147_basic.c    | 14 +++++---------
+ kuznyechik_generic.c |  4 +---
+ magma_generic.c      |  4 +---
+ 3 files changed, 7 insertions(+), 15 deletions(-)
+
+diff --git a/gost28147_basic.c b/gost28147_basic.c
+index 18fa75b..f524519 100644
+--- a/gost28147_basic.c
++++ b/gost28147_basic.c
+@@ -89,9 +89,9 @@ EXPORT_SYMBOL_GPL(gost28147_param_TC26_Z);
+  * @key_len:  The size of the key.
+  * @param:    GOST parameters to be used.
+  *
+- * Returns 0 on success, on failure the %CRYPTO_TFM_RES_BAD_KEY_LEN flag in 
tfm
+- * is set. &crypto_gost28147_ctx _must_ be the private data embedded in @tfm
+- * which is retrieved with crypto_tfm_ctx().
++ * Returns 0 on success. &crypto_gost28147_ctx _must_ be
++ * the private data embedded in @tfm which is retrieved
++ * with crypto_tfm_ctx().
+  */
+ int crypto_gost28147_set_key(struct crypto_tfm *tfm, const u8 *in_key,
+               unsigned int key_len, const struct gost28147_param *param)
+@@ -99,10 +99,8 @@ int crypto_gost28147_set_key(struct crypto_tfm *tfm, const 
u8 *in_key,
+       struct crypto_gost28147_ctx *ctx = crypto_tfm_ctx(tfm);
+       int i;
+ 
+-      if (key_len != GOST28147_KEY_SIZE) {
+-              crypto_tfm_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN);
++      if (key_len != GOST28147_KEY_SIZE)
+               return -EINVAL;
+-      };
+ 
+       for (i = 0; i < GOST28147_KEY_SIZE / 4; i++, in_key += 4)
+               ctx->key[i] = get_unaligned_le32(in_key);
+@@ -312,10 +310,8 @@ static int gost28147imit_setkey(struct crypto_shash *tfm, 
const u8 *key,
+       struct crypto_gost28147imit_ctx *ctx = crypto_shash_ctx(tfm);
+       int i;
+ 
+-      if (key_len != GOST28147IMIT_KEY_SIZE) {
+-              crypto_shash_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN);
++      if (key_len != GOST28147IMIT_KEY_SIZE)
+               return -EINVAL;
+-      };
+ 
+       for (i = 0; i < GOST28147IMIT_KEY_SIZE / 4; i++, key += 4)
+               ctx->key[i] = get_unaligned_le32(key);
+diff --git a/kuznyechik_generic.c b/kuznyechik_generic.c
+index 538b52f..f72ba6d 100644
+--- a/kuznyechik_generic.c
++++ b/kuznyechik_generic.c
+@@ -169,10 +169,8 @@ static int kuznyechik_set_key(struct crypto_tfm *tfm, 
const u8 *in_key,
+       u32 *flags = &tfm->crt_flags;
+       unsigned int i;
+ 
+-      if (key_len != KUZNYECHIK_KEY_SIZE) {
+-              *flags |= CRYPTO_TFM_RES_BAD_KEY_LEN;
++      if (key_len != KUZNYECHIK_KEY_SIZE)
+               return -EINVAL;
+-      };
+ 
+       memcpy(ctx->key, in_key, 32);
+       subkey(ctx->key + 32, ctx->key, 0);
+diff --git a/magma_generic.c b/magma_generic.c
+index 1b1532e..f2d8a71 100644
+--- a/magma_generic.c
++++ b/magma_generic.c
+@@ -26,10 +26,8 @@ static int magma_set_key(struct crypto_tfm *tfm, const u8 
*in_key,
+       u32 *flags = &tfm->crt_flags;
+       int i;
+ 
+-      if (key_len != MAGMA_KEY_SIZE) {
+-              *flags |= CRYPTO_TFM_RES_BAD_KEY_LEN;
++      if (key_len != MAGMA_KEY_SIZE)
+               return -EINVAL;
+-      };
+ 
+       for (i = 0; i < MAGMA_KEY_SIZE / 4; i++, in_key += 4)
+               ctx->key[i] = get_unaligned_be32(in_key);
+-- 
+2.25.1
+
diff -Nru gost-crypto-0.3.2/debian/patches/series 
gost-crypto-0.3.2/debian/patches/series
--- gost-crypto-0.3.2/debian/patches/series     1970-01-01 00:00:00.000000000 
+0000
+++ gost-crypto-0.3.2/debian/patches/series     2020-05-14 09:15:47.000000000 
+0000
@@ -0,0 +1 @@
+0001-Linux-5.6-garbage-collect-CRYPTO_TFM_RES_BAD_KEY_LEN.patch

--- End Message ---
--- Begin Message ---
Source: gost-crypto
Source-Version: 0.3.3-1
Done: Dmitry Baryshkov <[email protected]>

We believe that the bug you reported is fixed in the latest version of
gost-crypto, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Dmitry Baryshkov <[email protected]> (supplier of updated gost-crypto 
package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Fri, 15 May 2020 01:57:02 +0300
Source: gost-crypto
Architecture: source
Version: 0.3.3-1
Distribution: unstable
Urgency: medium
Maintainer: Dmitry Baryshkov <[email protected]>
Changed-By: Dmitry Baryshkov <[email protected]>
Closes: 960588
Changes:
 gost-crypto (0.3.3-1) unstable; urgency=medium
 .
   * New upstream version 0.3.3 (Closes: #960588)
   * d/control: update my surname
Checksums-Sha1:
 0c70ecaa2236cd2c4116c0988f21b3f33343661f 1585 gost-crypto_0.3.3-1.dsc
 3f5a0cc1489d7b0c3fb264d02632ed801c5c6960 417138 gost-crypto_0.3.3.orig.tar.gz
 366dc7619f462bff83986981dd6ace50e3a06e8d 3112 gost-crypto_0.3.3-1.debian.tar.xz
 dddd046b21d8f4d1d5656ac84edb7de77bc70118 5898 
gost-crypto_0.3.3-1_source.buildinfo
Checksums-Sha256:
 899998ca9e53964d4957ec38716f0d729213c555d45bc7635937988516b6b546 1585 
gost-crypto_0.3.3-1.dsc
 7d1ff1f67cb8bf7b066a8f23d7d023c9683837b209c5df5bddcb90788d1b73e4 417138 
gost-crypto_0.3.3.orig.tar.gz
 b5f0b8858df87c8110cced0f124011c52947534599c3b3572898157393b8cb56 3112 
gost-crypto_0.3.3-1.debian.tar.xz
 824e8053f4e6c0679595434a78aae3c8a1f0818863b888de6790768a6ca20007 5898 
gost-crypto_0.3.3-1_source.buildinfo
Files:
 a3ad403af493e20cadc1ccf01d171f9d 1585 kernel optional gost-crypto_0.3.3-1.dsc
 07be07a50ab3c640030b1000fd04e2b7 417138 kernel optional 
gost-crypto_0.3.3.orig.tar.gz
 3f88b79f33e83d6e08e2c417ad27029d 3112 kernel optional 
gost-crypto_0.3.3-1.debian.tar.xz
 9e52b44265b2c70098cd16549ad0f766 5898 kernel optional 
gost-crypto_0.3.3-1_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQFJBAEBCgAzFiEETHCElVyyY1bwuJV/izyKPgIpKNUFAl69zOEVHGRiYXJ5c2hr
b3ZAZ21haWwuY29tAAoJEIs8ij4CKSjVpf4H/iuB9YA85zZ19M4BsWJZg6gauqnC
UP9ghB9RKkaLFbHt2BBWbupGuiOlw+T3SetN+yiu3R1EbFWgSHtVmRPQoqoL2rgz
Bo2fm7wx7YoMwM4x1Ud4lYpC1bGsKdUhSTr0qGctr0zleolvpQXjmBGqRvkAu0QR
ee3Sh6PAqMcn/Uha7ICBfHX86fcSF3cqTmLyfGkHcAZxbTuAM/IE3eURMvkSVa3F
kAcUXi9Ycmh2X46Y/j04VdV6S9LPlvxVzQAOB2KGcexrIgebohGFBaWm0YJJmNQK
mlTa5KsvluaIdlKJqnDRW61XkDbtB6cV1AhG50JueTuIemlmMz/n88lzhhE=
=+cDL
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to