linux-nvdimm.lists.01.org archive mirror
 help / color / mirror / Atom feed
* nfit_test: issue #2: modprobe: ERROR: could not insert 'nfit_test': Unknown symbol in module, or unknown parameter
@ 2020-03-12 14:38 Dorau, Lukasz
  2020-03-12 17:05 ` Dan Williams
  0 siblings, 1 reply; 5+ messages in thread
From: Dorau, Lukasz @ 2020-03-12 14:38 UTC (permalink / raw)
  To: linux-nvdimm; +Cc: Slusarz, Marcin

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

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

end of thread, other threads:[~2020-03-16  8:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-12 14:38 nfit_test: issue #2: modprobe: ERROR: could not insert 'nfit_test': Unknown symbol in module, or unknown parameter Dorau, Lukasz
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

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