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

* Re: nfit_test: issue #2: modprobe: ERROR: could not insert 'nfit_test': Unknown symbol in module, or unknown parameter
  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
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Williams @ 2020-03-12 17:05 UTC (permalink / raw)
  To: Dorau, Lukasz; +Cc: linux-nvdimm, Slusarz, Marcin

On Thu, Mar 12, 2020 at 7:38 AM Dorau, Lukasz <lukasz.dorau@intel.com> wrote:
>
> 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)

Yes, you're environment is not being careful to exclude the production
version of the modules from being loaded. The ndctl unit test core
also sanity checks nfit_Test and reports the collisions before running
tests. See nfit_test_init():

    https://github.com/pmem/ndctl/blob/master/test/core.c#L119

I'd recommend at least running:

    make TESTS=libndctl check

...from latest ndctl.git to sanity check your nfit_test module
dependencies before trying to load it manually.

See the troubleshooting document:

    https://github.com/pmem/ndctl#troubleshooting

...for other tips about how to prevent the production modules from loading.
_______________________________________________
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

* RE: nfit_test: issue #2: modprobe: ERROR: could not insert 'nfit_test': Unknown symbol in module, or unknown parameter
  2020-03-12 17:05 ` Dan Williams
@ 2020-03-13  9:49   ` Dorau, Lukasz
  2020-03-13 15:41     ` Dan Williams
  0 siblings, 1 reply; 5+ messages in thread
From: Dorau, Lukasz @ 2020-03-13  9:49 UTC (permalink / raw)
  To: Williams, Dan J; +Cc: linux-nvdimm, Slusarz, Marcin

On Thursday, March 12, 2020 6:06 PM Dan Williams <dan.j.williams@intel.com> wrote:
> 
> Yes, you're environment is not being careful to exclude the production
> version of the modules from being loaded. The ndctl unit test core
> also sanity checks nfit_Test and reports the collisions before running
> tests. See nfit_test_init():
> 
>     https://github.com/pmem/ndctl/blob/master/test/core.c#L119
> 
> I'd recommend at least running:
> 
>     make TESTS=libndctl check
> 
> ...from latest ndctl.git to sanity check your nfit_test module
> dependencies before trying to load it manually.
> 
> See the troubleshooting document:
> 
>     https://github.com/pmem/ndctl#troubleshooting
> 
> ...for other tips about how to prevent the production modules from loading.

Thanks for tips! I have followed those instructions and it did not help:

$ cat /etc/depmod.d/nvdimm-extra
override nfit * extra
override device_dax * extra
override dax_pmem * extra
override dax_pmem_core * extra
override dax_pmem_compat * extra
override libnvdimm * extra
override nd_blk * extra
override nd_btt * extra
override nd_e820 * extra
override nd_pmem * extra

$ find /lib/modules/5.6.0-rc1-13504-g7b27a8622f80/ -name "*nfit*"
/lib/modules/5.6.0-rc1-13504-g7b27a8622f80/kernel/drivers/acpi/nfit
/lib/modules/5.6.0-rc1-13504-g7b27a8622f80/kernel/drivers/acpi/nfit/nfit.ko.xz
/lib/modules/5.6.0-rc1-13504-g7b27a8622f80/extra/nfit.ko.xz
/lib/modules/5.6.0-rc1-13504-g7b27a8622f80/extra/test/nfit_test.ko.xz
/lib/modules/5.6.0-rc1-13504-g7b27a8622f80/extra/test/nfit_test_iomap.ko.xz

$ make TESTS=libndctl check
[...]
make --no-print-directory check-TESTS
SKIP: libndctl
============================================================================
Testsuite summary for ndctl 67
============================================================================
# TOTAL: 1
# PASS:  0
# SKIP:  1
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================

$ cat test/test-suite.log
[...]
.. contents:: :depth: 2

SKIP: libndctl
==============

test/init: nfit_test_init: nfit.ko: appears to be production version: /lib/modules/5.6.0-rc1-13504-g7b27a8622f80/kernel/drivers/acpi/nfit/nfit.ko.xz
__ndctl_test_skip: explicit skip test_libndctl:2695
nfit_test unavailable skipping tests
libdaxctl: daxctl_unref: context 0xe02a00 released
libndctl: ndctl_unref: context 0xe05f20 released
attempted: 1 skipped: 1
SKIP libndctl (exit status: 77)

As you can see 'ndctl' also cannot load the extra test version of the modules even if there is the following file:

$ cat /etc/depmod.d/nvdimm-extra
override nfit * extra
override device_dax * extra
override dax_pmem * extra
override dax_pmem_core * extra
override dax_pmem_compat * extra
override libnvdimm * extra
override nd_blk * extra
override nd_btt * extra
override nd_e820 * extra
override nd_pmem * extra

Can I try anything else? Do you have 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

* Re: nfit_test: issue #2: modprobe: ERROR: could not insert 'nfit_test': Unknown symbol in module, or unknown parameter
  2020-03-13  9:49   ` Dorau, Lukasz
@ 2020-03-13 15:41     ` Dan Williams
  2020-03-16  8:41       ` Dorau, Lukasz
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Williams @ 2020-03-13 15:41 UTC (permalink / raw)
  To: Dorau, Lukasz; +Cc: linux-nvdimm, Slusarz, Marcin

On Fri, Mar 13, 2020 at 2:49 AM Dorau, Lukasz <lukasz.dorau@intel.com> wrote:
>
> On Thursday, March 12, 2020 6:06 PM Dan Williams <dan.j.williams@intel.com> wrote:
> >
> > Yes, you're environment is not being careful to exclude the production
> > version of the modules from being loaded. The ndctl unit test core
> > also sanity checks nfit_Test and reports the collisions before running
> > tests. See nfit_test_init():
> >
> >     https://github.com/pmem/ndctl/blob/master/test/core.c#L119
> >
> > I'd recommend at least running:
> >
> >     make TESTS=libndctl check
> >
> > ...from latest ndctl.git to sanity check your nfit_test module
> > dependencies before trying to load it manually.
> >
> > See the troubleshooting document:
> >
> >     https://github.com/pmem/ndctl#troubleshooting
> >
> > ...for other tips about how to prevent the production modules from loading.
>
> Thanks for tips! I have followed those instructions and it did not help:
>
> $ cat /etc/depmod.d/nvdimm-extra
> override nfit * extra
> override device_dax * extra
> override dax_pmem * extra
> override dax_pmem_core * extra
> override dax_pmem_compat * extra
> override libnvdimm * extra
> override nd_blk * extra
> override nd_btt * extra
> override nd_e820 * extra
> override nd_pmem * extra
>
> $ find /lib/modules/5.6.0-rc1-13504-g7b27a8622f80/ -name "*nfit*"
> /lib/modules/5.6.0-rc1-13504-g7b27a8622f80/kernel/drivers/acpi/nfit
> /lib/modules/5.6.0-rc1-13504-g7b27a8622f80/kernel/drivers/acpi/nfit/nfit.ko.xz
> /lib/modules/5.6.0-rc1-13504-g7b27a8622f80/extra/nfit.ko.xz
> /lib/modules/5.6.0-rc1-13504-g7b27a8622f80/extra/test/nfit_test.ko.xz
> /lib/modules/5.6.0-rc1-13504-g7b27a8622f80/extra/test/nfit_test_iomap.ko.xz
>
> $ make TESTS=libndctl check
> [...]
> make --no-print-directory check-TESTS
> SKIP: libndctl
> ============================================================================
> Testsuite summary for ndctl 67
> ============================================================================
> # TOTAL: 1
> # PASS:  0
> # SKIP:  1
> # XFAIL: 0
> # FAIL:  0
> # XPASS: 0
> # ERROR: 0
> ============================================================================
>
> $ cat test/test-suite.log
> [...]
> .. contents:: :depth: 2
>
> SKIP: libndctl
> ==============
>
> test/init: nfit_test_init: nfit.ko: appears to be production version: /lib/modules/5.6.0-rc1-13504-g7b27a8622f80/kernel/drivers/acpi/nfit/nfit.ko.xz
> __ndctl_test_skip: explicit skip test_libndctl:2695
> nfit_test unavailable skipping tests
> libdaxctl: daxctl_unref: context 0xe02a00 released
> libndctl: ndctl_unref: context 0xe05f20 released
> attempted: 1 skipped: 1
> SKIP libndctl (exit status: 77)
>
> As you can see 'ndctl' also cannot load the extra test version of the modules even if there is the following file:
>
> $ cat /etc/depmod.d/nvdimm-extra
> override nfit * extra
> override device_dax * extra
> override dax_pmem * extra
> override dax_pmem_core * extra
> override dax_pmem_compat * extra
> override libnvdimm * extra
> override nd_blk * extra
> override nd_btt * extra
> override nd_e820 * extra
> override nd_pmem * extra
>
> Can I try anything else? Do you have any suggestions?

Do you have the nfit, or libnvdimm modules loading from the initramfs?
_______________________________________________
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

* RE: nfit_test: issue #2: modprobe: ERROR: could not insert 'nfit_test': Unknown symbol in module, or unknown parameter
  2020-03-13 15:41     ` Dan Williams
@ 2020-03-16  8:41       ` Dorau, Lukasz
  0 siblings, 0 replies; 5+ messages in thread
From: Dorau, Lukasz @ 2020-03-16  8:41 UTC (permalink / raw)
  To: Williams, Dan J; +Cc: linux-nvdimm, Slusarz, Marcin

On Friday, March 13, 2020 4:41 PM Dan Williams <dan.j.williams@intel.com> wrote:
> On Fri, Mar 13, 2020 at 2:49 AM Dorau, Lukasz <lukasz.dorau@intel.com> wrote:
> > As you can see 'ndctl' also cannot load the extra test version of the modules even if
> there is the following file:
> >
> > $ cat /etc/depmod.d/nvdimm-extra
> > override nfit * extra
> > override device_dax * extra
> > override dax_pmem * extra
> > override dax_pmem_core * extra
> > override dax_pmem_compat * extra
> > override libnvdimm * extra
> > override nd_blk * extra
> > override nd_btt * extra
> > override nd_e820 * extra
> > override nd_pmem * extra
> >
> > Can I try anything else? Do you have any suggestions?
> 
> Do you have the nfit, or libnvdimm modules loading from the initramfs?

No, I do not:	

$ sudo lsinitrd /boot/initramfs-5.6.0-rc1-13504-g7b27a8622f80.img | grep nfit
$ sudo lsinitrd /boot/initramfs-5.6.0-rc1-13504-g7b27a8622f80.img | grep libnvdimm
$

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