2021-01-15 17:25:33

by Jason A. Donenfeld

[permalink] [raw]
Subject: [PATCH] crypto: lib/chacha20poly1305 - define empty module exit function

With no mod_exit function, users are unable to load the module after
use. I'm not aware of any reason why module unloading should be
prohibited for this one, so this commit simply adds an empty exit
function.

Reported-by: John Donnelly <[email protected]>
Signed-off-by: Jason A. Donenfeld <[email protected]>
---
lib/crypto/chacha20poly1305.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/lib/crypto/chacha20poly1305.c b/lib/crypto/chacha20poly1305.c
index 5850f3b87359..c2fcdb98cc02 100644
--- a/lib/crypto/chacha20poly1305.c
+++ b/lib/crypto/chacha20poly1305.c
@@ -362,7 +362,12 @@ static int __init mod_init(void)
return 0;
}

+static void __exit mod_exit(void)
+{
+}
+
module_init(mod_init);
+module_exit(mod_exit);
MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("ChaCha20Poly1305 AEAD construction");
MODULE_AUTHOR("Jason A. Donenfeld <[email protected]>");
--
2.30.0


2021-01-15 17:26:23

by Ard Biesheuvel

[permalink] [raw]
Subject: Re: [PATCH] crypto: lib/chacha20poly1305 - define empty module exit function

On Fri, 15 Jan 2021 at 18:17, Jason A. Donenfeld <[email protected]> wrote:
>
> With no mod_exit function, users are unable to load the module after
> use. I'm not aware of any reason why module unloading should be
> prohibited for this one, so this commit simply adds an empty exit
> function.
>
> Reported-by: John Donnelly <[email protected]>
> Signed-off-by: Jason A. Donenfeld <[email protected]>

Acked-by: Ard Biesheuvel <[email protected]>

> ---
> lib/crypto/chacha20poly1305.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/lib/crypto/chacha20poly1305.c b/lib/crypto/chacha20poly1305.c
> index 5850f3b87359..c2fcdb98cc02 100644
> --- a/lib/crypto/chacha20poly1305.c
> +++ b/lib/crypto/chacha20poly1305.c
> @@ -362,7 +362,12 @@ static int __init mod_init(void)
> return 0;
> }
>
> +static void __exit mod_exit(void)
> +{
> +}
> +
> module_init(mod_init);
> +module_exit(mod_exit);
> MODULE_LICENSE("GPL v2");
> MODULE_DESCRIPTION("ChaCha20Poly1305 AEAD construction");
> MODULE_AUTHOR("Jason A. Donenfeld <[email protected]>");
> --
> 2.30.0
>

2021-01-15 17:48:22

by Eric Biggers

[permalink] [raw]
Subject: Re: [PATCH] crypto: lib/chacha20poly1305 - define empty module exit function

On Fri, Jan 15, 2021 at 06:17:43PM +0100, Jason A. Donenfeld wrote:
> users are unable to load the module after use.

It should say "unload".

- Eric

2021-01-15 18:08:24

by John Donnelly

[permalink] [raw]
Subject: Re: [PATCH] crypto: lib/chacha20poly1305 - define empty module exit function



> On Jan 15, 2021, at 11:17 AM, Jason A. Donenfeld <[email protected]> wrote:
>
> With no mod_exit function, users are unable to load the module after
> use. I'm not aware of any reason why module unloading should be
> prohibited for this one, so this commit simply adds an empty exit
> function.
>
> Reported-by: John Donnelly <[email protected]>
> Signed-off-by: Jason A. Donenfeld <[email protected]>
> ---


Hi ,

Verified

Please add


Test-by: John Donnelly <[email protected]>



> lib/crypto/chacha20poly1305.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/lib/crypto/chacha20poly1305.c b/lib/crypto/chacha20poly1305.c
> index 5850f3b87359..c2fcdb98cc02 100644
> --- a/lib/crypto/chacha20poly1305.c
> +++ b/lib/crypto/chacha20poly1305.c
> @@ -362,7 +362,12 @@ static int __init mod_init(void)
> return 0;
> }
>
> +static void __exit mod_exit(void)
> +{
> +}
> +
> module_init(mod_init);
> +module_exit(mod_exit);
> MODULE_LICENSE("GPL v2");
> MODULE_DESCRIPTION("ChaCha20Poly1305 AEAD construction");
> MODULE_AUTHOR("Jason A. Donenfeld <[email protected]>");
> --
> 2.30.0
>

2021-01-15 19:34:29

by Jason A. Donenfeld

[permalink] [raw]
Subject: [PATCH v2] crypto: lib/chacha20poly1305 - define empty module exit function

