[PR #156] [CLOSED] Revert "compat: fix compilation on kernels >= 6.19 (blake2s API change)" #211

Closed
opened 2026-10-13 21:07:41 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/pull/156
Author: @h1de0x
Created: 3/24/2026
Status: ❌ Closed

Base: master ← Head: revert-145-fix/kernel-6.19-blake2s-compat


📝 Commits (1)

  • 71d4d64 Revert "compat: fix compilation on kernels >= 6.19 (blake2s API change) (#145)"

📊 Changes

3 files changed (+9 additions, -17 deletions)

View changed files

📝 src/compat/compat.h (+0 -8)
📝 src/cookie.c (+4 -4)
📝 src/noise.c (+5 -5)

📄 Description

Reverts amnezia-vpn/amneziawg-linux-kernel-module#145

Compilation issues in Ubuntu 20.04

  CC [M]  /var/lib/dkms/amneziawg/1.0.0/build/crypto/zinc/blake2s/blake2s.o
In file included from /var/lib/dkms/amneziawg/1.0.0/build/crypto/zinc/blake2s/blake2s.c:11:
/var/lib/dkms/amneziawg/1.0.0/build/crypto/include/zinc/blake2s.h:13:6: error: nested redefinition of 'enum blake2s_lengths'
   13 | enum blake2s_lengths {
      |      ^~~~~~~~~~~~~~~
/var/lib/dkms/amneziawg/1.0.0/build/crypto/include/zinc/blake2s.h:13:6: error: redeclaration of 'enum blake2s_lengths'
In file included from /var/lib/dkms/amneziawg/1.0.0/build/compat/compat.h:1404,
                 from <command-line>:
./include/crypto/blake2s.h:14:6: note: originally defined here
   14 | enum blake2s_lengths {
      |      ^~~~~~~~~~~~~~~
In file included from /var/lib/dkms/amneziawg/1.0.0/build/crypto/zinc/blake2s/blake2s.c:11:
/var/lib/dkms/amneziawg/1.0.0/build/crypto/include/zinc/blake2s.h:14:2: error: redeclaration of enumerator 'BLAKE2S_BLOCK_SIZE'
   14 |  BLAKE2S_BLOCK_SIZE = 64,
      |  ^~~~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/amneziawg/1.0.0/build/compat/compat.h:1404,
                 from <command-line>:
./include/crypto/blake2s.h:15:2: note: previous definition of 'BLAKE2S_BLOCK_SIZE' was here
   15 |  BLAKE2S_BLOCK_SIZE = 64,
      |  ^~~~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/amneziawg/1.0.0/build/crypto/zinc/blake2s/blake2s.c:11:
/var/lib/dkms/amneziawg/1.0.0/build/crypto/include/zinc/blake2s.h:15:2: error: redeclaration of enumerator 'BLAKE2S_HASH_SIZE'
   15 |  BLAKE2S_HASH_SIZE = 32,
      |  ^~~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/amneziawg/1.0.0/build/compat/compat.h:1404,
                 from <command-line>:
./include/crypto/blake2s.h:16:2: note: previous definition of 'BLAKE2S_HASH_SIZE' was here
   16 |  BLAKE2S_HASH_SIZE = 32,
./include/crypto/blake2s.h:16:2: note: previous definition of 'BLAKE2S_HASH_SIZE' was here
   16 |  BLAKE2S_HASH_SIZE = 32,
      |  ^~~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/amneziawg/1.0.0/build/crypto/zinc/blake2s/blake2s.c:11:
/var/lib/dkms/amneziawg/1.0.0/build/crypto/include/zinc/blake2s.h:16:2: error: redeclaration of enumerator 'BLAKE2S_KEY_SIZE'
   16 |  BLAKE2S_KEY_SIZE = 32
      |  ^~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/amneziawg/1.0.0/build/compat/compat.h:1404,
                 from <command-line>:
./include/crypto/blake2s.h:17:2: note: previous definition of 'BLAKE2S_KEY_SIZE' was here
   17 |  BLAKE2S_KEY_SIZE = 32,
      |  ^~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/amneziawg/1.0.0/build/crypto/zinc/blake2s/blake2s.c:11:
/var/lib/dkms/amneziawg/1.0.0/build/crypto/include/zinc/blake2s.h:19:8: error: redefinition of 'struct blake2s_state'
   19 | struct blake2s_state {
      |        ^~~~~~~~~~~~~
In file included from /var/lib/dkms/amneziawg/1.0.0/build/compat/compat.h:1404,
                 from <command-line>:
./include/crypto/blake2s.h:25:8: note: originally defined here
   25 | struct blake2s_state {
      |        ^~~~~~~~~~~~~
In file included from /var/lib/dkms/amneziawg/1.0.0/build/crypto/zinc/blake2s/blake2s.c:11:
/var/lib/dkms/amneziawg/1.0.0/build/crypto/include/zinc/blake2s.h:28:6: error: conflicting types for 'blake2s_init'
   28 | void blake2s_init(struct blake2s_state *state, const size_t outlen);
      |      ^~~~~~~~~~~~
In file included from /var/lib/dkms/amneziawg/1.0.0/build/compat/compat.h:1404,
                 from <command-line>:
./include/crypto/blake2s.h:63:20: note: previous definition of 'blake2s_init' was here
   63 | static inline void blake2s_init(struct blake2s_state *state,
      |                    ^~~~~~~~~~~~
In file included from /var/lib/dkms/amneziawg/1.0.0/build/crypto/zinc/blake2s/blake2s.c:11:
/var/lib/dkms/amneziawg/1.0.0/build/crypto/include/zinc/blake2s.h:29:6: error: conflicting types for 'blake2s_init_key'
   29 | void blake2s_init_key(struct blake2s_state *state, const size_t outlen,
      |      ^~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/amneziawg/1.0.0/build/compat/compat.h:1404,
                 from <command-line>:
./include/crypto/blake2s.h:70:20: note: previous definition of 'blake2s_init_key' was here
   70 | static inline void blake2s_init_key(struct blake2s_state *state,
      |                    ^~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/amneziawg/1.0.0/build/crypto/zinc/blake2s/blake2s.c:11:
/var/lib/dkms/amneziawg/1.0.0/build/crypto/include/zinc/blake2s.h:31:6: error: conflicting types for 'blake2s_update'
   31 | void blake2s_update(struct blake2s_state *state, const u8 *in, size_t inlen);
      |      ^~~~~~~~~~~~~~
In file included from /var/lib/dkms/amneziawg/1.0.0/build/compat/compat.h:1404,
                 from <command-line>:
./include/crypto/blake2s.h:45:6: note: previous declaration of 'blake2s_update' was here
   45 | void blake2s_update(struct blake2s_state *state, const u8 *in, size_t inlen);
      |      ^~~~~~~~~~~~~~
In file included from /var/lib/dkms/amneziawg/1.0.0/build/crypto/zinc/blake2s/blake2s.c:11:
/var/lib/dkms/amneziawg/1.0.0/build/crypto/include/zinc/blake2s.h:32:6: error: conflicting types for 'blake2s_final'
   32 | void blake2s_final(struct blake2s_state *state, u8 *out);
      |      ^~~~~~~~~~~~~
In file included from /var/lib/dkms/amneziawg/1.0.0/build/compat/compat.h:1404,
      |      ^~~~~~~~~~~~~
In file included from /var/lib/dkms/amneziawg/1.0.0/build/compat/compat.h:1404,
                 from <command-line>:
./include/crypto/blake2s.h:46:6: note: previous declaration of 'blake2s_final' was here
   46 | void blake2s_final(struct blake2s_state *state, u8 *out);
      |      ^~~~~~~~~~~~~
In file included from <command-line>:
/var/lib/dkms/amneziawg/1.0.0/build/compat/compat.h:1407:2: error: conflicting types for 'blake2s'
 1407 |  blake2s(out, in, key, outlen, inlen, keylen)
      |  ^~~~~~~
/var/lib/dkms/amneziawg/1.0.0/build/crypto/include/zinc/blake2s.h:34:20: note: in expansion of macro 'blake2s'
   34 | static inline void blake2s(u8 *out, const u8 *in, const u8 *key,
      |                    ^~~~~~~
In file included from /var/lib/dkms/amneziawg/1.0.0/build/compat/compat.h:1404,
                 from <command-line>:
./include/crypto/blake2s.h:83:20: note: previous definition of 'blake2s' was here
   83 | static inline void blake2s(u8 *out, const u8 *in, const u8 *key,
      |                    ^~~~~~~
/var/lib/dkms/amneziawg/1.0.0/build/crypto/zinc/blake2s/blake2s.c:52:20: error: conflicting types for 'blake2s_init_param'
   52 | static inline void blake2s_init_param(struct blake2s_state *state,
      |                    ^~~~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/amneziawg/1.0.0/build/compat/compat.h:1404,
                 from <command-line>:
./include/crypto/blake2s.h:48:20: note: previous definition of 'blake2s_init_param' was here
   48 | static inline void blake2s_init_param(struct blake2s_state *state,
      |                    ^~~~~~~~~~~~~~~~~~
/var/lib/dkms/amneziawg/1.0.0/build/crypto/zinc/blake2s/blake2s.c:170:6: error: conflicting types for 'blake2s_update'
  170 | void blake2s_update(struct blake2s_state *state, const u8 *in, size_t inlen)
      |      ^~~~~~~~~~~~~~
In file included from /var/lib/dkms/amneziawg/1.0.0/build/compat/compat.h:1404,
                 from <command-line>:
./include/crypto/blake2s.h:45:6: note: previous declaration of 'blake2s_update' was here
   45 | void blake2s_update(struct blake2s_state *state, const u8 *in, size_t inlen);
      |      ^~~~~~~~~~~~~~
/var/lib/dkms/amneziawg/1.0.0/build/crypto/zinc/blake2s/blake2s.c:194:6: error: conflicting types for 'blake2s_final'
  194 | void blake2s_final(struct blake2s_state *state, u8 *out)
      |      ^~~~~~~~~~~~~
In file included from /var/lib/dkms/amneziawg/1.0.0/build/compat/compat.h:1404,
                 from <command-line>:
./include/crypto/blake2s.h:46:6: note: previous declaration of 'blake2s_final' was here
   46 | void blake2s_final(struct blake2s_state *state, u8 *out);
      |      ^~~~~~~~~~~~~
make[1]: *** [scripts/Makefile.build:270: /var/lib/dkms/amneziawg/1.0.0/build/crypto/zinc/blake2s/blake2s.o] Error 1


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/pull/156 **Author:** [@h1de0x](https://github.com/h1de0x) **Created:** 3/24/2026 **Status:** ❌ Closed **Base:** `master` ← **Head:** `revert-145-fix/kernel-6.19-blake2s-compat` --- ### 📝 Commits (1) - [`71d4d64`](https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/commit/71d4d645299e652a81fffab0cf2ac11fa5781954) Revert "compat: fix compilation on kernels >= 6.19 (blake2s API change) (#145)" ### 📊 Changes **3 files changed** (+9 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `src/compat/compat.h` (+0 -8) 📝 `src/cookie.c` (+4 -4) 📝 `src/noise.c` (+5 -5) </details> ### 📄 Description Reverts amnezia-vpn/amneziawg-linux-kernel-module#145 Compilation issues in Ubuntu 20.04 ``` CC [M] /var/lib/dkms/amneziawg/1.0.0/build/crypto/zinc/blake2s/blake2s.o In file included from /var/lib/dkms/amneziawg/1.0.0/build/crypto/zinc/blake2s/blake2s.c:11: /var/lib/dkms/amneziawg/1.0.0/build/crypto/include/zinc/blake2s.h:13:6: error: nested redefinition of 'enum blake2s_lengths' 13 | enum blake2s_lengths { | ^~~~~~~~~~~~~~~ /var/lib/dkms/amneziawg/1.0.0/build/crypto/include/zinc/blake2s.h:13:6: error: redeclaration of 'enum blake2s_lengths' In file included from /var/lib/dkms/amneziawg/1.0.0/build/compat/compat.h:1404, from <command-line>: ./include/crypto/blake2s.h:14:6: note: originally defined here 14 | enum blake2s_lengths { | ^~~~~~~~~~~~~~~ In file included from /var/lib/dkms/amneziawg/1.0.0/build/crypto/zinc/blake2s/blake2s.c:11: /var/lib/dkms/amneziawg/1.0.0/build/crypto/include/zinc/blake2s.h:14:2: error: redeclaration of enumerator 'BLAKE2S_BLOCK_SIZE' 14 | BLAKE2S_BLOCK_SIZE = 64, | ^~~~~~~~~~~~~~~~~~ In file included from /var/lib/dkms/amneziawg/1.0.0/build/compat/compat.h:1404, from <command-line>: ./include/crypto/blake2s.h:15:2: note: previous definition of 'BLAKE2S_BLOCK_SIZE' was here 15 | BLAKE2S_BLOCK_SIZE = 64, | ^~~~~~~~~~~~~~~~~~ In file included from /var/lib/dkms/amneziawg/1.0.0/build/crypto/zinc/blake2s/blake2s.c:11: /var/lib/dkms/amneziawg/1.0.0/build/crypto/include/zinc/blake2s.h:15:2: error: redeclaration of enumerator 'BLAKE2S_HASH_SIZE' 15 | BLAKE2S_HASH_SIZE = 32, | ^~~~~~~~~~~~~~~~~ In file included from /var/lib/dkms/amneziawg/1.0.0/build/compat/compat.h:1404, from <command-line>: ./include/crypto/blake2s.h:16:2: note: previous definition of 'BLAKE2S_HASH_SIZE' was here 16 | BLAKE2S_HASH_SIZE = 32, ./include/crypto/blake2s.h:16:2: note: previous definition of 'BLAKE2S_HASH_SIZE' was here 16 | BLAKE2S_HASH_SIZE = 32, | ^~~~~~~~~~~~~~~~~ In file included from /var/lib/dkms/amneziawg/1.0.0/build/crypto/zinc/blake2s/blake2s.c:11: /var/lib/dkms/amneziawg/1.0.0/build/crypto/include/zinc/blake2s.h:16:2: error: redeclaration of enumerator 'BLAKE2S_KEY_SIZE' 16 | BLAKE2S_KEY_SIZE = 32 | ^~~~~~~~~~~~~~~~ In file included from /var/lib/dkms/amneziawg/1.0.0/build/compat/compat.h:1404, from <command-line>: ./include/crypto/blake2s.h:17:2: note: previous definition of 'BLAKE2S_KEY_SIZE' was here 17 | BLAKE2S_KEY_SIZE = 32, | ^~~~~~~~~~~~~~~~ In file included from /var/lib/dkms/amneziawg/1.0.0/build/crypto/zinc/blake2s/blake2s.c:11: /var/lib/dkms/amneziawg/1.0.0/build/crypto/include/zinc/blake2s.h:19:8: error: redefinition of 'struct blake2s_state' 19 | struct blake2s_state { | ^~~~~~~~~~~~~ In file included from /var/lib/dkms/amneziawg/1.0.0/build/compat/compat.h:1404, from <command-line>: ./include/crypto/blake2s.h:25:8: note: originally defined here 25 | struct blake2s_state { | ^~~~~~~~~~~~~ In file included from /var/lib/dkms/amneziawg/1.0.0/build/crypto/zinc/blake2s/blake2s.c:11: /var/lib/dkms/amneziawg/1.0.0/build/crypto/include/zinc/blake2s.h:28:6: error: conflicting types for 'blake2s_init' 28 | void blake2s_init(struct blake2s_state *state, const size_t outlen); | ^~~~~~~~~~~~ In file included from /var/lib/dkms/amneziawg/1.0.0/build/compat/compat.h:1404, from <command-line>: ./include/crypto/blake2s.h:63:20: note: previous definition of 'blake2s_init' was here 63 | static inline void blake2s_init(struct blake2s_state *state, | ^~~~~~~~~~~~ In file included from /var/lib/dkms/amneziawg/1.0.0/build/crypto/zinc/blake2s/blake2s.c:11: /var/lib/dkms/amneziawg/1.0.0/build/crypto/include/zinc/blake2s.h:29:6: error: conflicting types for 'blake2s_init_key' 29 | void blake2s_init_key(struct blake2s_state *state, const size_t outlen, | ^~~~~~~~~~~~~~~~ In file included from /var/lib/dkms/amneziawg/1.0.0/build/compat/compat.h:1404, from <command-line>: ./include/crypto/blake2s.h:70:20: note: previous definition of 'blake2s_init_key' was here 70 | static inline void blake2s_init_key(struct blake2s_state *state, | ^~~~~~~~~~~~~~~~ In file included from /var/lib/dkms/amneziawg/1.0.0/build/crypto/zinc/blake2s/blake2s.c:11: /var/lib/dkms/amneziawg/1.0.0/build/crypto/include/zinc/blake2s.h:31:6: error: conflicting types for 'blake2s_update' 31 | void blake2s_update(struct blake2s_state *state, const u8 *in, size_t inlen); | ^~~~~~~~~~~~~~ In file included from /var/lib/dkms/amneziawg/1.0.0/build/compat/compat.h:1404, from <command-line>: ./include/crypto/blake2s.h:45:6: note: previous declaration of 'blake2s_update' was here 45 | void blake2s_update(struct blake2s_state *state, const u8 *in, size_t inlen); | ^~~~~~~~~~~~~~ In file included from /var/lib/dkms/amneziawg/1.0.0/build/crypto/zinc/blake2s/blake2s.c:11: /var/lib/dkms/amneziawg/1.0.0/build/crypto/include/zinc/blake2s.h:32:6: error: conflicting types for 'blake2s_final' 32 | void blake2s_final(struct blake2s_state *state, u8 *out); | ^~~~~~~~~~~~~ In file included from /var/lib/dkms/amneziawg/1.0.0/build/compat/compat.h:1404, | ^~~~~~~~~~~~~ In file included from /var/lib/dkms/amneziawg/1.0.0/build/compat/compat.h:1404, from <command-line>: ./include/crypto/blake2s.h:46:6: note: previous declaration of 'blake2s_final' was here 46 | void blake2s_final(struct blake2s_state *state, u8 *out); | ^~~~~~~~~~~~~ In file included from <command-line>: /var/lib/dkms/amneziawg/1.0.0/build/compat/compat.h:1407:2: error: conflicting types for 'blake2s' 1407 | blake2s(out, in, key, outlen, inlen, keylen) | ^~~~~~~ /var/lib/dkms/amneziawg/1.0.0/build/crypto/include/zinc/blake2s.h:34:20: note: in expansion of macro 'blake2s' 34 | static inline void blake2s(u8 *out, const u8 *in, const u8 *key, | ^~~~~~~ In file included from /var/lib/dkms/amneziawg/1.0.0/build/compat/compat.h:1404, from <command-line>: ./include/crypto/blake2s.h:83:20: note: previous definition of 'blake2s' was here 83 | static inline void blake2s(u8 *out, const u8 *in, const u8 *key, | ^~~~~~~ /var/lib/dkms/amneziawg/1.0.0/build/crypto/zinc/blake2s/blake2s.c:52:20: error: conflicting types for 'blake2s_init_param' 52 | static inline void blake2s_init_param(struct blake2s_state *state, | ^~~~~~~~~~~~~~~~~~ In file included from /var/lib/dkms/amneziawg/1.0.0/build/compat/compat.h:1404, from <command-line>: ./include/crypto/blake2s.h:48:20: note: previous definition of 'blake2s_init_param' was here 48 | static inline void blake2s_init_param(struct blake2s_state *state, | ^~~~~~~~~~~~~~~~~~ /var/lib/dkms/amneziawg/1.0.0/build/crypto/zinc/blake2s/blake2s.c:170:6: error: conflicting types for 'blake2s_update' 170 | void blake2s_update(struct blake2s_state *state, const u8 *in, size_t inlen) | ^~~~~~~~~~~~~~ In file included from /var/lib/dkms/amneziawg/1.0.0/build/compat/compat.h:1404, from <command-line>: ./include/crypto/blake2s.h:45:6: note: previous declaration of 'blake2s_update' was here 45 | void blake2s_update(struct blake2s_state *state, const u8 *in, size_t inlen); | ^~~~~~~~~~~~~~ /var/lib/dkms/amneziawg/1.0.0/build/crypto/zinc/blake2s/blake2s.c:194:6: error: conflicting types for 'blake2s_final' 194 | void blake2s_final(struct blake2s_state *state, u8 *out) | ^~~~~~~~~~~~~ In file included from /var/lib/dkms/amneziawg/1.0.0/build/compat/compat.h:1404, from <command-line>: ./include/crypto/blake2s.h:46:6: note: previous declaration of 'blake2s_final' was here 46 | void blake2s_final(struct blake2s_state *state, u8 *out); | ^~~~~~~~~~~~~ make[1]: *** [scripts/Makefile.build:270: /var/lib/dkms/amneziawg/1.0.0/build/crypto/zinc/blake2s/blake2s.o] Error 1 ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-13 21:07:41 +00:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amneziawg-linux-kernel-module#211
No description provided.