[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: linux-user - time64 question
From: |
Laurent Vivier |
Subject: |
Re: linux-user - time64 question |
Date: |
Wed, 27 May 2020 18:23:11 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 |
Le 05/05/2020 à 23:38, Sid Manning a écrit :
> I’m looking at a testcase failure when my target uses 64bit time in
> msg.h (struct msqid_ds). I’ve been able to get around this but changing
> target_msqid_ds like so:
>
>
> @@ -3900,18 +3901,9 @@ static inline abi_long do_semop(int semid,
> abi_long ptr,
> unsigned nsops)
> struct target_msqid_ds
> {
> struct target_ipc_perm msg_perm;
> - abi_ulong msg_stime;
> -#if TARGET_ABI_BITS == 32
> - abi_ulong __unused1;
> -#endif
> - abi_ulong msg_rtime;
> -#if TARGET_ABI_BITS == 32
> - abi_ulong __unused2;
> -#endif
> - abi_ulong msg_ctime;
> -#if TARGET_ABI_BITS == 32
> - abi_ulong __unused3;
> -#endif
> + abi_ullong msg_stime;
> + abi_ullong msg_rtime;
> + abi_ullong msg_ctime;
> abi_ulong __msg_cbytes;
> abi_ulong msg_qnum;
> abi_ulong msg_qbytes;
>
> It seems like either should have worked but I get garbage back in some
> of the elements below msg_time fields without the change.
>
> If time_t is 64bits then it seems like stime/rtime/ctime should be
> abi_ullong.
>
> My target is Hexagon and the TARGET_ABI_BITS is 32.
The structure has been changed into the kernel for the y2038 and the
change has not been reflected into qemu (and it needs).
See kernel commit:
c2ab975c30f0 ("y2038: ipc: Report long times to user space")
Thanks,
Laurent