[LTP] [PATCH 1/2] tst_kernel: Fix search for foo-x86-64 module

Li Wang liwang@redhat.com
Mon Mar 21 09:19:45 CET 2022


On Fri, Mar 18, 2022 at 5:50 PM Petr Vorel <pvorel@suse.cz> wrote:

> Hi Li,
>
> > On Wed, Mar 16, 2022 at 10:11 PM Petr Vorel <pvorel@suse.cz> wrote:
>
> > > > Hi Petr
> > > > I don't understand why we must serach foo-x86-64 module, so what
> problem
> > > > do you meet?
>
> > > > I used 5.17-rc8,  it still use foo-x86_64 named rule for
> > > > kernel/arch/x86/crypto/libblake2s-x86_64.ko.
>
> > > > If kernel has libblake2s-x86_64 module, then tst_check_driver will
> use
> > > > libblake2s_x86_64 to find, it should succeed.
>
> > > > If kernel doesn't have libblake2s-x86_64 module, then
> tst_ckeck_driver
> > > > will search twice ,the first time use libblake2s-x86_64  and the
> second
> > > > time use libblake2s_x86_64, then search failed.
>
> > > tst_check_driver.sh is failing on intel based systems. Well, we could
> make
> > > sure
> > > it does not try to test libblake2s-x86-64, IMHO it'd be better to make
> sure
> > > tst_search_driver() works with it, because modinfo/modprobe works with
> it:
>
> > > $ modinfo libblake2s-x86-64
> > > name:           libblake2s_x86_64
> > > filename:       (builtin)
> > > license:        GPL v2
> > > file:           arch/x86/crypto/libblake2s-x86_64
>
> > > Sure, it's a corner case, but I'd still fix it.
> > > Let's see what other think.
>

Ah, I see. Sure, I'm fine to go with your fix :).



>
>
> > Which kernel (and kmod) version did you use?
>
> > I tried locally on my rhel8 and fedora 34 but that doesn't work for me.
>
> > $ rpm -q kmod
> > kmod-28-2.fc34.x86_64
>
> > $ lsmod  |grep  libblake2s
> > libblake2s             16384  0
> > blake2s_x86_64         20480  1 libblake2s
> > libblake2s_generic     20480  1 blake2s_x86_64
>
> > $ modinfo libblake2s-x86-64
> > modinfo: ERROR: Module libblake2s-x86-64 not found.
> => 5.16 had blake2s_x86_64, not libblake2s_x86_64
>
> openSUSE
> * 5.17.0-rc7-26.g04b7727-default, kmod-29-8.4.x86_64
> works (testing libblake2s-x86-64)
> * 5.16, kmod-29-7.1.x86_64
> works (testing blake2s_x86-64)
>
> Fedora 34
> * 5.13.16, kmod-29-2.fc34.x86_64
> works (testing blake2s_x86-64)
>
>
> > Then I checked the Linux source code and get:
> > ------------------
>
> > $ cat linux/arch/x86/crypto/Makefile |grep libblake2s
> > obj-$(if $(CONFIG_CRYPTO_BLAKE2S_X86),y) += libblake2s-x86_64.o
> > libblake2s-x86_64-y := blake2s-core.o blake2s-glue.o
> 6048fdcc5f26 ("lib/crypto: blake2s: include as built-in")
> Follows: v5.16-rc8
> Precedes: v5.17-rc1
> ...
> +++ b/arch/x86/crypto/Makefile
> ...
> -blake2s-x86_64-y := blake2s-core.o blake2s-glue.o
> +blake2s-x86_64-y := blake2s-shash.o
> +obj-$(if $(CONFIG_CRYPTO_BLAKE2S_X86),y) += libblake2s-x86_64.o
> +libblake2s-x86_64-y := blake2s-core.o blake2s-glue.o
>
> Kind regards,
> Petr
>
>

-- 
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20220321/128df925/attachment.htm>


More information about the ltp mailing list