Skip to contentSkip to conversation

crypto: lib/arc4 - expose library interface

PATCH In review Christian Marangi 3 participants 5 messages Jul 14, 2022 – Jul 16, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: lib/arc4 - expose library interface

Permit to compile the arc4 crypto lib without any user. This is required by the backports project [1] that require this lib for any wireless driver.

[1] https://backports.wiki.kernel.org/index.php/Main_Page

---
 lib/crypto/Kconfig | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
lib/crypto/Kconfig +5 -1
index 2082af43d51f..2dfc785a7817 100644
@@ -6,7 +6,11 @@ config CRYPTO_LIB_AES
 	tristate
 
 config CRYPTO_LIB_ARC4
-	tristate
+	tristate "ARC4 library interface"
+	help
+	  Enable the ARC4 library interface. This interface is mainly
+	  used by wireless drivers and is required by the backports
+	  project.
 
 config CRYPTO_ARCH_HAVE_LIB_BLAKE2S
 	bool
Signature · 1 line
2.36.1
maintainer
#1 lore raw
Quoted 18 lines · Christian Marangi

Permit to compile the arc4 crypto lib without any user. This is required by the backports project [1] that require this lib for any wireless driver.

[1] https://backports.wiki.kernel.org/index.php/Main_Page

---
 lib/crypto/Kconfig | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
lib/crypto/Kconfig +0 -0
index 2082af43d51f..2dfc785a7817 100644
@@ -6,7 +6,11 @@ config CRYPTO_LIB_AES
 	tristate
 

lib/crypto/Kconfig config CRYPTO_LIB_AES · line 16

Quoted 10 lines
lib/crypto/Kconfig +5 -1
 config CRYPTO_LIB_ARC4
-	tristate
+	tristate "ARC4 library interface"
+	help
+	  Enable the ARC4 library interface. This interface is mainly
+	  used by wireless drivers and is required by the backports
+	  project.
 
 config CRYPTO_ARCH_HAVE_LIB_BLAKE2S
 	bool

I don't think this is appropriate for upstream, as the upstream kernel doesn't support out-of-tree code. This is also an internal API that can change from one kernel version to the next.

- Eric

#2 lore raw

From: Eric Biggers

Quoted 29 lines

Sent: 15 July 2022 03:05

Quoted 26 lines · Christian Marangi

Permit to compile the arc4 crypto lib without any user. This is required by the backports project [1] that require this lib for any wireless driver.

[1] https://backports.wiki.kernel.org/index.php/Main_Page

---
 lib/crypto/Kconfig | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
lib/crypto/Kconfig +5 -1
index 2082af43d51f..2dfc785a7817 100644
@@ -6,7 +6,11 @@ config CRYPTO_LIB_AES
 	tristate
 
 config CRYPTO_LIB_ARC4
-	tristate
+	tristate "ARC4 library interface"
+	help
+	  Enable the ARC4 library interface. This interface is mainly
+	  used by wireless drivers and is required by the backports
+	  project.
 
Quoted 6 lines

lib/crypto/Kconfig config CRYPTO_LIB_AES · line 16

Quoted 2 lines
lib/crypto/Kconfig +0 -0
 config CRYPTO_ARCH_HAVE_LIB_BLAKE2S
 	bool

I don't think this is appropriate for upstream, as the upstream kernel doesn't support out-of-tree code. This is also an internal API that can change from one kernel version to the next.

Out-of-tree code always has to allow for arbitrary changes to kernel interfaces between kernel versions.
So the fact that the API might change isn't relevant. The continual API changes keep some of us in a job :-)

(It has to be said that if I needed RC4 I'd probably add a local copy.)

David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)

#3 lore raw
Quoted 37 lines · David Laight

From: Eric Biggers

Quoted 29 lines

Sent: 15 July 2022 03:05

Quoted 26 lines · Christian Marangi

Permit to compile the arc4 crypto lib without any user. This is required by the backports project [1] that require this lib for any wireless driver.

[1] https://backports.wiki.kernel.org/index.php/Main_Page

---
 lib/crypto/Kconfig | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
lib/crypto/Kconfig +5 -1
index 2082af43d51f..2dfc785a7817 100644
@@ -6,7 +6,11 @@ config CRYPTO_LIB_AES
 	tristate
 
 config CRYPTO_LIB_ARC4
-	tristate
+	tristate "ARC4 library interface"
+	help
+	  Enable the ARC4 library interface. This interface is mainly
+	  used by wireless drivers and is required by the backports
+	  project.
 
Quoted 6 lines

lib/crypto/Kconfig config CRYPTO_LIB_AES · line 16

Quoted 2 lines
lib/crypto/Kconfig +0 -0
 config CRYPTO_ARCH_HAVE_LIB_BLAKE2S
 	bool

I don't think this is appropriate for upstream, as the upstream kernel doesn't support out-of-tree code. This is also an internal API that can change from one kernel version to the next.

Quoted 7 lines

Out-of-tree code always has to allow for arbitrary changes to kernel interfaces between kernel versions.
So the fact that the API might change isn't relevant. The continual API changes keep some of us in a job :-)

(It has to be said that if I needed RC4 I'd probably add a local copy.)

Wonder if I can ask you some advice about the topic... I understand that this cannot be merged upstream.

So the correct solution would be having a copy of the arc4 lib in backports?

Signature · 1 line
	Ansuel
maintainer
#4 lore raw
Quoted 43 lines · Christian Marangi
Quoted 42 lines · David Laight

From: Eric Biggers

Quoted 29 lines

Sent: 15 July 2022 03:05

Quoted 26 lines · Christian Marangi

Permit to compile the arc4 crypto lib without any user. This is required by the backports project [1] that require this lib for any wireless driver.

[1] https://backports.wiki.kernel.org/index.php/Main_Page

---
 lib/crypto/Kconfig | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
lib/crypto/Kconfig +5 -1
index 2082af43d51f..2dfc785a7817 100644
@@ -6,7 +6,11 @@ config CRYPTO_LIB_AES
 	tristate
 
 config CRYPTO_LIB_ARC4
-	tristate
+	tristate "ARC4 library interface"
+	help
+	  Enable the ARC4 library interface. This interface is mainly
+	  used by wireless drivers and is required by the backports
+	  project.
 
Quoted 6 lines

lib/crypto/Kconfig config CRYPTO_LIB_AES · line 16

Quoted 2 lines
lib/crypto/Kconfig +0 -0
 config CRYPTO_ARCH_HAVE_LIB_BLAKE2S
 	bool

I don't think this is appropriate for upstream, as the upstream kernel doesn't support out-of-tree code. This is also an internal API that can change from one kernel version to the next.

Out-of-tree code always has to allow for arbitrary changes to kernel interfaces between kernel versions.
So the fact that the API might change isn't relevant. The continual API changes keep some of us in a job :-)

Quoted 9 lines
Quoted 2 lines

(It has to be said that if I needed RC4 I'd probably add a local copy.)

Wonder if I can ask you some advice about the topic... I understand that this cannot be merged upstream.

So the correct solution would be having a copy of the arc4 lib in backports?

In general you're going to need to change the kernel anyway, in which case you can just patch your kernel to expose this option.

If you can't patch your kernel, then yes you'd need to have your own copy of the arc4 lib. Of course, that would only be a workaround for the arc4 lib. You may run into other things that have no workaround. You need to accept that what you're trying to do will sometimes be impossible without kernel changes.

- Eric