• Andi Kleen's avatar
    [PATCH] Some fixes for compat ioctl · dc539241
    Andi Kleen authored
    While doing some compat_ioctl conversions I noticed a few issues in
    compat_sys_ioctl:
    
    - It is not completely compatible to old ->ioctl because the traditional
      common ioctls are not checked before it.  I added a check for those.  The
      main advantage is that the handler now works the same as a traditional
      handler even when it returns -EINVAL
    
    - The private socket ioctl check should only apply for sockets.
    
    - There was a security hook missing.  Drawback is that it uses the same
      hook now, and the LSM module cannot distingush between 32bit and 64bit
      clients.  But it'll have to live with that for now.
    Signed-off-by: default avatarAndi Kleen <ak@muc.de>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    dc539241
ioctl.c 3.6 KB