Thread (2 messages) 2 messages, 2 authors, 2023-08-24
STALE1062d REVIEWED: 4 (4M)

[v2 PATCH] wireguard: do not include crypto/algapi.h

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: 2023-08-24 05:18:35
Subsystem: networking drivers, the rest, wireguard secure network tunnel · Maintainers: Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds, Jason A. Donenfeld

On Wed, Aug 23, 2023 at 01:48:47PM +0200, Jason A. Donenfeld wrote:
Small nit - with the exception of the cookie.c reordering, could you
maintain the existing #include ordering of the other files? No need to
send a v2 for that if you don't want. And please make the entire
commit subject lowercase. With those done,

Acked-by: Jason A. Donenfeld <Jason@zx2c4.com>
Thanks.  As these patches are independent of each other, I'll just
repost this one patch and delete it from the original series.
As a side note, you may want to eventually do something to make sure
people don't add back algapi.h, like move it to internal/ or out of
include/ all together. I figure you've already thought about this, and
this series is just the first step.
Sure that is the idea.  Although judging from the result of my
grep, it seems most of the external users are due to the utility
functions which hopefully won't be an issue anymore because of the
new crypto/utils.h file.

---8<---
The header file crypto/algapi.h is for internal use only.  Use the
header file crypto/utils.h instead.

Acked-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
---

 drivers/net/wireguard/cookie.c  |    2 +-
 drivers/net/wireguard/netlink.c |    2 +-
 drivers/net/wireguard/noise.c   |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireguard/cookie.c b/drivers/net/wireguard/cookie.c
index 4956f0499c19..f89581b5e8cb 100644
--- a/drivers/net/wireguard/cookie.c
+++ b/drivers/net/wireguard/cookie.c
@@ -12,9 +12,9 @@
 
 #include <crypto/blake2s.h>
 #include <crypto/chacha20poly1305.h>
+#include <crypto/utils.h>
 
 #include <net/ipv6.h>
-#include <crypto/algapi.h>
 
 void wg_cookie_checker_init(struct cookie_checker *checker,
 			    struct wg_device *wg)
diff --git a/drivers/net/wireguard/netlink.c b/drivers/net/wireguard/netlink.c
index 6d1bd9f52d02..0a2f225e754a 100644
--- a/drivers/net/wireguard/netlink.c
+++ b/drivers/net/wireguard/netlink.c
@@ -15,7 +15,7 @@
 #include <linux/if.h>
 #include <net/genetlink.h>
 #include <net/sock.h>
-#include <crypto/algapi.h>
+#include <crypto/utils.h>
 
 static struct genl_family genl_family;
 
diff --git a/drivers/net/wireguard/noise.c b/drivers/net/wireguard/noise.c
index 720952b92e78..202a33af5a72 100644
--- a/drivers/net/wireguard/noise.c
+++ b/drivers/net/wireguard/noise.c
@@ -15,7 +15,7 @@
 #include <linux/bitmap.h>
 #include <linux/scatterlist.h>
 #include <linux/highmem.h>
-#include <crypto/algapi.h>
+#include <crypto/utils.h>
 
 /* This implements Noise_IKpsk2:
  *
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help