Discussion:
[Rtai] Operation not permitted to insert RTAI module
Aref Taidi
2018-09-23 16:22:18 UTC
Permalink
Hello everyone,



I have used RTAI since 2006 but never got the following error message:



"insmod: ERROR: could not insert module /usr/realtime/modules/rtai_hal.ko:
Operation not permitted"



I get the above even as root!



I am using rtai ver 5.1 with hal-linux-4.9.80-x86-4.path for OpenSuse 32-bit
Tumbleweed.



Many thanks in advance for your help.



Aref
Mark Fortescue
2018-09-24 10:20:07 UTC
Permalink
Hi Aref,

SeLinux or equivalent protection systems can prevent module installation
even for root.
This is the most likely cause of your issues.

Also check RTAI and Kernel both compiled with compatible flags ('file
<kernel-module-name>' and 'file /usr/realtime/modules/rtai_hal.ko'
should provide full info).

There are now more variants of x86/x86_64 Kernel because of significant
Intel/Generic scheduling bugs (Meltdown and Spectre). This makes
building with the correct flags more difficult.

Regards
Mark.
Post by Aref Taidi
Hello everyone,
“insmod: ERROR: could not insert module
/usr/realtime/modules/rtai_hal.ko: Operation not permitted”
I get the above even as root!
I am using rtai ver 5.1 with hal-linux-4.9.80-x86-4.path for OpenSuse
32-bit Tumbleweed.
Many thanks in advance for your help.
Aref
_______________________________________________
Rtai mailing list
https://mail.rtai.org/cgi-bin/mailman/listinfo/rtai
Aref Taidi
2018-09-25 17:35:27 UTC
Permalink
Hi Mark,



Many thanks for your reply. I will check these files as recommended.



The question now remains; what have I done wrong, has this been caused by
wrongly configuring and building the vanilla Linux or RTAI?



I will not have access to this machine until end of the week when I will
send the dmesg output hoping that someone will know what's gone wrong!



In the meantime I would be grateful if anyone who has had this problem and
how it was solved or where I should look.



Kind regards,

