rthal_strncpy_from_user bug
Hi,
I'm trapped between 2.6.x and 3.x versions. The question to not boring you is that I'm having a lot of problems with this soft 3.x so I try to go back again to 2.6.
However, I need to use a modern hardware (new development) and 2.6 have some issues especially rtnet that doesn't work without some patch with kernels greater than 3.17 (or at least I'm not able to).
After solving some other issues my tests fails with some ugly message (killed!!!!)
[ 5761.024502] RIP [<ffffffff8143079d>] rthal_strncpy_from_user+0xd/0x20 [ 5761.027017] RSP <ffff88045a493e20> [ 5761.029456] CR2: 000000000040445d [ 5761.031859] ---[ end trace f092b4db2a9a9654 ]--- [ 5773.810428] BUG: unable to handle kernel paging request at 000000000040445d [ 5773.812909] IP: [<ffffffff8143079d>] rthal_strncpy_from_user+0xd/0x20 [ 5773.815389] PGD 45a00c067 PUD 456d4e067 PMD 45aa42067 PTE 4517f5025 [ 5773.817864] Oops: 0001 [#16] SMP [ 5773.820293] Modules linked in: rt_igb(O) rt_e1000e(O) rt_loopback(O)
rtcfg(O) rtudp(O) rtipv4(O) rtmac(O) rtpacket(O) rtnet(O) ctr ccm binfmt_misc nfsd auth_rpcgss nfs_acl nfs lockd fscache sunrpc nls_utf8 nls_cp437 vfat fat xeno_can_peak_pci xeno_can_sja1000 xeno_can x86_pkg_temp_thermal coretemp kvm_intel kvm peak_pci sja1000 joydev crc32_pclmul hid_generic usbhid ghash_clmulni_intel aesni_intel ppdev aes_x86_64 lrw can_dev gf128mul glue_helper xeno_rtdm snd_pcm snd_timer ablk_help
looking on the web, I have found that his issue was solved:
However, although it was on December 2015, 2.6.5 (July 2016) doesn't have it.
So, there's any reason why this patch was not pushed to 2.6.5?
Best regards,
Leopold
Signature · 15 lines
-- Linux User 152692 GPG: 05F4A7A949A2D9AA Catalonia ------------------------------------- A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: This is a digitally signed message part. URL: <http://xenomai.org/pipermail/xenomai/attachments/20160928/1f73e67e/attachment.sig>
Am Wed, 28 Sep 2016 13:12:12 +0200
schrieb Leopold Palomo-Avellaneda <[email protected]>:
Quoted 32 lines
Hi,
I'm trapped between 2.6.x and 3.x versions. The question to not boring you is that I'm having a lot of problems with this soft 3.x so I try to go back again to 2.6.
However, I need to use a modern hardware (new development) and 2.6 have some issues especially rtnet that doesn't work without some patch with kernels greater than 3.17 (or at least I'm not able to).
After solving some other issues my tests fails with some ugly message (killed!!!!)
[ 5761.024502] RIP [<ffffffff8143079d>] rthal_strncpy_from_user+0xd/0x20 [ 5761.027017] RSP <ffff88045a493e20> [ 5761.029456] CR2: 000000000040445d [ 5761.031859] ---[ end trace f092b4db2a9a9654 ]--- [ 5773.810428] BUG: unable to handle kernel paging request at
000000000040445d[ 5773.812909] IP: [<ffffffff8143079d>]rthal_strncpy_from_user+0xd/0x20[ 5773.815389] PGD45a00c067PUD456d4e067PMD45aa42067PTE4517f5025[ 5773.817864] Oops: 0001 [#16] SMP [ 5773.820293] Modules linked in:rt_igb(O)rt_e1000e(O)rt_loopback(O)rtcfg(O) rtudp(O) rtipv4(O) rtmac(O) rtpacket(O) rtnet(O) ctr ccmbinfmt_miscnfsdauth_rpcgssnfs_aclnfs lockd fscache sunrpcnls_utf8nls_cp437vfat fatxeno_can_peak_pcixeno_can_sja1000xeno_canx86_pkg_temp_thermalcoretempkvm_intelkvmpeak_pcisja1000 joydevcrc32_pclmulhid_genericusbhidghash_clmulni_intelaesni_intelppdevaes_x86_64lrwcan_devgf128mulglue_helperxeno_rtdmsnd_pcmsnd_timerablk_help
Quoted 8 lines
looking on the web, I have found that his issue was solved:
However, although it was on December 2015, 2.6.5 (July 2016) doesn't have it.
So, there's any reason why this patch was not pushed to 2.6.5?
I guess the reason is that 2.6 is not officially maintained anymore, so patches like this one do not get backported. You should see if you can switch to 3.0 and solve your issues there!
If that really is not an option, this particular problem can be addressed by disabling CONFIG_SMAP in your kernel. Or you could port the patch back to 2.6. If you do that post it here, might get accepted after all.
Henning
El Dijous, 29 de setembre de 2016, a les 12:49:18, Henning Schild va escriure:
Quoted 40 lines
Am Wed, 28 Sep 2016 13:12:12 +0200
schrieb Leopold Palomo-Avellaneda <[email protected]>:
Quoted 37 lines
Hi,
I'm trapped between 2.6.x and 3.x versions. The question to not boring you is that I'm having a lot of problems with this soft 3.x so I try to go back again to 2.6.
However, I need to use a modern hardware (new development) and 2.6 have some issues especially rtnet that doesn't work without some patch with kernels greater than 3.17 (or at least I'm not able to).
After solving some other issues my tests fails with some ugly message (killed!!!!)
[ 5761.024502] RIP [<ffffffff8143079d>] rthal_strncpy_from_user+0xd/0x20 [ 5761.027017] RSP <ffff88045a493e20> [ 5761.029456] CR2: 000000000040445d [ 5761.031859] ---[ end trace f092b4db2a9a9654 ]--- [ 5773.810428] BUG: unable to handle kernel paging request at
000000000040445d[ 5773.812909] IP: [<ffffffff8143079d>]rthal_strncpy_from_user+0xd/0x20[ 5773.815389] PGD45a00c067PUD456d4e067PMD45aa42067PTE4517f5025[ 5773.817864] Oops: 0001 [#16] SMP [ 5773.820293] Modules linked in:rt_igb(O)rt_e1000e(O)rt_loopback(O)rtcfg(O) rtudp(O) rtipv4(O) rtmac(O) rtpacket(O) rtnet(O) ctr ccmbinfmt_miscnfsdauth_rpcgssnfs_aclnfs lockd fscache sunrpcnls_utf8nls_cp437vfat fatxeno_can_peak_pcixeno_can_sja1000xeno_canx86_pkg_temp_thermalcoretempkvm_intelkvmpeak_pcisja1000 joydevcrc32_pclmulhid_genericusbhidghash_clmulni_intelaesni_intelppdevaes_x86_64lrwcan_devgf128mulglue_helperxeno_rtdmsnd_pcmsnd_timerablk_helplooking on the web, I have found that his issue was solved:
http://git.xenomai.org/xenomai-jki.git/commit/?h=maintenance-2.6&id=2eceef
4c62bc8d6b3713787c26882fdcd9b87842
Quoted 8 lines
Quoted 4 lines
However, although it was on December 2015, 2.6.5 (July 2016) doesn't have it.
So, there's any reason why this patch was not pushed to 2.6.5?
I guess the reason is that 2.6 is not officially maintained anymore, so patches like this one do not get backported. You should see if you can switch to 3.0 and solve your issues there!
the patch is in the maintenance 2.6 branch. However, I don't know from where was generated the tar.gz released as 2.6.5. Not need to backport anything because is there.
Probably I should switch to 3.0. But then I should redo the debian part because is not in a good shape.
Quoted 2 lines
If that really is not an option, this particular problem can be addressed by disabling
CONFIG_SMAPin your kernel.
good catch.
Leopold
Signature · 8 lines
-- Linux User 152692 GPG: 05F4A7A949A2D9AA Catalonia ------------------------------------- A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail?
El Dijous, 29 de setembre de 2016, a les 13:04:48, Leopold Palomo-Avellaneda va escriure:
Quoted 1 line
El Dijous, 29 de setembre de 2016, a les 12:49:18, Henning Schild va
escriure:
Quoted 50 lines
Quoted 41 lines
Am Wed, 28 Sep 2016 13:12:12 +0200
schrieb Leopold Palomo-Avellaneda <[email protected]>:
Quoted 38 lines
Hi,
I'm trapped between 2.6.x and 3.x versions. The question to not boring you is that I'm having a lot of problems with this soft 3.x so I try to go back again to 2.6.
However, I need to use a modern hardware (new development) and 2.6 have some issues especially rtnet that doesn't work without some patch with kernels greater than 3.17 (or at least I'm not able to).
After solving some other issues my tests fails with some ugly message (killed!!!!)
[ 5761.024502] RIP [<ffffffff8143079d>] rthal_strncpy_from_user+0xd/0x20 [ 5761.027017] RSP <ffff88045a493e20> [ 5761.029456] CR2: 000000000040445d [ 5761.031859] ---[ end trace f092b4db2a9a9654 ]--- [ 5773.810428] BUG: unable to handle kernel paging request at
000000000040445d[ 5773.812909] IP: [<ffffffff8143079d>]rthal_strncpy_from_user+0xd/0x20[ 5773.815389] PGD45a00c067PUD456d4e067PMD45aa42067PTE4517f5025[ 5773.817864] Oops: 0001 [#16] SMP [ 5773.820293] Modules linked in:rt_igb(O)rt_e1000e(O)rt_loopback(O)rtcfg(O) rtudp(O) rtipv4(O) rtmac(O) rtpacket(O) rtnet(O) ctr ccmbinfmt_miscnfsdauth_rpcgssnfs_aclnfs lockd fscache sunrpcnls_utf8nls_cp437vfat fatxeno_can_peak_pcixeno_can_sja1000xeno_canx86_pkg_temp_thermalcoretempkvm_intelkvmpeak_pcisja1000 joydevcrc32_pclmulhid_genericusbhidghash_clmulni_intelaesni_intelppdevaes_x86_64lrwcan_devgf128mulglue_helperxeno_rtdmsnd_pcmsnd_timerablk_helplooking on the web, I have found that his issue was solved:
http://git.xenomai.org/xenomai-jki.git/commit/?h=maintenance-2.6&id=2ece
ef4c62bc8d6b3713787c26882fdcd9b87842Quoted 8 lines
Quoted 4 lines
However, although it was on December 2015, 2.6.5 (July 2016) doesn't have it.
So, there's any reason why this patch was not pushed to 2.6.5?
I guess the reason is that 2.6 is not officially maintained anymore, so patches like this one do not get backported. You should see if you can switch to 3.0 and solve your issues there!
Quoted 7 lines
the patch is in the maintenance 2.6 branch. However, I don't know from where was generated the tar.gz released as 2.6.5. Not need to backport anything because is there.
Probably I should switch to 3.0. But then I should redo the debian part because is not in a good shape.
I correct myself. I was all the time looking the Jan Kiszka git, not the 2.6.x.
Sorry, for the noise.
Leopold
Signature · 8 lines
-- Linux User 152692 GPG: 05F4A7A949A2D9AA Catalonia ------------------------------------- A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail?
I can confirm that this is not fixed in Xenomai 2.6.5. (I too am on that branch because of legacy code). I found that certain I5 processors generate the memory exception during cpy_from_user() calls, and certain I5 processors don't. I successfully worked around the problem, as Henning Schild explains, by disabling CONFIG_SMAP in the kernel config. I am on kernel 3.18.20 and in order to reveal that setting in 'make menuconfig' in the processor features - you'll need to first enable 'kernel debugging' and also choose 'Embedded' as well.
-C Smith
Quoted 61 lines · Henning Schild
Am Wed, 28 Sep 2016 13:12:12 +0200
schrieb Leopold Palomo-Avellaneda <[email protected]>:Quoted 32 lines
Hi,
I'm trapped between 2.6.x and 3.x versions. The question to not boring you is that I'm having a lot of problems with this soft 3.x so I try to go back again to 2.6.
However, I need to use a modern hardware (new development) and 2.6 have some issues especially rtnet that doesn't work without some patch with kernels greater than 3.17 (or at least I'm not able to).
After solving some other issues my tests fails with some ugly message (killed!!!!)
[ 5761.024502] RIP [<ffffffff8143079d>] rthal_strncpy_from_user+0xd/0x20 [ 5761.027017] RSP <ffff88045a493e20> [ 5761.029456] CR2: 000000000040445d [ 5761.031859] ---[ end trace f092b4db2a9a9654 ]--- [ 5773.810428] BUG: unable to handle kernel paging request at
000000000040445d[ 5773.812909] IP: [<ffffffff8143079d>]rthal_strncpy_from_user+0xd/0x20[ 5773.815389] PGD45a00c067PUD456d4e067PMD45aa42067PTE4517f5025[ 5773.817864] Oops: 0001 [#16] SMP [ 5773.820293] Modules linked in:rt_igb(O)rt_e1000e(O)rt_loopback(O)rtcfg(O) rtudp(O) rtipv4(O) rtmac(O) rtpacket(O) rtnet(O) ctr ccmbinfmt_miscnfsdauth_rpcgssnfs_aclnfs lockd fscache sunrpcnls_utf8nls_cp437vfat fatxeno_can_peak_pcixeno_can_sja1000xeno_canx86_pkg_temp_thermalcoretempkvm_intelkvmpeak_pcisja1000 joydevcrc32_pclmulhid_genericusbhidghash_clmulni_intelaesni_intelppdevaes_x86_64lrwcan_devgf128mulglue_helperxeno_rtdmsnd_pcmsnd_timerablk_helpQuoted 3 lines
looking on the web, I have found that his issue was solved:
Quoted 5 lines
However, although it was on December 2015, 2.6.5 (July 2016) doesn't have it.
So, there's any reason why this patch was not pushed to 2.6.5?
I guess the reason is that 2.6 is not officially maintained anymore, so patches like this one do not get backported. You should see if you can switch to 3.0 and solve your issues there!
If that really is not an option, this particular problem can be addressed by disabling
CONFIG_SMAPin your kernel. Or you could port the patch back to 2.6. If you do that post it here, might get accepted after all.Henning
_______________________________________________
Xenomai mailing list
[email protected]
https://xenomai.org/mailman/listinfo/xenomai