Messages in this thread | | | Date | Tue, 28 Oct 2014 22:34:35 +0000 | From | One Thousand Gnomes <> | Subject | Re: 32 bit user space compatibility |
| |
On Sun, 26 Oct 2014 12:25:08 +0000 "Skidanov, Alexey" <Alexey.Skidanov@amd.com> wrote:
> Hi, > > Running 32 bit user space needs some work to be done with ioctls. I understand that there are two options to implement: > 1. Use only fixed size types. Pad IOCTLS params to multiple of 64 bits - simple; don't know if it covers all compatibility issues; > 2. 32 bit compatibility layer (through compat_ioctl, just like many drivers in kernel implement) - just a little bit simple code with some translations; really covers all issues; > > Which one is preferred by kernel community?
You shouldn't need to pad paramters in most cases as platform alignment rules are usually sane for 32 and 64bit. #1 is preferred. #2 exists because 64bit appeared after Linux was designed so it wasn't designed in from day one.
| |