Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1321249

Re: modinfo crc32 broken after fd44a98ae2eb

From Lucas De Marchi <lucas.de.marchi@gmail.com>
Newsgroups linux.kernel
Subject Re: modinfo crc32 broken after fd44a98ae2eb
Date 2016-01-29 02:40 +0100
Message-ID <qW6cz-3Fb-25@gated-at.bofh.it> (permalink)
References <qW6cz-3Fb-27@gated-at.bofh.it> <qW6cz-3Fb-29@gated-at.bofh.it> <qW6cz-3Fb-31@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi!

CC'ing Rusty and mailing lists

On Thu, Jan 28, 2016 at 8:40 PM, Samson Yeung <samson.yeung@oracle.com> wrote:
>
> On 01/28/2016 11:21 AM, Lucas De Marchi wrote:
>>
>> Hi Samson,
>>
>> On Wed, Jan 27, 2016 at 5:32 PM, Samson Yeung <samson.yeung@oracle.com>
>> wrote:
>>>
>>> Hi all,
>>>
>>> Please reply directly as I am not on this list.
>>>
>>> Commit "fd44a98ae2eb Fix race while loading modules" also broke 'modinfo
>>> crc32', specifically, for me.
>>>
>>> Is this a bug, is it something strange going on with crc32, or is it
>>> intended behavior?
>>
>>
>> breaking is never intended ;-). What do you mean by "break"? Does it
>> crash?
>
>
> 'modinfo crc32' prints
>
> modinfo: ERROR: Module crc32 not found.
>
> and a return value of 1 using fd44a98ae2eb.
>
> Without changing the contents of /lib/modules/`uname -r`/modules.* files,
> using fd44a98ae2eb^, 'modinfo crc32' gives me the expected info about crc32
> instead:
>
> filename:       /lib/modules/4.2.0-25-generic/kernel/crypto/crc32.ko
> alias:          crypto-crc32
> alias:          crc32
> license:        GPL
> description:    CRC32 calculations wrapper for lib/crc32
> author:         Alexander Boyko <alexander_boyko@xyratex.com>
> srcversion:     B0DE005719AC9ED9A3EEAD7
> depends:
> intree:         Y
> vermagic:       4.2.0-25-generic SMP mod_unload modversions
> signer:         Build time autogenerated kernel key
> sig_key:        A4:10:30:FB:DF:1D:C9:62:B4:BB:7D:16:44:C3:33:7E:C4:16:DB:86
> sig_hashalgo:   sha512
>
>> I can't see how this commit is related to modinfo. You will need to
>> give more details. Check if you can get the output by passing the
>> complete path to the module and make sure it's actually a module (and
>
>
> Giving the full path to the module still works as expected, so
> 'modinfo /lib/modules/4.2.0-25-generic/kernel/crypto/crc32.ko' displays
> module information and returns 0, using both fd44a98ae2eb^ and fd44a98ae2eb.
>
>> not builtin) in your kernel configuration
>
>
> I must admit that I'm slightly confused wrt crc32, since there is
> kernel/arch/x86/crypto/crc32-pclmul.ko as well as kernel/crypto/crc32.ko,
> and 'modinfo crc32-pclmul' claims that crc32 is an alias.
>
> I This happens with a stock Ubuntu kernel (4.2.0-25-generic for Wily),
> however I first observed this behavior on Redhat/Oracle Linux 7.


So... it looks like we have both kernel/lib/crc32.ko and
kernel/crypto/crc32.ko - module names should be global. It doesn't clash in
the kernel build because kernel/lib/crc32 is builtin most of the time.

With that commit in kmod there was a change on the builtin detection to fix
the race. I'll take a look to fix this, but it should probably be
fixed in the kernel
 as well.

Rusty and ohers: it looks like both CONFIG_CRC32 and
CONFIG_CRYPTO_CRC32 can be compiled as module, and they generate
modules with the same name, crc32.  Could that be fixed?


Lucas De Marchi

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: modinfo crc32 broken after fd44a98ae2eb Lucas De Marchi <lucas.de.marchi@gmail.com> - 2016-01-29 02:40 +0100
  Duplicated module names Rusty Russell <rusty@rustcorp.com.au> - 2016-01-29 07:00 +0100
    Re: Duplicated module names Tomi Valkeinen <tomi.valkeinen@ti.com> - 2016-01-29 08:10 +0100
    Re: Duplicated module names Herbert Xu <herbert@gondor.apana.org.au> - 2016-01-29 11:30 +0100
    Re: Duplicated module names Sudeep Holla <sudeep.holla@arm.com> - 2016-01-29 17:00 +0100
    Re: Duplicated module names Lucas De Marchi <lucas.de.marchi@gmail.com> - 2016-01-29 20:10 +0100

csiph-web