]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
y2038: mips: Extend sysvipc data structures
authorArnd Bergmann <arnd@arndb.de>
Tue, 5 May 2015 20:53:12 +0000 (22:53 +0200)
committerArnd Bergmann <arnd@arndb.de>
Fri, 20 Apr 2018 14:20:04 +0000 (16:20 +0200)
commit3f3a4b3fbf2f2bede531b0c9a3ba2baed87cf420
treeb52accbaa5f0b35a1ba0ec50cbfca88524e47892
parent83335eb4f66038591ec2e9357368e2ee07b20197
y2038: mips: Extend sysvipc data structures

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: Arnd Bergmann <arnd@arndb.de>
arch/mips/include/asm/compat.h
arch/mips/include/uapi/asm/msgbuf.h
arch/mips/include/uapi/asm/sembuf.h
arch/mips/include/uapi/asm/shmbuf.h