• Ryusuke Konishi's avatar
    nilfs2: use fixed sized types for ioctl structures · dc498d09
    Ryusuke Konishi authored
    Nilfs ioctl had structures not having fixed sized types such as:
    
      struct nilfs_argv {
             void *v_base;
             size_t v_nmembs;
             size_t v_size;
             int v_index;
             int v_flags;
      };
    
    Further, some of them are wrongly aligned:
    
      e.g.
    
      struct nilfs_cpmode {
            __u64 cm_cno;
            int cm_mode;
      };
    
    The size of wrongly aligned structures varies depending on
    architectures, and it breaks the identity of ioctl commands, which
    leads to arch dependent errors.
    
    Previously, these are compensated by using compat_ioctl.
    
    This fixes these problems and allows removal of compat ioctl.
    
    Since this will change sizes of those structures, binary compatibility
    for the past utilities will once break; new utilities have to be used
    instead.  However, it would be helpful to avoid platform dependent
    problems in the long term.
    Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    dc498d09
ioctl.c 22.6 KB