linux-nvdimm.lists.01.org archive mirror
 help / color / mirror / Atom feed
From: "Dorau, Lukasz" <lukasz.dorau@intel.com>
To: linux-nvdimm <linux-nvdimm@lists.01.org>
Cc: "Slusarz, Marcin" <marcin.slusarz@intel.com>
Subject: nfit_test: issue #2: modprobe: ERROR: could not insert 'nfit_test': Unknown symbol in module, or unknown parameter
Date: Thu, 12 Mar 2020 14:38:21 +0000	[thread overview]
Message-ID: <SN6PR11MB2864B07E6EA3CFCDB77169FE96FD0@SN6PR11MB2864.namprd11.prod.outlook.com> (raw)

Hi,

Inserting the 'nfit_test' module in a natural way fails with the following error:

$ sudo modprobe -v nfit_test
insmod /lib/modules/5.6.0-rc1-bb-13504-g7b27a8622f80/kernel/drivers/char/hw_random/rng-core.ko.xz 
insmod /lib/modules/5.6.0-rc1-bb-13504-g7b27a8622f80/kernel/drivers/char/tpm/tpm.ko.xz 
insmod /lib/modules/5.6.0-rc1-bb-13504-g7b27a8622f80/kernel/security/keys/trusted-keys/trusted.ko.xz 
insmod /lib/modules/5.6.0-rc1-bb-13504-g7b27a8622f80/kernel/security/keys/encrypted-keys/encrypted-keys.ko.xz 
install /usr/bin/ndctl load-keys ; /sbin/modprobe --ignore-install libnvdimm $CMDLINE_OPTS 
No TPM handle discovered.
failed to open file /etc/ndctl/keys/nvdimm-master.blob: No such file or directory
insmod /lib/modules/5.6.0-rc1-bb-13504-g7b27a8622f80/kernel/drivers/nvdimm/libnvdimm.ko.xz 
insmod /lib/modules/5.6.0-rc1-bb-13504-g7b27a8622f80/kernel/drivers/acpi/nfit/nfit.ko.xz 
insmod /lib/modules/5.6.0-rc1-bb-13504-g7b27a8622f80/extra/test/nfit_test_iomap.ko.xz 
insmod /lib/modules/5.6.0-rc1-bb-13504-g7b27a8622f80/extra/test/nfit_test.ko.xz 
modprobe: ERROR: could not insert 'nfit_test': Unknown symbol in module, or unknown parameter (see dmesg)

$ dmesg | tail
[  659.295461] Key type encrypted registered
[  659.337971] nfit_test: Unknown symbol libnvdimm_test (err -2)
[  659.337997] nfit_test: Unknown symbol acpi_nfit_test (err -2)
[  659.338035] nfit_test: Unknown symbol pmem_test (err -2)
[  659.338061] nfit_test: Unknown symbol dax_pmem_core_test (err -2)
[  659.338097] nfit_test: Unknown symbol dax_pmem_compat_test (err -2)
[  659.338125] nfit_test: Unknown symbol device_dax_test (err -2)
[  659.338144] nfit_test: Unknown symbol dax_pmem_test (err -2)

It is because the standard versions of the 'libnvdimm' and 'nfit' modules were inserted instead of the mocked ones from the 'extra' subdirectory as you can see above and below:

$ sudo modinfo nfit | grep -e filename
filename:       /lib/modules/5.6.0-rc1-bb-13504-g7b27a8622f80/kernel/drivers/acpi/nfit/nfit.ko.xz
$ sudo modinfo libnvdimm | grep -e filename
filename:       /lib/modules/5.6.0-rc1-bb-13504-g7b27a8622f80/kernel/drivers/nvdimm/libnvdimm.ko.xz

There is a workaround - it can be done manually in the following way....

$ sudo rmmod nfit
$ sudo rmmod libnvdimm

Only /lib/modules/5.6.0-rc1-bb-13504-g7b27a8622f80/extra/test/nfit_test_iomap.ko.xz is inserted now.