Aref
Post by Mark Fortescue
Hi Aref,
SeLinux or equivalent protection systems can prevent module installation
even for root.
Post by Mark Fortescue
This is the most likely cause of your issues.
Also check RTAI and Kernel both compiled with compatible flags ('file
<kernel-module-name>' and 'file /usr/realtime/modules/rtai_hal.ko'
There are now more variants of x86/x86_64 Kernel because of significant
Intel/Generic scheduling bugs (Meltdown and Spectre). This makes
building with the correct flags more difficult.
Regards
Mark.
Aref Taidi
2018-09-26 08:53:20 UTC
Permalink
Hi Paolo,

This is what I suspected having done some searches and reading the replies but will check when I access the machine.

Best regards,
Aref
Is not it related to having enabled module versioning in Linux?
Paolo
________________________________________
Sent: Tuesday, September 25, 2018 7:35 PM
Subject: Re: [Rtai] Operation not permitted to insert RTAI module
Hi Mark,
Many thanks for your reply. I will check these files as recommended.
The question now remains; what have I done wrong, has this been caused by wrongly configuring and building the vanilla Linux or RTAI?
I will not have access to this machine until end of the week when I will send the dmesg output hoping that someone will know what’s gone wrong!
In the meantime I would be grateful if anyone who has had this problem and how it was solved or where I should look.
Kind regards,
Aref
Post by Mark Fortescue
Hi Aref,
SeLinux or equivalent protection systems can prevent module installation even for root.
This is the most likely cause of your issues.
Also check RTAI and Kernel both compiled with compatible flags ('file
<kernel-module-name>' and 'file /usr/realtime/modules/rtai_hal.ko'
There are now more variants of x86/x86_64 Kernel because of significant
Intel/Generic scheduling bugs (Meltdown and Spectre). This makes
building with the correct flags more difficult.
Regards
Mark.
Aref Taidi
2018-10-06 12:07:32 UTC
Permalink
Hello Paolo,

I checked the Linux configuration and the versioning is correctly
unselected:

# GCOV-based kernel profiling
#
# CONFIG_GCOV_KERNEL is not set
CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y
CONFIG_HAVE_GENERIC_DMA_COHERENT=y
CONFIG_SLABINFO=y
CONFIG_RT_MUTEXES=y
CONFIG_BASE_SMALL=0
CONFIG_MODULES=y
CONFIG_MODULE_FORCE_LOAD=y
CONFIG_MODULE_UNLOAD=y
# CONFIG_MODULE_FORCE_UNLOAD is not set
# CONFIG_MODVERSIONS is not set
CONFIG_MODULE_SRCVERSION_ALL=y
CONFIG_MODULE_SIG=y
# CONFIG_MODULE_SIG_FORCE is not set
# CONFIG_MODULE_SIG_ALL is not set
# CONFIG_MODULE_SIG_SHA1 is not set
# CONFIG_MODULE_SIG_SHA224 is not set
CONFIG_MODULE_SIG_SHA256=y
# CONFIG_MODULE_SIG_SHA384 is not set
# CONFIG_MODULE_SIG_SHA512 is not set
CONFIG_MODULE_SIG_HASH="sha256"
# CONFIG_MODULE_COMPRESS is not set
CONFIG_MODULES_TREE_LOOKUP=y
CONFIG_BLOCK=y
CONFIG_LBDAF=y
CONFIG_BLK_DEV_BSG=y
CONFIG_BLK_DEV_BSGLIB=y
CONFIG_BLK_DEV_INTEGRITY=y
CONFIG_BLK_DEV_THROTTLING=y
# CONFIG_BLK_CMDLINE_PARSER is not set

Having looked at output of dmesg (attached) I don't know if rtai_hal's
problem is the fact that RTAI is configured with less number of processors -
I always do that! I am getting the following:

[ 254.787007] rtai_hal: loading out-of-tree module taints kernel.
[ 254.787799] RTAI[hal]: RTAI CONFIGURED WITH LESS THAN NUM ONLINE CPUS.
[ 254.904886] latency_rt: Unknown symbol nano2count (err 0)
[ 254.904904] latency_rt: Unknown symbol rt_get_time (err 0)
[ 254.904921] latency_rt: Unknown symbol rt_task_make_periodic (err 0)
[ 254.904935] latency_rt: Unknown symbol rt_set_runnable_on_cpus (err 0)
[ 254.904950] latency_rt: Unknown symbol rt_task_delete (err 0)
[ 254.904964] latency_rt: Unknown symbol rtf_put (err 0)
[ 254.904979] latency_rt: Unknown symbol rtf_destroy (err 0)
[ 254.904995] latency_rt: Unknown symbol rt_linux_use_fpu (err 0)
[ 254.905010] latency_rt: Unknown symbol rtf_create (err 0)
[ 254.905025] latency_rt: Unknown symbol rt_task_init (err 0)
[ 254.905042] latency_rt: Unknown symbol count2nano (err 0)
[ 254.905058] latency_rt: Unknown symbol rt_task_wait_period (err 0)

Best regards,
Aref

-----Original Message-----
From: Paolo Mantegazza [mailto:***@polimi.it]
Sent: 25 September 2018 22:09
To: Aref Taidi; ***@rtai.org
Subject: RE: [Rtai] Operation not permitted to insert RTAI module

Is not it related to having enabled module versioning in Linux?
Paolo
________________________________________
From: Rtai [rtai-***@rtai.org] on behalf of Aref Taidi
[***@newera-computing.com]
Sent: Tuesday, September 25, 2018 7:35 PM
To: ***@rtai.org
Subject: Re: [Rtai] Operation not permitted to insert RTAI module

Hi Mark,

Many thanks for your reply. I will check these files as recommended.

The question now remains; what have I done wrong, has this been caused by
wrongly configuring and building the vanilla Linux or RTAI?

I will not have access to this machine until end of the week when I will
send the dmesg output hoping that someone will know what's gone wrong!

In the meantime I would be grateful if anyone who has had this problem and
how it was solved or where I should look.

Kind regards,
Aref
Post by Mark Fortescue
Hi Aref,
SeLinux or equivalent protection systems can prevent module installation
even for root.
Post by Mark Fortescue
This is the most likely cause of your issues.
Also check RTAI and Kernel both compiled with compatible flags ('file
<kernel-module-name>' and 'file /usr/realtime/modules/rtai_hal.ko'
There are now more variants of x86/x86_64 Kernel because of significant
Intel/Generic scheduling bugs (Meltdown and Spectre). This makes
building with the correct flags more difficult.
Regards
Mark.
Aref Taidi
2018-10-06 13:53:52 UTC
Permalink
Hello Paolo,

I have disabled multicore support from BIO and the problem has gone away.

The problem is that I didn't have to do this in my previous installation of
RTAI on the same machine with the same kernel version and same patch. Any
idea what could have changed and what other problems can be expected?

Many thanks for your help.

Best regards,
Aref

-----Original Message-----
From: Rtai [mailto:rtai-***@rtai.org] On Behalf Of Aref Taidi
Sent: 06 October 2018 13:08
To: 'Paolo Mantegazza'; ***@rtai.org
Subject: Re: [Rtai] Operation not permitted to insert RTAI module

Hello Paolo,

I checked the Linux configuration and the versioning is correctly
unselected:

# GCOV-based kernel profiling
#
# CONFIG_GCOV_KERNEL is not set
CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y
CONFIG_HAVE_GENERIC_DMA_COHERENT=y
CONFIG_SLABINFO=y
CONFIG_RT_MUTEXES=y
CONFIG_BASE_SMALL=0
CONFIG_MODULES=y
CONFIG_MODULE_FORCE_LOAD=y
CONFIG_MODULE_UNLOAD=y
# CONFIG_MODULE_FORCE_UNLOAD is not set
# CONFIG_MODVERSIONS is not set
CONFIG_MODULE_SRCVERSION_ALL=y
CONFIG_MODULE_SIG=y
# CONFIG_MODULE_SIG_FORCE is not set
# CONFIG_MODULE_SIG_ALL is not set
# CONFIG_MODULE_SIG_SHA1 is not set
# CONFIG_MODULE_SIG_SHA224 is not set
CONFIG_MODULE_SIG_SHA256=y
# CONFIG_MODULE_SIG_SHA384 is not set
# CONFIG_MODULE_SIG_SHA512 is not set
CONFIG_MODULE_SIG_HASH="sha256"
# CONFIG_MODULE_COMPRESS is not set
CONFIG_MODULES_TREE_LOOKUP=y
CONFIG_BLOCK=y
CONFIG_LBDAF=y
CONFIG_BLK_DEV_BSG=y
CONFIG_BLK_DEV_BSGLIB=y
CONFIG_BLK_DEV_INTEGRITY=y
CONFIG_BLK_DEV_THROTTLING=y
# CONFIG_BLK_CMDLINE_PARSER is not set

Having looked at output of dmesg (attached) I don't know if rtai_hal's
problem is the fact that RTAI is configured with less number of processors -
I always do that! I am getting the following:

[ 254.787007] rtai_hal: loading out-of-tree module taints kernel.
[ 254.787799] RTAI[hal]: RTAI CONFIGURED WITH LESS THAN NUM ONLINE CPUS.
[ 254.904886] latency_rt: Unknown symbol nano2count (err 0) [ 254.904904]
latency_rt: Unknown symbol rt_get_time (err 0) [ 254.904921] latency_rt:
Unknown symbol rt_task_make_periodic (err 0) [ 254.904935] latency_rt:
Unknown symbol rt_set_runnable_on_cpus (err 0) [ 254.904950] latency_rt:
Unknown symbol rt_task_delete (err 0) [ 254.904964] latency_rt: Unknown
symbol rtf_put (err 0) [ 254.904979] latency_rt: Unknown symbol rtf_destroy
(err 0) [ 254.904995] latency_rt: Unknown symbol rt_linux_use_fpu (err 0) [
254.905010] latency_rt: Unknown symbol rtf_create (err 0) [ 254.905025]
latency_rt: Unknown symbol rt_task_init (err 0) [ 254.905042] latency_rt:
Unknown symbol count2nano (err 0) [ 254.905058] latency_rt: Unknown symbol
rt_task_wait_period (err 0)

Best regards,
Aref

-----Original Message-----
From: Paolo Mantegazza [mailto:***@polimi.it]
Sent: 25 September 2018 22:09
To: Aref Taidi; ***@rtai.org
Subject: RE: [Rtai] Operation not permitted to insert RTAI module

Is not it related to having enabled module versioning in Linux?
Paolo
________________________________________
From: Rtai [rtai-***@rtai.org] on behalf of Aref Taidi
[***@newera-computing.com]
Sent: Tuesday, September 25, 2018 7:35 PM
To: ***@rtai.org
Subject: Re: [Rtai] Operation not permitted to insert RTAI module

Hi Mark,

Many thanks for your reply. I will check these files as recommended.

The question now remains; what have I done wrong, has this been caused by
wrongly configuring and building the vanilla Linux or RTAI?

I will not have access to this machine until end of the week when I will
send the dmesg output hoping that someone will know what's gone wrong!

In the meantime I would be grateful if anyone who has had this problem and
how it was solved or where I should look.

Kind regards,
Aref
Post by Mark Fortescue
Hi Aref,
SeLinux or equivalent protection systems can prevent module
installation
even for root.
Post by Mark Fortescue
This is the most likely cause of your issues.
Also check RTAI and Kernel both compiled with compatible flags ('file
<kernel-module-name>' and 'file /usr/realtime/modules/rtai_hal.ko'
There are now more variants of x86/x86_64 Kernel because of
significant Intel/Generic scheduling bugs (Meltdown and Spectre). This
makes building with the correct flags more difficult.
Regards
Mark.
Loading...