[parisc-linux] semid64_ds compiled on a 32-bit system has wrong expected size for sem_ctime

Carlos O'Donell carlos at baldric.uwo.ca
Mon Jan 26 12:44:00 MST 2004


> struct semid64_ds {
>         struct ipc64_perm sem_perm;             /* permissions .. see ipc.h */
> #ifndef __LP64__
>         unsigned int    __pad1; 
> #endif
>         __kernel_time_t sem_otime;              /* last semop time */
> #ifndef __LP64__
>         unsigned int    __pad2; 
> #endif
>         __kernel_time_t sem_ctime;              /* last change time */
>         unsigned int    sem_nsems;              /* no. of semaphores in array */
>         unsigned int    __unused1;
>         unsigned int    __unused2;
> };

Our 32-bit userspace will see different values for this depending on
running a 32-bit kernel or 64-bit. That last sem_ctime should probably
have a padding so our 32-bit userspace sees the right thing all the
time.

Something like?

---
#ifndef __LP64__
	unsigned int	__pad3;
#endif
	__kernel_time_t sem_ctime;
---

c.




More information about the parisc-linux mailing list