$ sudo insmod /lib/modules/5.6.0-rc1-bb-13504-g7b27a8622f80/extra/libnvdimm.ko.xz
$ sudo insmod /lib/modules/5.6.0-rc1-bb-13504-g7b27a8622f80/extra/nd_btt.ko.xz
$ sudo insmod /lib/modules/5.6.0-rc1-bb-13504-g7b27a8622f80/extra/nd_pmem.ko.xz
$ sudo insmod /lib/modules/5.6.0-rc1-bb-13504-g7b27a8622f80/extra/nfit.ko.xz
$ sudo insmod /lib/modules/5.6.0-rc1-bb-13504-g7b27a8622f80/extra/dax_pmem_core.ko.xz
$ sudo insmod /lib/modules/5.6.0-rc1-bb-13504-g7b27a8622f80/extra/dax_pmem.ko.xz
$ sudo insmod /lib/modules/5.6.0-rc1-bb-13504-g7b27a8622f80/extra/device_dax.ko.xz
$ sudo insmod /lib/modules/5.6.0-rc1-bb-13504-g7b27a8622f80/extra/dax_pmem_compat.ko.xz
$ sudo insmod /lib/modules/5.6.0-rc1-bb-13504-g7b27a8622f80/extra/test/nfit_test.ko.xz

$ dmesg | tail
[ 1214.908974] nfit_test: mcsafe_test: disabled, skip.
[ 1214.968913] nfit_test nfit_test.0: failed to evaluate _FIT
[ 1214.976728] nfit_test nfit_test.1: Error found in NVDIMM nmem4 flags: save_fail restore_fail flush_fail not_armed
[ 1214.976740] nfit_test nfit_test.1: Error found in NVDIMM nmem5 flags: map_fail
[ 1214.977745] nd_pmem namespace6.0: region6 read-only, marking pmem6 read-only
[ 1214.977906] pmem6: detected capacity change from 0 to 33554432
[ 1214.977915] pmem7: detected capacity change from 0 to 4194304

Let's try to remove the 'nfit_test' module:

$ sudo ndctl disable-region all
disabled 8 regions

$ sudo modprobe -v -r nfit_test
rmmod nfit_test
rmmod nfit

... and insert it again:

$ sudo modprobe -v nfit_test
insmod /lib/modules/5.6.0-rc1-bb-13504-g7b27a8622f80/kernel/drivers/acpi/nfit/nfit.ko.xz 
insmod /lib/modules/5.6.0-rc1-bb-13504-g7b27a8622f80/extra/test/nfit_test.ko.xz 
modprobe: ERROR: could not insert 'nfit_test': Unknown symbol in module, or unknown parameter (see dmesg)

$ dmesg | tail
[ 1486.193503] nfit_test: Unknown symbol acpi_nfit_test (err -2)

And now the wrong version of the 'nfit' module was inserted ... 
The only way is to do it  manualy again:

$ sudo rmmod -v nfit 
$ sudo insmod /lib/modules/5.6.0-rc1-bb-13504-g7b27a8622f80/extra/nfit.ko.xz
$ sudo modprobe -v nfit_test
insmod /lib/modules/5.6.0-rc1-bb-13504-g7b27a8622f80/extra/test/nfit_test.ko.xz 

Does anyone know how it can be fixed? Any suggestions?

--
Lukasz
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org

             reply	other threads:[~2020-03-12 14:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-12 14:38 Dorau, Lukasz [this message]
2020-03-12 17:05 ` Dan Williams
2020-03-13  9:49   ` Dorau, Lukasz
2020-03-13 15:41     ` Dan Williams
2020-03-16  8:41       ` Dorau, Lukasz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=SN6PR11MB2864B07E6EA3CFCDB77169FE96FD0@SN6PR11MB2864.namprd11.prod.outlook.com \
    --to=lukasz.dorau@intel.com \
    --cc=linux-nvdimm@lists.01.org \
    --cc=marcin.slusarz@intel.com \
    --subject='Re: nfit_test: issue #2: modprobe: ERROR: could not insert '\''nfit_test'\'': Unknown symbol in module, or unknown parameter' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).