linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: linux-next: Tree for Oct 25 (crypto)
       [not found] <20111025203628.40a1b8a475e32053aa34dabe@canb.auug.org.au>
@ 2011-10-26  0:42 ` Randy Dunlap
  2011-10-26  6:27   ` Herbert Xu
  0 siblings, 1 reply; 8+ messages in thread
From: Randy Dunlap @ 2011-10-26  0:42 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, LKML, Linus, Herbert Xu, linux-crypto

On 10/25/11 02:36, Stephen Rothwell wrote:
> Hi all,


When CONFIG_NET is not enabled:

ERROR: "nla_put" [crypto/rng.ko] undefined!
ERROR: "nla_put" [crypto/pcompress.ko] undefined!
ERROR: "netlink_kernel_release" [crypto/crypto_user.ko] undefined!
ERROR: "netlink_kernel_create" [crypto/crypto_user.ko] undefined!
ERROR: "init_net" [crypto/crypto_user.ko] undefined!
ERROR: "netlink_unicast" [crypto/crypto_user.ko] undefined!
ERROR: "__alloc_skb" [crypto/crypto_user.ko] undefined!
ERROR: "skb_trim" [crypto/crypto_user.ko] undefined!
ERROR: "skb_put" [crypto/crypto_user.ko] undefined!
ERROR: "netlink_dump_start" [crypto/crypto_user.ko] undefined!
ERROR: "nla_put" [crypto/crypto_user.ko] undefined!
ERROR: "netlink_rcv_skb" [crypto/crypto_user.ko] undefined!
ERROR: "nla_put" [crypto/crypto_hash.ko] undefined!
ERROR: "nla_put" [crypto/crypto_blkcipher.ko] undefined!
ERROR: "nla_put" [crypto/aead.ko] undefined!


-- 
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: linux-next: Tree for Oct 25 (crypto)
  2011-10-26  0:42 ` linux-next: Tree for Oct 25 (crypto) Randy Dunlap
@ 2011-10-26  6:27   ` Herbert Xu
  2011-10-26 12:33     ` Stefan Richter
  2011-10-27  7:05     ` Valdis.Kletnieks
  0 siblings, 2 replies; 8+ messages in thread
From: Herbert Xu @ 2011-10-26  6:27 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: Stephen Rothwell, linux-next, LKML, Linus, linux-crypto

On Tue, Oct 25, 2011 at 05:42:01PM -0700, Randy Dunlap wrote:
> On 10/25/11 02:36, Stephen Rothwell wrote:
> > Hi all,
> 
> 
> When CONFIG_NET is not enabled:

Thanks, I'll add this patch.

diff --git a/crypto/Kconfig b/crypto/Kconfig
index a8442dc..259dea9 100644
--- a/crypto/Kconfig
+++ b/crypto/Kconfig
@@ -103,6 +103,7 @@ config CRYPTO_MANAGER2
 config CRYPTO_USER
 	tristate "Userspace cryptographic algorithm configuration"
 	select CRYPTO_MANAGER
+	select NET
 	help
 	  Userapace configuration for cryptographic instantiations such as
 	  cbc(aes).

Cheers,
-- 
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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: linux-next: Tree for Oct 25 (crypto)
  2011-10-26  6:27   ` Herbert Xu
@ 2011-10-26 12:33     ` Stefan Richter
  2011-10-26 16:27       ` Randy Dunlap
  2011-10-27  7:05     ` Valdis.Kletnieks
  1 sibling, 1 reply; 8+ messages in thread
From: Stefan Richter @ 2011-10-26 12:33 UTC (permalink / raw)
  To: Herbert Xu
  Cc: Randy Dunlap, Stephen Rothwell, linux-next, LKML, Linus,
	linux-crypto

On Oct 26 Herbert Xu wrote:
> On Tue, Oct 25, 2011 at 05:42:01PM -0700, Randy Dunlap wrote:
> > On 10/25/11 02:36, Stephen Rothwell wrote:
> > > Hi all,
> > 
> > 
> > When CONFIG_NET is not enabled:
> 
> Thanks, I'll add this patch.
> 
> diff --git a/crypto/Kconfig b/crypto/Kconfig
> index a8442dc..259dea9 100644
> --- a/crypto/Kconfig
> +++ b/crypto/Kconfig
> @@ -103,6 +103,7 @@ config CRYPTO_MANAGER2
>  config CRYPTO_USER
>  	tristate "Userspace cryptographic algorithm configuration"
>  	select CRYPTO_MANAGER
> +	select NET
>  	help
>  	  Userapace configuration for cryptographic instantiations such as
>  	  cbc(aes).
> 
> Cheers,

If you do it this way, you also need to select everything on which NET
depends on.  In v3.1, that would be (only) NLATTR which in turn does not
depend on anything else.

Furthermore, I am noticing in v3.1 that CRYPTO_MANAGER selects
CRYPTO_MANAGER2 which in turn has the following dependencies:

config CRYPTO_MANAGER2
	def_tristate CRYPTO_MANAGER || (CRYPTO_MANAGER!=n && CRYPTO_ALGAPI=y)
	select CRYPTO_AEAD2
	select CRYPTO_HASH2
	select CRYPTO_BLKCIPHER2
	select CRYPTO_PCOMP2

I think you need to copy those dependencies into config CRYPTO_MANAGER.
-- 
Stefan Richter
-=====-==-== =-=- ==-=-
http://arcgraph.de/sr/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: linux-next: Tree for Oct 25 (crypto)
  2011-10-26 12:33     ` Stefan Richter
@ 2011-10-26 16:27       ` Randy Dunlap
  2011-10-26 17:15         ` Stefan Richter
  0 siblings, 1 reply; 8+ messages in thread
From: Randy Dunlap @ 2011-10-26 16:27 UTC (permalink / raw)
  To: Stefan Richter
  Cc: Herbert Xu, Stephen Rothwell, linux-next, LKML, Linus,
	linux-crypto

On 10/26/11 05:33, Stefan Richter wrote:
> On Oct 26 Herbert Xu wrote:
>> On Tue, Oct 25, 2011 at 05:42:01PM -0700, Randy Dunlap wrote:
>>> On 10/25/11 02:36, Stephen Rothwell wrote:
>>>> Hi all,
>>>
>>>
>>> When CONFIG_NET is not enabled:
>>
>> Thanks, I'll add this patch.
>>
>> diff --git a/crypto/Kconfig b/crypto/Kconfig
>> index a8442dc..259dea9 100644
>> --- a/crypto/Kconfig
>> +++ b/crypto/Kconfig
>> @@ -103,6 +103,7 @@ config CRYPTO_MANAGER2
>>  config CRYPTO_USER
>>  	tristate "Userspace cryptographic algorithm configuration"
>>  	select CRYPTO_MANAGER
>> +	select NET
>>  	help
>>  	  Userapace configuration for cryptographic instantiations such as
>>  	  cbc(aes).
>>
>> Cheers,
> 
> If you do it this way, you also need to select everything on which NET
> depends on.  In v3.1, that would be (only) NLATTR which in turn does not
> depend on anything else.
> 
> Furthermore, I am noticing in v3.1 that CRYPTO_MANAGER selects
> CRYPTO_MANAGER2 which in turn has the following dependencies:
> 
> config CRYPTO_MANAGER2
> 	def_tristate CRYPTO_MANAGER || (CRYPTO_MANAGER!=n && CRYPTO_ALGAPI=y)
> 	select CRYPTO_AEAD2
> 	select CRYPTO_HASH2
> 	select CRYPTO_BLKCIPHER2
> 	select CRYPTO_PCOMP2
> 
> I think you need to copy those dependencies into config CRYPTO_MANAGER.

That's correct, but it's better not to "select" an entire subsystem
like NET at all.

-- 
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: linux-next: Tree for Oct 25 (crypto)
  2011-10-26 16:27       ` Randy Dunlap
@ 2011-10-26 17:15         ` Stefan Richter
  0 siblings, 0 replies; 8+ messages in thread
From: Stefan Richter @ 2011-10-26 17:15 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Herbert Xu, Stephen Rothwell, linux-next, LKML, Linus,
	linux-crypto

On Oct 26 Randy Dunlap wrote:
> On 10/26/11 05:33, Stefan Richter wrote:
> > On Oct 26 Herbert Xu wrote:
> >> --- a/crypto/Kconfig
> >> +++ b/crypto/Kconfig
> >> @@ -103,6 +103,7 @@ config CRYPTO_MANAGER2
> >>  config CRYPTO_USER
> >>  	tristate "Userspace cryptographic algorithm configuration"
> >>  	select CRYPTO_MANAGER
> >> +	select NET
> >>  	help
> >>  	  Userapace configuration for cryptographic instantiations such as

btw, typo: "Userspace"

> >>  	  cbc(aes).
> >>
> >> Cheers,
> > 
> > If you do it this way, you also need to select everything on which NET
> > depends on.  In v3.1, that would be (only) NLATTR which in turn does not
> > depend on anything else.
[...]
> That's correct, but it's better not to "select" an entire subsystem
> like NET at all.

I agree; I add to my comment the implication that --- as a rule of thumb
--- "select" should be avoided if the option to be selected has further
dependencies.

A downside of "config A\n depends on B" is of course that potential users
of option A who are unaware of option B or not interested in B may miss how
to enable A.  Sometimes, a comment in the Kconfig file can help then.
Example (from linux-2.6.36/drivers/ieee1394/):

comment "PCILynx controller requires I2C"
	depends on IEEE1394 && I2C=n

config IEEE1394_PCILYNX
	tristate "PCILynx controller"
	depends on PCI && IEEE1394 && I2C
	select I2C_ALGOBIT
	help
	  Say Y here if you have an IEEE-1394 controller with the Texas
	  Instruments PCILynx chip.
-- 
Stefan Richter
-=====-==-== =-=- ==-=-
http://arcgraph.de/sr/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: linux-next: Tree for Oct 25 (crypto)
  2011-10-26  6:27   ` Herbert Xu
  2011-10-26 12:33     ` Stefan Richter
@ 2011-10-27  7:05     ` Valdis.Kletnieks
  2011-10-27  7:45       ` Herbert Xu
  1 sibling, 1 reply; 8+ messages in thread
From: Valdis.Kletnieks @ 2011-10-27  7:05 UTC (permalink / raw)
  To: Herbert Xu
  Cc: Randy Dunlap, Stephen Rothwell, linux-next, LKML, Linus,
	linux-crypto

[-- Attachment #1: Type: text/plain, Size: 670 bytes --]

On Wed, 26 Oct 2011 08:27:17 +0200, Herbert Xu said:
> On Tue, Oct 25, 2011 at 05:42:01PM -0700, Randy Dunlap wrote:
> > When CONFIG_NET is not enabled:
>
> Thanks, I'll add this patch.

> diff --git a/crypto/Kconfig b/crypto/Kconfig
> +	select NET

Are there any use cases where a config (probably embedded) would wantq
CRYPTO_USER but not CRYPTO_NET?  Would seem a shame to pull in the entire
CONFIG_NET stuff just for what appears to me to be a few utility routines (I
know there's still a few people out there fighting kernel bloat).

In any case, I suspect that sort of restructuring will be 3.3 material - this does
look like the right fix for this merge window.


[-- Attachment #2: Type: application/pgp-signature, Size: 227 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: linux-next: Tree for Oct 25 (crypto)
  2011-10-27  7:05     ` Valdis.Kletnieks
@ 2011-10-27  7:45       ` Herbert Xu
  2011-10-29 23:20         ` Valdis.Kletnieks
  0 siblings, 1 reply; 8+ messages in thread
From: Herbert Xu @ 2011-10-27  7:45 UTC (permalink / raw)
  To: Valdis.Kletnieks
  Cc: Randy Dunlap, Stephen Rothwell, linux-next, LKML, Linus,
	linux-crypto

On Thu, Oct 27, 2011 at 03:05:16AM -0400, Valdis.Kletnieks@vt.edu wrote:
> On Wed, 26 Oct 2011 08:27:17 +0200, Herbert Xu said:
> > On Tue, Oct 25, 2011 at 05:42:01PM -0700, Randy Dunlap wrote:
> > > When CONFIG_NET is not enabled:
> >
> > Thanks, I'll add this patch.
> 
> > diff --git a/crypto/Kconfig b/crypto/Kconfig
> > +	select NET
> 
> Are there any use cases where a config (probably embedded) would wantq
> CRYPTO_USER but not CRYPTO_NET?  Would seem a shame to pull in the entire

Since the CRYPTO_USER interface sits on top of netlink I don't
see how you could possibly avoid NET.

Thanks,
-- 
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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: linux-next: Tree for Oct 25 (crypto)
  2011-10-27  7:45       ` Herbert Xu
@ 2011-10-29 23:20         ` Valdis.Kletnieks
  0 siblings, 0 replies; 8+ messages in thread
From: Valdis.Kletnieks @ 2011-10-29 23:20 UTC (permalink / raw)
  To: Herbert Xu
  Cc: Randy Dunlap, Stephen Rothwell, linux-next, LKML, Linus,
	linux-crypto

[-- Attachment #1: Type: text/plain, Size: 537 bytes --]

On Thu, 27 Oct 2011 09:45:44 +0200, Herbert Xu said:
> On Thu, Oct 27, 2011 at 03:05:16AM -0400, Valdis.Kletnieks@vt.edu wrote:

> > Are there any use cases where a config (probably embedded) would wantq
> > CRYPTO_USER but not CRYPTO_NET?  Would seem a shame to pull in the entire
> 
> Since the CRYPTO_USER interface sits on top of netlink I don't
> see how you could possibly avoid NET.

Oh, OK.  The original bug report looked like just some utility functions not
defined, so I didn't pick up on the "it needs netlink" aspect of it.

[-- Attachment #2: Type: application/pgp-signature, Size: 227 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-10-29 23:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20111025203628.40a1b8a475e32053aa34dabe@canb.auug.org.au>
2011-10-26  0:42 ` linux-next: Tree for Oct 25 (crypto) Randy Dunlap
2011-10-26  6:27   ` Herbert Xu
2011-10-26 12:33     ` Stefan Richter
2011-10-26 16:27       ` Randy Dunlap
2011-10-26 17:15         ` Stefan Richter
2011-10-27  7:05     ` Valdis.Kletnieks
2011-10-27  7:45       ` Herbert Xu
2011-10-29 23:20         ` Valdis.Kletnieks

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).