References: <55AE3AAB.5070403@siemens.com> <55AE4068.5050102@xenomai.org> <55AE5D0B.60300@siemens.com> <55B0A89B.5020004@xenomai.org> <55B0AEFE.5080202@siemens.com> From: Philippe Gerum Message-ID: <55B0B268.7020209@xenomai.org> Date: Thu, 23 Jul 2015 11:22:48 +0200 MIME-Version: 1.0 In-Reply-To: <55B0AEFE.5080202@siemens.com> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Xenomai] Xenomai 3: comapt issues with RTDM List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: Xenomai On 07/23/2015 11:08 AM, Jan Kiszka wrote: > On 2015-07-23 10:40, Philippe Gerum wrote: >> On 07/21/2015 04:54 PM, Jan Kiszka wrote: >>> On 2015-07-21 14:51, Philippe Gerum wrote: >>>> On 07/21/2015 02:27 PM, Jan Kiszka wrote: >>>>> 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. >>>>> >>>> >>>> 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. > > 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. > 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. -- Philippe.