semctl/msgctl syscall in compat64 mode use 64-bit long time field similar to native struct semid64_ds/msqid64_ds so mask out the 32-bit upper half time fields.
Signed-off-by: Amit Daniel Kachhap amit.kachhap@arm.com --- arch/arm64/include/asm/compat.h | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/arch/arm64/include/asm/compat.h b/arch/arm64/include/asm/compat.h index e4073c91ea73..6bf15be21e6a 100644 --- a/arch/arm64/include/asm/compat.h +++ b/arch/arm64/include/asm/compat.h @@ -141,10 +141,15 @@ struct compat_ipc64_perm {
struct compat_semid64_ds { struct compat_ipc64_perm sem_perm; +#ifdef CONFIG_COMPAT64 + compat_long_t sem_otime; + compat_long_t sem_ctime; +#else /* !CONFIG_COMPAT64 */ compat_ulong_t sem_otime; compat_ulong_t sem_otime_high; compat_ulong_t sem_ctime; compat_ulong_t sem_ctime_high; +#endif compat_ulong_t sem_nsems; compat_ulong_t __unused3; compat_ulong_t __unused4; @@ -152,12 +157,18 @@ struct compat_semid64_ds {
struct compat_msqid64_ds { struct compat_ipc64_perm msg_perm; +#ifdef CONFIG_COMPAT64 + compat_long_t msg_stime; + compat_long_t msg_rtime; + compat_long_t msg_ctime; +#else compat_ulong_t msg_stime; compat_ulong_t msg_stime_high; compat_ulong_t msg_rtime; compat_ulong_t msg_rtime_high; compat_ulong_t msg_ctime; compat_ulong_t msg_ctime_high; +#endif compat_ulong_t msg_cbytes; compat_ulong_t msg_qnum; compat_ulong_t msg_qbytes;