* Re: Help in loading modules [not found] <20230311085922.GC11242@ubuntu> @ 2023-03-11 9:01 ` Julia Lawall 2023-03-11 10:28 ` Sumitra Sharma 0 siblings, 1 reply; 7+ messages in thread From: Julia Lawall @ 2023-03-11 9:01 UTC (permalink / raw) To: Sumitra Sharma; +Cc: outreachy On Sat, 11 Mar 2023, Sumitra Sharma wrote: > Hi julia, > > My module pi433 is not present int the "lsmod" output. What should I > suppose to do next. Maybe it is not compiled by your kernel configuration? Please include the list in any messages. julia > > ## > Module Size Used by > psmouse 204800 0 > hid_generic 16384 0 > mptspi 24576 1 > scsi_transport_spi 40960 1 mptspi > mptscsih 49152 1 mptspi > mptbase 114688 2 mptspi,mptscsih > e1000 172032 0 > ahci 49152 0 > libahci 57344 1 ahci > i2c_piix4 28672 0 > pata_acpi 16384 0 > usbhid 73728 0 > hid 163840 2 usbhid,hid_generic > > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Help in loading modules 2023-03-11 9:01 ` Help in loading modules Julia Lawall @ 2023-03-11 10:28 ` Sumitra Sharma 2023-03-11 10:33 ` Julia Lawall 2023-03-13 1:25 ` Ira Weiny 0 siblings, 2 replies; 7+ messages in thread From: Sumitra Sharma @ 2023-03-11 10:28 UTC (permalink / raw) To: outreachy; +Cc: julia.lawall More information: Upon running the "dmesg" it shows ## BPF: Invalid name_offset:2154618 [ 2905.429687] failed to validate module [pi433] BTF: -22 ## Also I checked under "/lib/modules/`uname -r`" in the "modules.dep" file it do contains the "kernel/drivers/staging/pi433/pi433.ko:". I also tried running "sudo insmod ./kernel/drivers/staging/pi433/pi433.ko" which again prints the error: ## insmod: ERROR: could not insert module ./kernel/drivers/staging/pi433/pi433.ko: Invalid parameters ## Other than these I also checked the ".config" which contains: ## CONFIG_SPI=y CONFIG_STAGING=y CONFIG_PI433=m ## where the module dependencies were given as Symbol: PI433 [=m] │ │ Type : tristate │ │ Defined at drivers/staging/pi433/Kconfig:2 │ │ Prompt: Pi433 - a 433MHz radio module for Raspberry Pi │ │ Depends on: STAGING [=y] && SPI [=y] │ │ Location: │ │ -> Device Drivers │ │ -> Staging drivers (STAGING [=y]) │ │ (1) -> Pi433 - a 433MHz radio module for Raspberry Pi (PI433 [=m]) ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Help in loading modules 2023-03-11 10:28 ` Sumitra Sharma @ 2023-03-11 10:33 ` Julia Lawall 2023-03-13 1:25 ` Ira Weiny 1 sibling, 0 replies; 7+ messages in thread From: Julia Lawall @ 2023-03-11 10:33 UTC (permalink / raw) To: Sumitra Sharma; +Cc: outreachy, julia.lawall [-- Attachment #1: Type: text/plain, Size: 1990 bytes --] On Sat, 11 Mar 2023, Sumitra Sharma wrote: > More information: > > Upon running the "dmesg" it shows > ## > BPF: Invalid name_offset:2154618 > [ 2905.429687] failed to validate module [pi433] BTF: -22 > ## > > Also I checked under "/lib/modules/`uname -r`" in the "modules.dep" file it do contains the "kernel/drivers/staging/pi433/pi433.ko:". > > I also tried running "sudo insmod ./kernel/drivers/staging/pi433/pi433.ko" which again prints the error: > > ## > insmod: ERROR: could not insert module ./kernel/drivers/staging/pi433/pi433.ko: Invalid parameters > ## > > Other than these I also checked the ".config" which contains: > > ## > CONFIG_SPI=y > CONFIG_STAGING=y > CONFIG_PI433=m > ## > > where the module dependencies were given as > > Symbol: PI433 [=m] │ > │ Type : tristate │ > │ Defined at drivers/staging/pi433/Kconfig:2 │ > │ Prompt: Pi433 - a 433MHz radio module for Raspberry Pi │ > │ Depends on: STAGING [=y] && SPI [=y] │ > │ Location: │ > │ -> Device Drivers │ > │ -> Staging drivers (STAGING [=y]) │ > │ (1) -> Pi433 - a 433MHz radio module for Raspberry Pi (PI433 [=m]) Maybe it is not possible to install the module if you don't have the device. For staging code, it is likely only possible to verify that it compiles properly. julia ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Help in loading modules 2023-03-11 10:28 ` Sumitra Sharma 2023-03-11 10:33 ` Julia Lawall @ 2023-03-13 1:25 ` Ira Weiny 2023-03-19 14:23 ` Sumitra Sharma 1 sibling, 1 reply; 7+ messages in thread From: Ira Weiny @ 2023-03-13 1:25 UTC (permalink / raw) To: Sumitra Sharma, outreachy; +Cc: julia.lawall Sumitra Sharma wrote: > More information: > > Upon running the "dmesg" it shows > ## > BPF: Invalid name_offset:2154618 > [ 2905.429687] failed to validate module [pi433] BTF: -22 > ## Good start. I did some digging. $ git grep "failed to validate module" kernel/bpf/btf.c: pr_warn("failed to validate module [%s] BTF: %ld\n", kernel/bpf/btf.c: ... if (!IS_ENABLED(CONFIG_MODULE_ALLOW_BTF_MISMATCH)) { pr_warn("failed to validate module [%s] BTF: %ld\n", mod->name, PTR_ERR(btf)); err = PTR_ERR(btf); } else { ... $ git grep BTF_MISMATCH kernel/bpf/btf.c: if (env->btf->base_btf && IS_ENABLED(CONFIG_MODULE_ALLOW_BTF_MISMATCH)) kernel/bpf/btf.c: if (env->btf->base_btf && IS_ENABLED(CONFIG_MODULE_ALLOW_BTF_MISMATCH)) kernel/bpf/btf.c: if (!IS_ENABLED(CONFIG_MODULE_ALLOW_BTF_MISMATCH)) { lib/Kconfig.debug:config MODULE_ALLOW_BTF_MISMATCH lib/Kconfig.debug: ... config MODULE_ALLOW_BTF_MISMATCH bool "Allow loading modules with non-matching BTF type info" depends on DEBUG_INFO_BTF_MODULES help For modules whose split BTF does not match vmlinux, load without BTF rather than refusing to load. The default behavior with module BTF enabled is to reject modules with such mismatches; this option will still load module BTF where possible but ignore it when a mismatch is found. ... For more information on BTF: https://docs.kernel.org/bpf/btf.html Are you building this module in the same place as the running kernel? It would probably be easier to do so. Ira > > Also I checked under "/lib/modules/`uname -r`" in the "modules.dep" file it do contains the "kernel/drivers/staging/pi433/pi433.ko:". > > I also tried running "sudo insmod ./kernel/drivers/staging/pi433/pi433.ko" which again prints the error: > > ## > insmod: ERROR: could not insert module ./kernel/drivers/staging/pi433/pi433.ko: Invalid parameters > ## > > Other than these I also checked the ".config" which contains: > > ## > CONFIG_SPI=y > CONFIG_STAGING=y > CONFIG_PI433=m > ## > > where the module dependencies were given as > > Symbol: PI433 [=m] │ > │ Type : tristate │ > │ Defined at drivers/staging/pi433/Kconfig:2 │ > │ Prompt: Pi433 - a 433MHz radio module for Raspberry Pi │ > │ Depends on: STAGING [=y] && SPI [=y] │ > │ Location: │ > │ -> Device Drivers │ > │ -> Staging drivers (STAGING [=y]) │ > │ (1) -> Pi433 - a 433MHz radio module for Raspberry Pi (PI433 [=m]) > > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Help in loading modules 2023-03-13 1:25 ` Ira Weiny @ 2023-03-19 14:23 ` Sumitra Sharma 2023-03-21 0:29 ` Ira Weiny 0 siblings, 1 reply; 7+ messages in thread From: Sumitra Sharma @ 2023-03-19 14:23 UTC (permalink / raw) To: Ira Weiny; +Cc: outreachy, julia.lawall On Sun, Mar 12, 2023 at 06:25:21PM -0700, Ira Weiny wrote: > Sumitra Sharma wrote: > > More information: > > > > Upon running the "dmesg" it shows > > ## > > BPF: Invalid name_offset:2154618 > > [ 2905.429687] failed to validate module [pi433] BTF: -22 > > ## > > Good start. I did some digging. > > $ git grep "failed to validate module" > kernel/bpf/btf.c: pr_warn("failed to validate module [%s] BTF: %ld\n", > > > kernel/bpf/btf.c: > ... > if (!IS_ENABLED(CONFIG_MODULE_ALLOW_BTF_MISMATCH)) { > pr_warn("failed to validate module [%s] BTF: %ld\n", > mod->name, PTR_ERR(btf)); > err = PTR_ERR(btf); > } else { > ... > > > $ git grep BTF_MISMATCH > kernel/bpf/btf.c: if (env->btf->base_btf && IS_ENABLED(CONFIG_MODULE_ALLOW_BTF_MISMATCH)) > kernel/bpf/btf.c: if (env->btf->base_btf && IS_ENABLED(CONFIG_MODULE_ALLOW_BTF_MISMATCH)) > kernel/bpf/btf.c: if (!IS_ENABLED(CONFIG_MODULE_ALLOW_BTF_MISMATCH)) { > lib/Kconfig.debug:config MODULE_ALLOW_BTF_MISMATCH > > > lib/Kconfig.debug: > ... > config MODULE_ALLOW_BTF_MISMATCH > bool "Allow loading modules with non-matching BTF type info" > depends on DEBUG_INFO_BTF_MODULES > help > For modules whose split BTF does not match vmlinux, load without > BTF rather than refusing to load. The default behavior with > module BTF enabled is to reject modules with such mismatches; > this option will still load module BTF where possible but ignore > it when a mismatch is found. > ... > > For more information on BTF: > > https://docs.kernel.org/bpf/btf.html > > Are you building this module in the same place as the running kernel? It would > probably be easier to do so. > > Ira > Hi Ira, What is the solution to this? Regards, Sumitra > > > > Also I checked under "/lib/modules/`uname -r`" in the "modules.dep" file it do contains the "kernel/drivers/staging/pi433/pi433.ko:". > > > > I also tried running "sudo insmod ./kernel/drivers/staging/pi433/pi433.ko" which again prints the error: > > > > ## > > insmod: ERROR: could not insert module ./kernel/drivers/staging/pi433/pi433.ko: Invalid parameters > > ## > > > > Other than these I also checked the ".config" which contains: > > > > ## > > CONFIG_SPI=y > > CONFIG_STAGING=y > > CONFIG_PI433=m > > ## > > > > where the module dependencies were given as > > > > Symbol: PI433 [=m] │ > > │ Type : tristate │ > > │ Defined at drivers/staging/pi433/Kconfig:2 │ > > │ Prompt: Pi433 - a 433MHz radio module for Raspberry Pi │ > > │ Depends on: STAGING [=y] && SPI [=y] │ > > │ Location: │ > > │ -> Device Drivers │ > > │ -> Staging drivers (STAGING [=y]) │ > > │ (1) -> Pi433 - a 433MHz radio module for Raspberry Pi (PI433 [=m]) > > > > > > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Help in loading modules 2023-03-19 14:23 ` Sumitra Sharma @ 2023-03-21 0:29 ` Ira Weiny 0 siblings, 0 replies; 7+ messages in thread From: Ira Weiny @ 2023-03-21 0:29 UTC (permalink / raw) To: Sumitra Sharma, Ira Weiny; +Cc: outreachy, julia.lawall Sumitra Sharma wrote: > On Sun, Mar 12, 2023 at 06:25:21PM -0700, Ira Weiny wrote: > > Sumitra Sharma wrote: > > > More information: > > > > > > Upon running the "dmesg" it shows > > > ## > > > BPF: Invalid name_offset:2154618 > > > [ 2905.429687] failed to validate module [pi433] BTF: -22 > > > ## > > > > Good start. I did some digging. > > > > $ git grep "failed to validate module" > > kernel/bpf/btf.c: pr_warn("failed to validate module [%s] BTF: %ld\n", > > > > > > kernel/bpf/btf.c: > > ... > > if (!IS_ENABLED(CONFIG_MODULE_ALLOW_BTF_MISMATCH)) { > > pr_warn("failed to validate module [%s] BTF: %ld\n", > > mod->name, PTR_ERR(btf)); > > err = PTR_ERR(btf); > > } else { > > ... > > > > > > $ git grep BTF_MISMATCH > > kernel/bpf/btf.c: if (env->btf->base_btf && IS_ENABLED(CONFIG_MODULE_ALLOW_BTF_MISMATCH)) > > kernel/bpf/btf.c: if (env->btf->base_btf && IS_ENABLED(CONFIG_MODULE_ALLOW_BTF_MISMATCH)) > > kernel/bpf/btf.c: if (!IS_ENABLED(CONFIG_MODULE_ALLOW_BTF_MISMATCH)) { > > lib/Kconfig.debug:config MODULE_ALLOW_BTF_MISMATCH > > > > > > lib/Kconfig.debug: > > ... > > config MODULE_ALLOW_BTF_MISMATCH > > bool "Allow loading modules with non-matching BTF type info" > > depends on DEBUG_INFO_BTF_MODULES > > help > > For modules whose split BTF does not match vmlinux, load without > > BTF rather than refusing to load. The default behavior with > > module BTF enabled is to reject modules with such mismatches; > > this option will still load module BTF where possible but ignore > > it when a mismatch is found. > > ... > > > > For more information on BTF: > > > > https://docs.kernel.org/bpf/btf.html > > > > Are you building this module in the same place as the running kernel? It would > > probably be easier to do so. > > > > Ira > > > > Hi Ira, > > What is the solution to this? I don't have a solution, sorry. I'm hypothesising the issue is that the kernel and the module were built with different configurations. So were you building the module with the same configuration? In general it is a lot easier to rebuild and run the kernel from the source you are building from. But that is not strictly necessary. Hence my question. Ira ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <20230311073128.GA11242@ubuntu>]
* Re: Help in loading modules [not found] <20230311073128.GA11242@ubuntu> @ 2023-03-11 8:49 ` Julia Lawall 0 siblings, 0 replies; 7+ messages in thread From: Julia Lawall @ 2023-03-11 8:49 UTC (permalink / raw) To: Sumitra Sharma; +Cc: fmdefrancesco, outreachy On Fri, 10 Mar 2023, Sumitra Sharma wrote: > Hi, > > whenever I am trying to load the modules I am receiving this error. I am unable to rectify it. Kindly suggest me ways. > > ## > sumitra@ubuntu:~/git/kernels/staging$ sudo modprobe pi433 > modprobe: ERROR: could not insert 'pi433': Invalid argument > ## You should CC the mailing list to maximize the chance of getting a useful response. Check whether the module is avaialble on your machine, using lsmod. julia ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-03-21 0:29 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20230311085922.GC11242@ubuntu>
2023-03-11 9:01 ` Help in loading modules Julia Lawall
2023-03-11 10:28 ` Sumitra Sharma
2023-03-11 10:33 ` Julia Lawall
2023-03-13 1:25 ` Ira Weiny
2023-03-19 14:23 ` Sumitra Sharma
2023-03-21 0:29 ` Ira Weiny
[not found] <20230311073128.GA11242@ubuntu>
2023-03-11 8:49 ` Julia Lawall
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.