kernel: 5.4: import wireguard backport
Rather than using the clunky, old, slower wireguard-linux-compat out of
tree module, this commit does a patch-by-patch backport of upstream's
wireguard to 5.4. This specific backport is in widespread use, being
part of SUSE's enterprise kernel, Oracle's enterprise kernel, Google's
Android kernel, Gentoo's distro kernel, and probably more I've forgotten
about. It's definately the "more proper" way of adding wireguard to a
kernel than the ugly compat.h hell of the wireguard-linux-compat repo.
And most importantly for OpenWRT, it allows using the same module
configuration code for 5.10 as for 5.4, with no need for bifurcation.
These patches are from the backport tree which is maintained in the
open here: https://git.zx2c4.com/wireguard-linux/log/?h=backport-5.4.y
I'll be sending PRs to update this as needed.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
(cherry picked from commit 3888fa78802354ab7bbd19b7d061fd80a16ce06b)
(cherry picked from commit d54072587146dd0db9bb52b513234d944edabda3)
(cherry picked from commit 196f3d586f11d96ba4ab60068cfb12420bcd20fd)
(cherry picked from commit 3500fd7938a6d0c0e320295f0aa2fa34b1ebc08d)
(cherry picked from commit 23b801d3ba57e34cc609ea40982c7fbed08164e9)
(cherry picked from commit 0c0cb97da7f5cc06919449131dd57ed805f8f78d)
(cherry picked from commit 2a27f6f90a430342cdbe84806e8b10acff446a2d)
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
2021-02-19 13:29:04 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Ard Biesheuvel <ardb@kernel.org>
|
|
|
|
Date: Fri, 8 Nov 2019 13:22:07 +0100
|
|
|
|
Subject: [PATCH] crypto: lib - tidy up lib/crypto Kconfig and Makefile
|
|
|
|
|
|
|
|
commit 746b2e024c67aa605ac12d135cd7085a49cf9dc4 upstream.
|
|
|
|
|
|
|
|
In preparation of introducing a set of crypto library interfaces, tidy
|
|
|
|
up the Makefile and split off the Kconfig symbols into a separate file.
|
|
|
|
|
|
|
|
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
|
|
|
|
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
|
|
|
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
|
|
|
---
|
|
|
|
crypto/Kconfig | 13 +------------
|
|
|
|
lib/crypto/Kconfig | 15 +++++++++++++++
|
|
|
|
lib/crypto/Makefile | 16 ++++++++--------
|
|
|
|
3 files changed, 24 insertions(+), 20 deletions(-)
|
|
|
|
create mode 100644 lib/crypto/Kconfig
|
|
|
|
|
|
|
|
--- a/crypto/Kconfig
|
|
|
|
+++ b/crypto/Kconfig
|
|
|
|
@@ -878,9 +878,6 @@ config CRYPTO_SHA1_PPC_SPE
|
|
|
|
SHA-1 secure hash standard (DFIPS 180-4) implemented
|
|
|
|
using powerpc SPE SIMD instruction set.
|
|
|
|
|
|
|
|
-config CRYPTO_LIB_SHA256
|
|
|
|
- tristate
|
|
|
|
-
|
|
|
|
config CRYPTO_SHA256
|
|
|
|
tristate "SHA224 and SHA256 digest algorithm"
|
|
|
|
select CRYPTO_HASH
|
|
|
|
@@ -1019,9 +1016,6 @@ config CRYPTO_GHASH_CLMUL_NI_INTEL
|
|
|
|
|
|
|
|
comment "Ciphers"
|
|
|
|
|
|
|
|
-config CRYPTO_LIB_AES
|
|
|
|
- tristate
|
|
|
|
-
|
|
|
|
config CRYPTO_AES
|
|
|
|
tristate "AES cipher algorithms"
|
|
|
|
select CRYPTO_ALGAPI
|
|
|
|
@@ -1150,9 +1144,6 @@ config CRYPTO_ANUBIS
|
|
|
|
<https://www.cosic.esat.kuleuven.be/nessie/reports/>
|
|
|
|
<http://www.larc.usp.br/~pbarreto/AnubisPage.html>
|
|
|
|
|
|
|
|
-config CRYPTO_LIB_ARC4
|
|
|
|
- tristate
|
|
|
|
-
|
|
|
|
config CRYPTO_ARC4
|
|
|
|
tristate "ARC4 cipher algorithm"
|
|
|
|
select CRYPTO_BLKCIPHER
|
|
|
|
@@ -1339,9 +1330,6 @@ config CRYPTO_CAST6_AVX_X86_64
|
|
|
|
This module provides the Cast6 cipher algorithm that processes
|
|
|
|
eight blocks parallel using the AVX instruction set.
|
|
|
|
|
|
|
|
-config CRYPTO_LIB_DES
|
|
|
|
- tristate
|
|
|
|
-
|
|
|
|
config CRYPTO_DES
|
|
|
|
tristate "DES and Triple DES EDE cipher algorithms"
|
|
|
|
select CRYPTO_ALGAPI
|
|
|
|
@@ -1845,6 +1833,7 @@ config CRYPTO_STATS
|
|
|
|
config CRYPTO_HASH_INFO
|
|
|
|
bool
|
|
|
|
|
|
|
|
+source "lib/crypto/Kconfig"
|
|
|
|
source "drivers/crypto/Kconfig"
|
|
|
|
source "crypto/asymmetric_keys/Kconfig"
|
|
|
|
source "certs/Kconfig"
|
|
|
|
--- /dev/null
|
|
|
|
+++ b/lib/crypto/Kconfig
|
|
|
|
@@ -0,0 +1,15 @@
|
|
|
|
+# SPDX-License-Identifier: GPL-2.0
|
|
|
|
+
|
|
|
|
+comment "Crypto library routines"
|
|
|
|
+
|
|
|
|
+config CRYPTO_LIB_AES
|
|
|
|
+ tristate
|
|
|
|
+
|
|
|
|
+config CRYPTO_LIB_ARC4
|
|
|
|
+ tristate
|
|
|
|
+
|
|
|
|
+config CRYPTO_LIB_DES
|
|
|
|
+ tristate
|
|
|
|
+
|
|
|
|
+config CRYPTO_LIB_SHA256
|
|
|
|
+ tristate
|
|
|
|
--- a/lib/crypto/Makefile
|
|
|
|
+++ b/lib/crypto/Makefile
|
2022-07-03 16:46:35 +00:00
|
|
|
@@ -1,16 +1,16 @@
|
kernel: 5.4: import wireguard backport
Rather than using the clunky, old, slower wireguard-linux-compat out of
tree module, this commit does a patch-by-patch backport of upstream's
wireguard to 5.4. This specific backport is in widespread use, being
part of SUSE's enterprise kernel, Oracle's enterprise kernel, Google's
Android kernel, Gentoo's distro kernel, and probably more I've forgotten
about. It's definately the "more proper" way of adding wireguard to a
kernel than the ugly compat.h hell of the wireguard-linux-compat repo.
And most importantly for OpenWRT, it allows using the same module
configuration code for 5.10 as for 5.4, with no need for bifurcation.
These patches are from the backport tree which is maintained in the
open here: https://git.zx2c4.com/wireguard-linux/log/?h=backport-5.4.y
I'll be sending PRs to update this as needed.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
(cherry picked from commit 3888fa78802354ab7bbd19b7d061fd80a16ce06b)
(cherry picked from commit d54072587146dd0db9bb52b513234d944edabda3)
(cherry picked from commit 196f3d586f11d96ba4ab60068cfb12420bcd20fd)
(cherry picked from commit 3500fd7938a6d0c0e320295f0aa2fa34b1ebc08d)
(cherry picked from commit 23b801d3ba57e34cc609ea40982c7fbed08164e9)
(cherry picked from commit 0c0cb97da7f5cc06919449131dd57ed805f8f78d)
(cherry picked from commit 2a27f6f90a430342cdbe84806e8b10acff446a2d)
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
2021-02-19 13:29:04 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
|
|
|
|
-obj-$(CONFIG_CRYPTO_LIB_AES) += libaes.o
|
|
|
|
-libaes-y := aes.o
|
|
|
|
+obj-$(CONFIG_CRYPTO_LIB_AES) += libaes.o
|
|
|
|
+libaes-y := aes.o
|
|
|
|
|
|
|
|
-obj-$(CONFIG_CRYPTO_LIB_ARC4) += libarc4.o
|
|
|
|
-libarc4-y := arc4.o
|
|
|
|
+obj-$(CONFIG_CRYPTO_LIB_ARC4) += libarc4.o
|
|
|
|
+libarc4-y := arc4.o
|
|
|
|
|
|
|
|
-obj-$(CONFIG_CRYPTO_LIB_DES) += libdes.o
|
|
|
|
-libdes-y := des.o
|
|
|
|
+obj-$(CONFIG_CRYPTO_LIB_DES) += libdes.o
|
|
|
|
+libdes-y := des.o
|
|
|
|
|
|
|
|
-obj-$(CONFIG_CRYPTO_LIB_SHA256) += libsha256.o
|
|
|
|
-libsha256-y := sha256.o
|
|
|
|
+obj-$(CONFIG_CRYPTO_LIB_SHA256) += libsha256.o
|
|
|
|
+libsha256-y := sha256.o
|
2022-07-03 16:46:35 +00:00
|
|
|
|
|
|
|
obj-y += libblake2s.o
|
|
|
|
libblake2s-y += blake2s.o blake2s-generic.o
|