Xenomai 3: comapt issues with RTDM
Hi Philippe,
just a heads up, I'll try to address this later:
I received a report that include/rtdm/uapi/rtdm.h contains some data structures that are used between the kernel and the userspace library (so not directly by applications) and are not compatible with 32-on-64-bit (compat) scenarios. We should probably promote anything that is longer on 64-bit to that size, unconditionally. As this affects the ABI, it should be fixed before 3.0 release, ideally.
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT RTC ITP SES-DE Corporate Competence Center Embedded Linux
Quoted 11 lines · Jan Kiszka
Hi Philippe,
just a heads up, I'll try to address this later:
I received a report that
include/rtdm/uapi/rtdm.hcontains some data structures that are used between the kernel and the userspace library (so not directly by applications) and are not compatible with 32-on-64-bit (compat) scenarios. We should probably promote anything that is longer on 64-bit to that size, unconditionally. As this affects the ABI, it should be fixed before 3.0 release, ideally.
That would require to fix up the client drivers (setsockopt, getsockopt typically). Ok, I'll have a look when I'm done with testing the blackfin port.
Signature · 1 line
Philippe.
Quoted 13 lines · Philippe Gerum
Quoted 11 lines · Jan Kiszka
Hi Philippe,
just a heads up, I'll try to address this later:
I received a report that
include/rtdm/uapi/rtdm.hcontains some data structures that are used between the kernel and the userspace library (so not directly by applications) and are not compatible with 32-on-64-bit (compat) scenarios. We should probably promote anything that is longer on 64-bit to that size, unconditionally. As this affects the ABI, it should be fixed before 3.0 release, ideally.
Quoted 3 lines
That would require to fix up the client drivers (setsockopt, getsockopt typically). Ok, I'll have a look when I'm done with testing the blackfin port.
Indeed. Just realized that there are already compat structs for the socket stuff. However, and that was what our user stumbled over, there is none for _rtdm_mmap_request. But that should be really internal, right?
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT RTC ITP SES-DE Corporate Competence Center Embedded Linux
Quoted 14 lines · Jan Kiszka
Quoted 13 lines · Philippe Gerum
Quoted 11 lines · Jan Kiszka
Hi Philippe,
just a heads up, I'll try to address this later:
I received a report that
include/rtdm/uapi/rtdm.hcontains some data structures that are used between the kernel and the userspace library (so not directly by applications) and are not compatible with 32-on-64-bit (compat) scenarios. We should probably promote anything that is longer on 64-bit to that size, unconditionally. As this affects the ABI, it should be fixed before 3.0 release, ideally.
Quoted 6 lines
Quoted 3 lines
That would require to fix up the client drivers (setsockopt, getsockopt typically). Ok, I'll have a look when I'm done with testing the blackfin port.
Indeed. Just realized that there are already compat structs for the socket stuff.
Yes, used by the RTIPC support which has been ported already.
Quoted 3 lines
However, and that was what our user stumbled over, there
is none for_rtdm_mmap_request. But that should be really internal, right?
Yes, we'd only need some thunk between lib/cobalt and COBALT_SYSCALL(mmap) for this type.
Signature · 1 line
Philippe.
Quoted 14 lines · Jan Kiszka
Quoted 13 lines · Philippe Gerum
Quoted 11 lines · Jan Kiszka
Hi Philippe,
just a heads up, I'll try to address this later:
I received a report that
include/rtdm/uapi/rtdm.hcontains some data structures that are used between the kernel and the userspace library (so not directly by applications) and are not compatible with 32-on-64-bit (compat) scenarios. We should probably promote anything that is longer on 64-bit to that size, unconditionally. As this affects the ABI, it should be fixed before 3.0 release, ideally.
Quoted 8 lines
Quoted 3 lines
That would require to fix up the client drivers (setsockopt, getsockopt typically). Ok, I'll have a look when I'm done with testing the blackfin port.
Indeed. Just realized that there are already compat structs for the socket stuff. However, and that was what our user stumbled over, there is none for
_rtdm_mmap_request. But that should be really internal, right?
mmap() has the compat thunk for 32<->64 bit conversion already, so this is ok.
Signature · 1 line
Philippe.
Quoted 19 lines · Philippe Gerum
Quoted 18 lines · Jan Kiszka
Quoted 16 lines · Philippe Gerum
Quoted 11 lines · Jan Kiszka
Hi Philippe,
just a heads up, I'll try to address this later:
I received a report that
include/rtdm/uapi/rtdm.hcontains some data structures that are used between the kernel and the userspace library (so not directly by applications) and are not compatible with 32-on-64-bit (compat) scenarios. We should probably promote anything that is longer on 64-bit to that size, unconditionally. As this affects the ABI, it should be fixed before 3.0 release, ideally.That would require to fix up the client drivers (setsockopt, getsockopt typically). Ok, I'll have a look when I'm done with testing the blackfin port.
Quoted 7 lines
Quoted 4 lines
Indeed. Just realized that there are already compat structs for the socket stuff. However, and that was what our user stumbled over, there is none for
_rtdm_mmap_request. But that should be really internal, right?
mmap()has the compat thunk for 32<->64 bit conversion already, so this is ok.
Ok... Rechecking the bug report here, the issue is rather the case that off_t becomes 64 bit when defining -D_FILE_OFFSET_BITS=64 for your userland. We are apparently required to account for that case as well.
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT RTC ITP SES-DE Corporate Competence Center Embedded Linux
Quoted 25 lines · Jan Kiszka
Quoted 24 lines · Philippe Gerum
Quoted 22 lines · Jan Kiszka
Quoted 13 lines · Philippe Gerum
Quoted 11 lines · Jan Kiszka
Hi Philippe,
just a heads up, I'll try to address this later:
I received a report that
include/rtdm/uapi/rtdm.hcontains some data structures that are used between the kernel and the userspace library (so not directly by applications) and are not compatible with 32-on-64-bit (compat) scenarios. We should probably promote anything that is longer on 64-bit to that size, unconditionally. As this affects the ABI, it should be fixed before 3.0 release, ideally.Quoted 3 lines
That would require to fix up the client drivers (setsockopt, getsockopt typically). Ok, I'll have a look when I'm done with testing the blackfin port.
Indeed. Just realized that there are already compat structs for the socket stuff. However, and that was what our user stumbled over, there is none for
_rtdm_mmap_request. But that should be really internal, right?
Quoted 7 lines
Quoted 2 lines
mmap()has the compat thunk for 32<->64 bit conversion already, so this is ok.Ok... Rechecking the bug report here, the issue is rather the case that
off_tbecomes 64 bit when defining -D_FILE_OFFSET_BITS=64 for your userland. We are apparently required to account for that case as well.
Ok, so let's move the offset member to loff_t and compat_loff_t in the mmap request descriptors, that should do the trick.
Signature · 1 line
Philippe.
Quoted 29 lines · Philippe Gerum
Quoted 28 lines · Jan Kiszka
Quoted 26 lines · Philippe Gerum
Quoted 14 lines · Jan Kiszka
Quoted 13 lines · Philippe Gerum
Quoted 11 lines · Jan Kiszka
Hi Philippe,
just a heads up, I'll try to address this later:
I received a report that
include/rtdm/uapi/rtdm.hcontains some data structures that are used between the kernel and the userspace library (so not directly by applications) and are not compatible with 32-on-64-bit (compat) scenarios. We should probably promote anything that is longer on 64-bit to that size, unconditionally. As this affects the ABI, it should be fixed before 3.0 release, ideally.Quoted 8 lines
Quoted 3 lines
That would require to fix up the client drivers (setsockopt, getsockopt typically). Ok, I'll have a look when I'm done with testing the blackfin port.
Indeed. Just realized that there are already compat structs for the socket stuff. However, and that was what our user stumbled over, there is none for
_rtdm_mmap_request. But that should be really internal, right?
mmap()has the compat thunk for 32<->64 bit conversion already, so this is ok.
Quoted 8 lines
Quoted 4 lines
Ok... Rechecking the bug report here, the issue is rather the case that
off_tbecomes 64 bit when defining -D_FILE_OFFSET_BITS=64 for your userland. We are apparently required to account for that case as well.Ok, so let's move the offset member to
loff_tandcompat_loff_tin the mmap request descriptors, that should do the trick.
I only forwarded this suggestion internally, unfortunately cannot tell yet how it was implemented, just received the early feedback that it is not yet working. Maybe we are overseeing something, maybe something went wrong with the implementation. Will be checked tomorrow.
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT RTC ITP SES-DE Corporate Competence Center Embedded Linux
Quoted 35 lines · Jan Kiszka
Quoted 34 lines · Philippe Gerum
Quoted 32 lines · Jan Kiszka
Quoted 19 lines · Philippe Gerum
Quoted 18 lines · Jan Kiszka
Quoted 16 lines · Philippe Gerum
Quoted 11 lines · Jan Kiszka
Hi Philippe,
just a heads up, I'll try to address this later:
I received a report that
include/rtdm/uapi/rtdm.hcontains some data structures that are used between the kernel and the userspace library (so not directly by applications) and are not compatible with 32-on-64-bit (compat) scenarios. We should probably promote anything that is longer on 64-bit to that size, unconditionally. As this affects the ABI, it should be fixed before 3.0 release, ideally.That would require to fix up the client drivers (setsockopt, getsockopt typically). Ok, I'll have a look when I'm done with testing the blackfin port.
Quoted 7 lines
Quoted 4 lines
Indeed. Just realized that there are already compat structs for the socket stuff. However, and that was what our user stumbled over, there is none for
_rtdm_mmap_request. But that should be really internal, right?
mmap()has the compat thunk for 32<->64 bit conversion already, so this is ok.Ok... Rechecking the bug report here, the issue is rather the case that
off_tbecomes 64 bit when defining -D_FILE_OFFSET_BITS=64 for your userland. We are apparently required to account for that case as well.
Quoted 9 lines
Quoted 3 lines
Ok, so let's move the offset member to
loff_tandcompat_loff_tin the mmap request descriptors, that should do the trick.I only forwarded this suggestion internally, unfortunately cannot tell yet how it was implemented, just received the early feedback that it is not yet working. Maybe we are overseeing something, maybe something went wrong with the implementation. Will be checked tomorrow.
This is likely an issue with the native alignment of those types, the kernel may offset long members in the compat struct based on different constraints than -m32 does.
Signature · 1 line
Philippe.
Quoted 46 lines · Philippe Gerum
Quoted 35 lines · Jan Kiszka
Quoted 34 lines · Philippe Gerum
Quoted 32 lines · Jan Kiszka
Quoted 19 lines · Philippe Gerum
Quoted 18 lines · Jan Kiszka
Quoted 16 lines · Philippe Gerum
Quoted 11 lines · Jan Kiszka
Hi Philippe,
just a heads up, I'll try to address this later:
I received a report that
include/rtdm/uapi/rtdm.hcontains some data structures that are used between the kernel and the userspace library (so not directly by applications) and are not compatible with 32-on-64-bit (compat) scenarios. We should probably promote anything that is longer on 64-bit to that size, unconditionally. As this affects the ABI, it should be fixed before 3.0 release, ideally.That would require to fix up the client drivers (setsockopt, getsockopt typically). Ok, I'll have a look when I'm done with testing the blackfin port.
Quoted 7 lines
Quoted 4 lines
Indeed. Just realized that there are already compat structs for the socket stuff. However, and that was what our user stumbled over, there is none for
_rtdm_mmap_request. But that should be really internal, right?
mmap()has the compat thunk for 32<->64 bit conversion already, so this is ok.Ok... Rechecking the bug report here, the issue is rather the case that
off_tbecomes 64 bit when defining -D_FILE_OFFSET_BITS=64 for your userland. We are apparently required to account for that case as well.Quoted 9 lines
Quoted 3 lines
Ok, so let's move the offset member to
loff_tandcompat_loff_tin the mmap request descriptors, that should do the trick.I only forwarded this suggestion internally, unfortunately cannot tell yet how it was implemented, just received the early feedback that it is not yet working. Maybe we are overseeing something, maybe something went wrong with the implementation. Will be checked tomorrow.
Quoted 4 lines
This is likely an issue with the native alignment of those types, the kernel may offset long members in the compat struct based on different constraints than -m32 does.
And we probably also need the mmap64 wrapper we don't have yet. Ok, I'm working on this.
Signature · 1 line
Philippe.
Quoted 47 lines · Philippe Gerum
Quoted 46 lines · Philippe Gerum
Quoted 44 lines · Jan Kiszka
Quoted 29 lines · Philippe Gerum
Quoted 28 lines · Jan Kiszka
Quoted 26 lines · Philippe Gerum
Quoted 14 lines · Jan Kiszka
Quoted 13 lines · Philippe Gerum
Quoted 11 lines · Jan Kiszka
Hi Philippe,
just a heads up, I'll try to address this later:
I received a report that
include/rtdm/uapi/rtdm.hcontains some data structures that are used between the kernel and the userspace library (so not directly by applications) and are not compatible with 32-on-64-bit (compat) scenarios. We should probably promote anything that is longer on 64-bit to that size, unconditionally. As this affects the ABI, it should be fixed before 3.0 release, ideally.Quoted 8 lines
Quoted 3 lines
That would require to fix up the client drivers (setsockopt, getsockopt typically). Ok, I'll have a look when I'm done with testing the blackfin port.
Indeed. Just realized that there are already compat structs for the socket stuff. However, and that was what our user stumbled over, there is none for
_rtdm_mmap_request. But that should be really internal, right?
mmap()has the compat thunk for 32<->64 bit conversion already, so this is ok.Quoted 8 lines
Quoted 4 lines
Ok... Rechecking the bug report here, the issue is rather the case that
off_tbecomes 64 bit when defining -D_FILE_OFFSET_BITS=64 for your userland. We are apparently required to account for that case as well.Ok, so let's move the offset member to
loff_tandcompat_loff_tin the mmap request descriptors, that should do the trick.I only forwarded this suggestion internally, unfortunately cannot tell yet how it was implemented, just received the early feedback that it is not yet working. Maybe we are overseeing something, maybe something went wrong with the implementation. Will be checked tomorrow.
Quoted 8 lines
Quoted 4 lines
This is likely an issue with the native alignment of those types, the kernel may offset long members in the compat struct based on different constraints than -m32 does.
And we probably also need the mmap64 wrapper we don't have yet. Ok, I'm working on this.
Pushed to -next, and tested over 32 and 3264 ABI models over x86. This breaks the ABI, so both kernel and userland have to be rebuilt. The bad news is that I now have to redo all the testing on all other archs. Oh well, ...
Signature · 1 line
Philippe.
Quoted 4 lines · Philippe Gerum
Pushed to -next, and tested over 32 and 3264 ABI models over x86. This breaks the ABI, so both kernel and userland have to be rebuilt. The bad news is that I now have to redo all the testing on all other archs. Oh well, ...
Was tested here (except for the new *64 calls) and works well, thanks!
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT RTC ITP SES-DE Corporate Competence Center Embedded Linux