• Arnd Bergmann's avatar
    y2038: mips: Extend sysvipc data structures · 3f3a4b3f
    Arnd Bergmann authored
    MIPS is the weirdest case for sysvipc, because each of the
    three data structures is done differently:
    
    * msqid64_ds has padding in the right place so we could in theory
      extend this one to just have 64-bit values instead of time_t.
      As this does not work for most of the other combinations,
      we just handle it in the common manner though.
    
    * semid64_ds has no padding for 64-bit time_t, but has two reserved
      'long' fields, which are sufficient to extend the sem_otime
      and sem_ctime fields to 64 bit. In order to do this, the libc
      implementation will have to copy the data into another structure
      that has the fields in a different order. MIPS is the only
      architecture with this problem, so this is best done in MIPS
      specific libc code.
    
    * shmid64_ds is slightly worse than that, because it has three
      time_t fields but only two unused 32-bit words. As a workaround,
      we extend each field only by 16 bits, ending up with 48-bit
      timestamps that user space again has to work around by itself.
    
    The compat versions of the data structures are changed in the
    same way.
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    3f3a4b3f
shmbuf.h 1.85 KB