[Bugme-new] [Bug 11320] New: ABI incompatibility: EINVAL when calling ioctl(, EVIOCSFF) from 32-bit program on 64-bit kernel

bugme-daemon at bugzilla.kernel.org bugme-daemon at bugzilla.kernel.org
Wed Aug 13 10:22:55 PDT 2008


http://bugzilla.kernel.org/show_bug.cgi?id=11320

           Summary: ABI incompatibility: EINVAL when calling ioctl(,
                    EVIOCSFF) from 32-bit program on 64-bit kernel
           Product: Drivers
           Version: 2.5
     KernelVersion: 2.6.25.11-0.1-default
          Platform: All
        OS/Version: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: Input Devices
        AssignedTo: drivers_input-devices at kernel-bugs.osdl.org
        ReportedBy: vitaliy at kievinfo.com


Problem Description:
When making a ioctl(fd, EVIOCSFF) call from 32-bit program running on 64-bit
arch I'm always receiving EINVAL. Further investigation lead to the cause:

Definition of the EVIOCSFF uses sizeof(struct ff_effect) which differs between
32-bit and 64-bit. 64-bit kernel does not recognize EVIOCSFF thus returning
EINVAL.

Steps to reproduce:

A simple test program:

#include <linux/input.h>
#include <stdio.h>
int main(int argc, char * argv[])
{
     printf("sizeof(struct ff_effect) = %d EVIOCSFF=%#x\n", sizeof(struct
ff_effect), EVIOCSFF);

     return 0;
}

$ gcc test_size.c -o test_size && ./test_size
sizeof(struct ff_effect) = 48 EVIOCSFF=0x40304580
$ gcc -m32 test_size.c -o test_size32 && ./test_size32
sizeof(struct ff_effect) = 44 EVIOCSFF=0x402c4580


-- 
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


More information about the Bugme-new mailing list