mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-15 00:54:03 +08:00
y2038: powerpc: Extend sysvipc data structures
powerpc, uses a nonstandard variation of the generic sysvipc data structures, intended to have the padding moved around so it can deal with big-endian 32-bit user space that has 64-bit time_t. powerpc has the same definition as parisc and sparc, but now also supports little-endian mode, which is now wrong because the padding is made for big-endian user space. This takes just take the same approach here that we have for the asm-generic headers and adds separate 32-bit fields for the upper halves of the timestamps, to let libc deal with the mess in user space. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
parent
91b9b0d718
commit
d0b67de998
@ -162,10 +162,10 @@ struct compat_ipc64_perm {
|
|||||||
|
|
||||||
struct compat_semid64_ds {
|
struct compat_semid64_ds {
|
||||||
struct compat_ipc64_perm sem_perm;
|
struct compat_ipc64_perm sem_perm;
|
||||||
unsigned int __unused1;
|
unsigned int sem_otime_high;
|
||||||
compat_time_t sem_otime;
|
unsigned int sem_otime;
|
||||||
unsigned int __unused2;
|
unsigned int sem_ctime_high;
|
||||||
compat_time_t sem_ctime;
|
unsigned int sem_ctime;
|
||||||
compat_ulong_t sem_nsems;
|
compat_ulong_t sem_nsems;
|
||||||
compat_ulong_t __unused3;
|
compat_ulong_t __unused3;
|
||||||
compat_ulong_t __unused4;
|
compat_ulong_t __unused4;
|
||||||
@ -173,12 +173,12 @@ struct compat_semid64_ds {
|
|||||||
|
|
||||||
struct compat_msqid64_ds {
|
struct compat_msqid64_ds {
|
||||||
struct compat_ipc64_perm msg_perm;
|
struct compat_ipc64_perm msg_perm;
|
||||||
unsigned int __unused1;
|
unsigned int msg_stime_high;
|
||||||
compat_time_t msg_stime;
|
unsigned int msg_stime;
|
||||||
unsigned int __unused2;
|
unsigned int msg_rtime_high;
|
||||||
compat_time_t msg_rtime;
|
unsigned int msg_rtime;
|
||||||
unsigned int __unused3;
|
unsigned int msg_ctime_high;
|
||||||
compat_time_t msg_ctime;
|
unsigned int msg_ctime;
|
||||||
compat_ulong_t msg_cbytes;
|
compat_ulong_t msg_cbytes;
|
||||||
compat_ulong_t msg_qnum;
|
compat_ulong_t msg_qnum;
|
||||||
compat_ulong_t msg_qbytes;
|
compat_ulong_t msg_qbytes;
|
||||||
@ -190,12 +190,12 @@ struct compat_msqid64_ds {
|
|||||||
|
|
||||||
struct compat_shmid64_ds {
|
struct compat_shmid64_ds {
|
||||||
struct compat_ipc64_perm shm_perm;
|
struct compat_ipc64_perm shm_perm;
|
||||||
unsigned int __unused1;
|
unsigned int shm_atime_high;
|
||||||
compat_time_t shm_atime;
|
unsigned int shm_atime;
|
||||||
unsigned int __unused2;
|
unsigned int shm_dtime_high;
|
||||||
compat_time_t shm_dtime;
|
unsigned int shm_dtime;
|
||||||
unsigned int __unused3;
|
unsigned int shm_ctime_high;
|
||||||
compat_time_t shm_ctime;
|
unsigned int shm_ctime;
|
||||||
unsigned int __unused4;
|
unsigned int __unused4;
|
||||||
compat_size_t shm_segsz;
|
compat_size_t shm_segsz;
|
||||||
compat_pid_t shm_cpid;
|
compat_pid_t shm_cpid;
|
||||||
|
@ -10,18 +10,18 @@
|
|||||||
|
|
||||||
struct msqid64_ds {
|
struct msqid64_ds {
|
||||||
struct ipc64_perm msg_perm;
|
struct ipc64_perm msg_perm;
|
||||||
#ifndef __powerpc64__
|
#ifdef __powerpc64__
|
||||||
unsigned int __unused1;
|
|
||||||
#endif
|
|
||||||
__kernel_time_t msg_stime; /* last msgsnd time */
|
__kernel_time_t msg_stime; /* last msgsnd time */
|
||||||
#ifndef __powerpc64__
|
|
||||||
unsigned int __unused2;
|
|
||||||
#endif
|
|
||||||
__kernel_time_t msg_rtime; /* last msgrcv time */
|
__kernel_time_t msg_rtime; /* last msgrcv time */
|
||||||
#ifndef __powerpc64__
|
|
||||||
unsigned int __unused3;
|
|
||||||
#endif
|
|
||||||
__kernel_time_t msg_ctime; /* last change time */
|
__kernel_time_t msg_ctime; /* last change time */
|
||||||
|
#else
|
||||||
|
unsigned long msg_stime_high;
|
||||||
|
unsigned long msg_stime; /* last msgsnd time */
|
||||||
|
unsigned long msg_rtime_high;
|
||||||
|
unsigned long msg_rtime; /* last msgrcv time */
|
||||||
|
unsigned long msg_ctime_high;
|
||||||
|
unsigned long msg_ctime; /* last change time */
|
||||||
|
#endif
|
||||||
unsigned long msg_cbytes; /* current number of bytes on queue */
|
unsigned long msg_cbytes; /* current number of bytes on queue */
|
||||||
unsigned long msg_qnum; /* number of messages in queue */
|
unsigned long msg_qnum; /* number of messages in queue */
|
||||||
unsigned long msg_qbytes; /* max number of bytes on queue */
|
unsigned long msg_qbytes; /* max number of bytes on queue */
|
||||||
|
@ -15,20 +15,20 @@
|
|||||||
* between kernel and user space.
|
* between kernel and user space.
|
||||||
*
|
*
|
||||||
* Pad space is left for:
|
* Pad space is left for:
|
||||||
* - 64-bit time_t to solve y2038 problem
|
* - 2 miscellaneous 32/64-bit values
|
||||||
* - 2 miscellaneous 32-bit values
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
struct semid64_ds {
|
struct semid64_ds {
|
||||||
struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
|
struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
|
||||||
#ifndef __powerpc64__
|
#ifndef __powerpc64__
|
||||||
unsigned long __unused1;
|
unsigned long sem_otime_high;
|
||||||
#endif
|
unsigned long sem_otime; /* last semop time */
|
||||||
|
unsigned long sem_ctime_high;
|
||||||
|
unsigned long sem_ctime; /* last change time */
|
||||||
|
#else
|
||||||
__kernel_time_t sem_otime; /* last semop time */
|
__kernel_time_t sem_otime; /* last semop time */
|
||||||
#ifndef __powerpc64__
|
|
||||||
unsigned long __unused2;
|
|
||||||
#endif
|
|
||||||
__kernel_time_t sem_ctime; /* last change time */
|
__kernel_time_t sem_ctime; /* last change time */
|
||||||
|
#endif
|
||||||
unsigned long sem_nsems; /* no. of semaphores in array */
|
unsigned long sem_nsems; /* no. of semaphores in array */
|
||||||
unsigned long __unused3;
|
unsigned long __unused3;
|
||||||
unsigned long __unused4;
|
unsigned long __unused4;
|
||||||
|
@ -16,25 +16,22 @@
|
|||||||
* between kernel and user space.
|
* between kernel and user space.
|
||||||
*
|
*
|
||||||
* Pad space is left for:
|
* Pad space is left for:
|
||||||
* - 64-bit time_t to solve y2038 problem
|
|
||||||
* - 2 miscellaneous 32-bit values
|
* - 2 miscellaneous 32-bit values
|
||||||
*/
|
*/
|
||||||
|
|
||||||
struct shmid64_ds {
|
struct shmid64_ds {
|
||||||
struct ipc64_perm shm_perm; /* operation perms */
|
struct ipc64_perm shm_perm; /* operation perms */
|
||||||
#ifndef __powerpc64__
|
#ifdef __powerpc64__
|
||||||
unsigned long __unused1;
|
|
||||||
#endif
|
|
||||||
__kernel_time_t shm_atime; /* last attach time */
|
__kernel_time_t shm_atime; /* last attach time */
|
||||||
#ifndef __powerpc64__
|
|
||||||
unsigned long __unused2;
|
|
||||||
#endif
|
|
||||||
__kernel_time_t shm_dtime; /* last detach time */
|
__kernel_time_t shm_dtime; /* last detach time */
|
||||||
#ifndef __powerpc64__
|
|
||||||
unsigned long __unused3;
|
|
||||||
#endif
|
|
||||||
__kernel_time_t shm_ctime; /* last change time */
|
__kernel_time_t shm_ctime; /* last change time */
|
||||||
#ifndef __powerpc64__
|
#else
|
||||||
|
unsigned long shm_atime_high;
|
||||||
|
unsigned long shm_atime; /* last attach time */
|
||||||
|
unsigned long shm_dtime_high;
|
||||||
|
unsigned long shm_dtime; /* last detach time */
|
||||||
|
unsigned long shm_ctime_high;
|
||||||
|
unsigned long shm_ctime; /* last change time */
|
||||||
unsigned long __unused4;
|
unsigned long __unused4;
|
||||||
#endif
|
#endif
|
||||||
size_t shm_segsz; /* size of segment (bytes) */
|
size_t shm_segsz; /* size of segment (bytes) */
|
||||||
|
Loading…
Reference in New Issue
Block a user