With no mod_exit function, users are unable to unload the module after
use. I'm not aware of any reason why module unloading should be
prohibited for this one, so this commit simply adds an empty exit
function.

Reported-and-tested-by: John Donnelly <[email protected]>
Acked-by: Ard Biesheuvel <[email protected]>
Signed-off-by: Jason A. Donenfeld <[email protected]>
---
v1->v2:
- Fix typo in commit message.

lib/crypto/chacha20poly1305.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/lib/crypto/chacha20poly1305.c b/lib/crypto/chacha20poly1305.c
index 5850f3b87359..c2fcdb98cc02 100644
--- a/lib/crypto/chacha20poly1305.c
+++ b/lib/crypto/chacha20poly1305.c
@@ -362,7 +362,12 @@ static int __init mod_init(void)
return 0;
}

+static void __exit mod_exit(void)
+{
+}
+
module_init(mod_init);
+module_exit(mod_exit);
MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("ChaCha20Poly1305 AEAD construction");
MODULE_AUTHOR("Jason A. Donenfeld <[email protected]>");
--
2.30.0

2021-01-16 00:30:40

by John Donnelly

[permalink] [raw]
Subject: Re: [PATCH v2] crypto: lib/chacha20poly1305 - define empty module exit function



> On Jan 15, 2021, at 1:30 PM, Jason A. Donenfeld <[email protected]> wrote:
>
> With no mod_exit function, users are unable to unload the module after
> use. I'm not aware of any reason why module unloading should be
> prohibited for this one, so this commit simply adds an empty exit
> function.
>
> Reported-and-tested-by: John Donnelly <[email protected]>
> Acked-by: Ard Biesheuvel <[email protected]>
> Signed-off-by: Jason A. Donenfeld <[email protected]>

Thanks!

Would someone be kind enough to remind when this appears and I will apply it to our product ? We like to use published commits when possible.

JD


> ---
> v1->v2:
> - Fix typo in commit message.
>
> lib/crypto/chacha20poly1305.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/lib/crypto/chacha20poly1305.c b/lib/crypto/chacha20poly1305.c
> index 5850f3b87359..c2fcdb98cc02 100644
> --- a/lib/crypto/chacha20poly1305.c
> +++ b/lib/crypto/chacha20poly1305.c
> @@ -362,7 +362,12 @@ static int __init mod_init(void)
> return 0;
> }
>
> +static void __exit mod_exit(void)
> +{
> +}
> +
> module_init(mod_init);
> +module_exit(mod_exit);
> MODULE_LICENSE("GPL v2");
> MODULE_DESCRIPTION("ChaCha20Poly1305 AEAD construction");
> MODULE_AUTHOR("Jason A. Donenfeld <[email protected]>");
> --
> 2.30.0
>

2021-01-16 00:35:12

by Jason A. Donenfeld

[permalink] [raw]
Subject: Re: [PATCH v2] crypto: lib/chacha20poly1305 - define empty module exit function

On Sat, Jan 16, 2021 at 1:30 AM John Donnelly
<[email protected]> wrote:
>
>
>
> > On Jan 15, 2021, at 1:30 PM, Jason A. Donenfeld <[email protected]> wrote:
> >
> > With no mod_exit function, users are unable to unload the module after
> > use. I'm not aware of any reason why module unloading should be
> > prohibited for this one, so this commit simply adds an empty exit
> > function.
> >
> > Reported-and-tested-by: John Donnelly <[email protected]>
> > Acked-by: Ard Biesheuvel <[email protected]>
> > Signed-off-by: Jason A. Donenfeld <[email protected]>
>
> Thanks!
>
> Would someone be kind enough to remind when this appears and I will apply it to our product ? We like to use published commits when possible.
>
> JD

It'll show up in one of these two repos in a week or two:
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6.git/
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git/

2021-01-22 06:23:27

by Herbert Xu

[permalink] [raw]
Subject: Re: [PATCH v2] crypto: lib/chacha20poly1305 - define empty module exit function

On Fri, Jan 15, 2021 at 08:30:12PM +0100, Jason A. Donenfeld wrote:
> With no mod_exit function, users are unable to unload the module after
> use. I'm not aware of any reason why module unloading should be
> prohibited for this one, so this commit simply adds an empty exit
> function.
>
> Reported-and-tested-by: John Donnelly <[email protected]>
> Acked-by: Ard Biesheuvel <[email protected]>
> Signed-off-by: Jason A. Donenfeld <[email protected]>
> ---
> v1->v2:
> - Fix typo in commit message.
>
> lib/crypto/chacha20poly1305.c | 5 +++++
> 1 file changed, 5 insertions(+)

Patch applied. Thanks.
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt