2009-06-01 02:02:55

by Ben Hutchings

[permalink] [raw]
Subject: Re: linux-image-2.6.24-1-686: airo hang when loading because of aes

matthieu castet <[email protected]> wrote:
> airo driver hang with 2.6.24-6 on a PIII.
> It seems it it because it need aes crypto.
> It will first try to load padlock-aes, but it fails to load
> Then it load geode_aes which load, and airo hang (airo seems to use
> geode_aes). [1]
[...]

geode_aes is a PCI driver and should be automatically loaded if the PCI
device it handles is present. However, since it also declares the alias
"aes", when the crypto system attempts to load the "aes" module it may
load this module and then wait for up to a minute for it to initialise
and register the "aes" algorithm. geode_aes will never do this, since
if there was a suitable device present it would already have been
loaded.

(The padlock modules don't seem to have the same problem because their
module initialisation functions immediately return failure if the CPU
doesn't support.)

I believe geode_aes can be fixed by either (1) removing the MODULE_ALIAS
declaration or (2) making the module initialisation function fail if the
device is not present. The latter behaviour is generally wrong for PCI
drivers, but this device presumably cannot be hotplugged.

Ben.

--
Ben Hutchings
Logic doesn't apply to the real world. - Marvin Minsky


Attachments:
signature.asc (189.00 B)
This is a digitally signed message part

2009-06-02 05:12:39

by Herbert Xu

[permalink] [raw]
Subject: Re: linux-image-2.6.24-1-686: airo hang when loading because of aes

Ben Hutchings <[email protected]> wrote:
>
> I believe geode_aes can be fixed by either (1) removing the MODULE_ALIAS
> declaration or (2) making the module initialisation function fail if the
> device is not present. The latter behaviour is generally wrong for PCI
> drivers, but this device presumably cannot be hotplugged.

I was going to remove this alias but found that it was already
removed two years ago. Please revise your theory based on this
new discovery :)
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

2009-06-02 08:30:07

by Ben Hutchings

[permalink] [raw]
Subject: Re: linux-image-2.6.24-1-686: airo hang when loading because of aes

On Tue, 2009-06-02 at 15:12 +1000, Herbert Xu wrote:
> Ben Hutchings <[email protected]> wrote:
> >
> > I believe geode_aes can be fixed by either (1) removing the MODULE_ALIAS
> > declaration or (2) making the module initialisation function fail if the
> > device is not present. The latter behaviour is generally wrong for PCI
> > drivers, but this device presumably cannot be hotplugged.
>
> I was going to remove this alias but found that it was already
> removed two years ago. Please revise your theory based on this
> new discovery :)

As the subject says, this bug was found in 2.6.24. Sorry I forgot to
check the current version; I generally would do that. I think you've
confirmed that (1) is the correct fix.

Ben.

--
Ben Hutchings
Logic doesn't apply to the real world. - Marvin Minsky


Attachments:
signature.asc (189.00 B)
This is a digitally signed message part