* [PATCH] crypto: Use padlock.ko only as a module
@ 2007-04-28 16:44 Simon Arlott
2007-04-28 22:37 ` Randy Dunlap
0 siblings, 1 reply; 4+ messages in thread
From: Simon Arlott @ 2007-04-28 16:44 UTC (permalink / raw)
To: Linux Kernel Mailing List; +Cc: herbert
The padlock.ko module is completely useless when compiled in
because it can't do anything and gets run too early to output
anything useful:
[ 6.052000] padlock: No VIA PadLock drivers have been loaded.
[ 6.052000] padlock: Using VIA PadLock ACE for AES algorithm.
[ 6.052000] padlock: Using VIA PadLock ACE for SHA1/SHA256 algorithms.
Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
---
drivers/crypto/Makefile | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/crypto/Makefile b/drivers/crypto/Makefile
index 6059cf8..f0f7a73 100644
--- a/drivers/crypto/Makefile
+++ b/drivers/crypto/Makefile
@@ -1,4 +1,6 @@
-obj-$(CONFIG_CRYPTO_DEV_PADLOCK) += padlock.o
+ifeq ($(CONFIG_CRYPTO_DEV_PADLOCK),m)
+obj-m += padlock.o
+endif
obj-$(CONFIG_CRYPTO_DEV_PADLOCK_AES) += padlock-aes.o
obj-$(CONFIG_CRYPTO_DEV_PADLOCK_SHA) += padlock-sha.o
obj-$(CONFIG_CRYPTO_DEV_GEODE) += geode-aes.o
--
1.5.0.1
--
Simon Arlott
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] crypto: Use padlock.ko only as a module
2007-04-28 16:44 [PATCH] crypto: Use padlock.ko only as a module Simon Arlott
@ 2007-04-28 22:37 ` Randy Dunlap
2007-04-28 23:21 ` Simon Arlott
0 siblings, 1 reply; 4+ messages in thread
From: Randy Dunlap @ 2007-04-28 22:37 UTC (permalink / raw)
To: Simon Arlott; +Cc: Linux Kernel Mailing List, herbert
On Sat, 28 Apr 2007 17:44:42 +0100 Simon Arlott wrote:
> The padlock.ko module is completely useless when compiled in
> because it can't do anything and gets run too early to output
> anything useful:
>
> [ 6.052000] padlock: No VIA PadLock drivers have been loaded.
> [ 6.052000] padlock: Using VIA PadLock ACE for AES algorithm.
> [ 6.052000] padlock: Using VIA PadLock ACE for SHA1/SHA256 algorithms.
>
> Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
> Cc: Herbert Xu <herbert@gondor.apana.org.au>
> ---
> drivers/crypto/Makefile | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/crypto/Makefile b/drivers/crypto/Makefile
> index 6059cf8..f0f7a73 100644
> --- a/drivers/crypto/Makefile
> +++ b/drivers/crypto/Makefile
> @@ -1,4 +1,6 @@
> -obj-$(CONFIG_CRYPTO_DEV_PADLOCK) += padlock.o
> +ifeq ($(CONFIG_CRYPTO_DEV_PADLOCK),m)
> +obj-m += padlock.o
> +endif
> obj-$(CONFIG_CRYPTO_DEV_PADLOCK_AES) += padlock-aes.o
> obj-$(CONFIG_CRYPTO_DEV_PADLOCK_SHA) += padlock-sha.o
> obj-$(CONFIG_CRYPTO_DEV_GEODE) += geode-aes.o
> --
I think that we prefer to enforce config symbols in Kconfig files,
not in Makefiles. E.g.,
---
drivers/crypto/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- linux-2621-pv.orig/drivers/crypto/Kconfig
+++ linux-2621-pv/drivers/crypto/Kconfig
@@ -2,7 +2,7 @@ menu "Hardware crypto devices"
config CRYPTO_DEV_PADLOCK
tristate "Support for VIA PadLock ACE"
- depends on X86_32
+ depends on X86_32 && m
select CRYPTO_ALGAPI
default m
help
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] crypto: Use padlock.ko only as a module
2007-04-28 22:37 ` Randy Dunlap
@ 2007-04-28 23:21 ` Simon Arlott
2007-04-29 7:28 ` Ingo Oeser
0 siblings, 1 reply; 4+ messages in thread
From: Simon Arlott @ 2007-04-28 23:21 UTC (permalink / raw)
To: Randy Dunlap; +Cc: Linux Kernel Mailing List, herbert
On 28/04/07 23:37, Randy Dunlap wrote:
> On Sat, 28 Apr 2007 17:44:42 +0100 Simon Arlott wrote:
>
>> The padlock.ko module is completely useless when compiled in
>> because it can't do anything and gets run too early to output
>> anything useful.
>> --- a/drivers/crypto/Makefile
>> +++ b/drivers/crypto/Makefile
>> @@ -1,4 +1,6 @@
>> -obj-$(CONFIG_CRYPTO_DEV_PADLOCK) += padlock.o
>> +ifeq ($(CONFIG_CRYPTO_DEV_PADLOCK),m)
>> +obj-m += padlock.o
>> +endif
>> obj-$(CONFIG_CRYPTO_DEV_PADLOCK_AES) += padlock-aes.o
>> obj-$(CONFIG_CRYPTO_DEV_PADLOCK_SHA) += padlock-sha.o
>> obj-$(CONFIG_CRYPTO_DEV_GEODE) += geode-aes.o
>
> I think that we prefer to enforce config symbols in Kconfig files,
> not in Makefiles. E.g.,
No, that would cause the wrong behaviour in this case. The two
modules that depend on it for no reason work fine compiled in.
Ideally I'd just remove that module completely, all it does is
trigger the loading of the other two modules when modules are
used - so I'll submit a patch for that instead.
> ---
> drivers/crypto/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- linux-2621-pv.orig/drivers/crypto/Kconfig
> +++ linux-2621-pv/drivers/crypto/Kconfig
> @@ -2,7 +2,7 @@ menu "Hardware crypto devices"
>
> config CRYPTO_DEV_PADLOCK
> tristate "Support for VIA PadLock ACE"
> - depends on X86_32
> + depends on X86_32 && m
> select CRYPTO_ALGAPI
> default m
> help
--
Simon Arlott
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] crypto: Use padlock.ko only as a module
2007-04-28 23:21 ` Simon Arlott
@ 2007-04-29 7:28 ` Ingo Oeser
0 siblings, 0 replies; 4+ messages in thread
From: Ingo Oeser @ 2007-04-29 7:28 UTC (permalink / raw)
To: Simon Arlott; +Cc: Randy Dunlap, Linux Kernel Mailing List, herbert
Hi Scott,
On Sunday 29 April 2007, Simon Arlott wrote:
> Ideally I'd just remove that module completely, all it does is
> trigger the loading of the other two modules when modules are
> used - so I'll submit a patch for that instead.
That's much better!
When you force a feature to be a module on a kernel without
module support, it will effectivly be disabled.
And if it is so simple to do the same in userspace like you suggest,
than that's much better.
Best Regards
Ingo Oeser
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-04-29 7:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-28 16:44 [PATCH] crypto: Use padlock.ko only as a module Simon Arlott
2007-04-28 22:37 ` Randy Dunlap
2007-04-28 23:21 ` Simon Arlott
2007-04-29 7:28 ` Ingo Oeser
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome