Received: by 10.192.165.156 with SMTP id m28csp797902imm; Thu, 19 Apr 2018 07:44:45 -0700 (PDT) X-Google-Smtp-Source: AIpwx483rVyVMt+ilT6SDzTGVZ373X2F9KGOOBJxJ7hOXkywsyFPBo8I99CH5e6b0E6K0UhOQ1lG X-Received: by 2002:a17:902:ba94:: with SMTP id k20-v6mr6438031pls.193.1524149085280; Thu, 19 Apr 2018 07:44:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524149085; cv=none; d=google.com; s=arc-20160816; b=klaif8hwXtzpUti5SDxPKVk3a26ZboDFmY38ID5B8QkNq70VCQWXv9oE22KX+9AEX9 MV/7gaLnWJnEiQZdNbeCCbTgGcVZ9Db2STV+ic9JdhGJeS/gWP2BnceY4QDOb+NHCMvc Uh+XGFxNBwQBLpoazceydgvbqSB97o7RPklADzRoy/bXCsz3bbkivEw3tp7QyAcZwOWJ ejWu4FW8YgKhnn5ndl5gd2fl7OCjZklp8ue4mck8yd7gLntCpp0xOhAQ8sI4elMsUJtS QD8/nezctyC4ggbWU79h3eug9/JPPF0D+XZdkG92XI0ZaE9SeTmrvpq5RXZzwSzSryoX DnCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=15SVco5QnoxEbj1na1GDw8PFl3LCtQIeCla91vOMdXQ=; b=UiCb6Dvchnqx1xk3QTWGLqzeQgNUiy4n8lPA9TAdv9K3XF8y1CIyp++DS1yVrZfy3Y 5Ir8Dh8g0R5Xzfg7jJ2fJNrT205CUidg6mmGAzFLIu0GpNj/NwYFoAzs2VInytBwYo+B uXubXLhASJuR+RVnhGh5isxbUoKIvfWuWOO7qPecELifgpr8Qc4Y4AxO1ifDj/rY72w5 3NdAdBZkOKBRpI6eeoaCUYxbBvdh/I90HJwiCl/LBFqHJ76axLMcq99XzT15HxYgvbP3 wVdynQbKt+HW3HqvWYKO1I3oLWN7Ti9QmUqsQkT/WI2lQ5XAE56gJJZlQ03ifVwm3hec LIAQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g11-v6si3637720plt.284.2018.04.19.07.44.31; Thu, 19 Apr 2018 07:44:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753552AbeDSOnL (ORCPT + 99 others); Thu, 19 Apr 2018 10:43:11 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:54107 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753099AbeDSOit (ORCPT ); Thu, 19 Apr 2018 10:38:49 -0400 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.145]) with ESMTPA (Nemesis) id 0MPp3a-1f5LCf3dR4-00545j; Thu, 19 Apr 2018 16:37:52 +0200 From: Arnd Bergmann To: y2038@lists.linaro.org, linux-kernel@vger.kernel.org Cc: Arnd Bergmann , linux-api@vger.kernel.org, linux-arch@vger.kernel.org, libc-alpha@sourceware.org, tglx@linutronix.de, deepa.kernel@gmail.com, viro@zeniv.linux.org.uk, ebiederm@xmission.com, albert.aribaud@3adev.fr, linux-s390@vger.kernel.org, schwidefsky@de.ibm.com, x86@kernel.org, catalin.marinas@arm.com, will.deacon@arm.com, linux-mips@linux-mips.org, jhogan@kernel.org, ralf@linux-mips.org, linuxppc-dev@lists.ozlabs.org, sparclinux@vger.kernel.org Subject: [PATCH v3 05/17] y2038: arm64: Extend sysvipc compat data structures Date: Thu, 19 Apr 2018 16:37:25 +0200 Message-Id: <20180419143737.606138-6-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180419143737.606138-1-arnd@arndb.de> References: <20180419143737.606138-1-arnd@arndb.de> X-Provags-ID: V03:K1:0JzYSZcHr7NxbSRG/1MxgZaJ5JU+b3m4LiNGtOkxl/QzRgNqGf9 HDvtz0qrMIjJMP1YuATtpumjuElGmO3EPCUs2FdfOtyJAJxiyzWX+oSL4Oad9KGjqQ0LLY/ fK/s1hgkMF2ydYQatBY4p2CWjH0UybJtbktZR/PkiyJazDMpQej0ek+vTUtcXxvo+95GFTt qPX8dlcqBNUzSaaGi+7DA== X-UI-Out-Filterresults: notjunk:1;V01:K0:yqv5fC47tG0=:pnVW2fG3BmXOs6HCM/g/Fi kaWsTJEz6m3QVPtBL+1rMrb/IWI3iJc24yNU9uM7fgC5tshukHsB5u7DFEgE4dBu5/afNgvit JubdB2GJHb+C0IMhPRWlg7WQxlFF/wo3DurvbPpYvuFWDJFYQ+eqdEKtrfyCBmD8/ztCeDUWY MABvtlTPUNlXzajX7Bj/XPF8s6wPNaUMXBHd24E4wtAwqQnah0WI5W/C4jqv9Y8oLa620ShEc ObzDvuoxm1fkaJBEKaSat7pP162+r0pF5T3BuuVtaJfBR39XojRYXuNuiTG8gePnRfaWqf99K XA0idEDa4WNW6tIFoh9SXQyhoDbXPskOMdZrJj3xAON5IdTi4rh5aWwKaZ4RVhs80El5WHDZD Yj5jutOkcGUjw904K3RXhginebeUVy/tBny9elvakEt3tMKZgTYr9aK0ppSNrrc1rH9R3Csmq MUZrWRt+uSKJUZJKpaezFKGxD9bf/PFVBoCAdfnsJVJ8qOiK+oR7+0pJKhZR/L1wg7/4xYlzU /bo+4e4sWK2UiREfL16ll4Qq5p57Omqm0j5+zH1fnTADBp0Y8jG1654xluyDQn7AxzXflJf29 sSiLnCRHV2G+CmNIiV+tSNWvGbVxuSC3pjmFccCJwzcqVLiHpdULQn5WFFp0jNCGRILvlKLWV djUwOvdXzN798OtHSlo9GnACZfgGU6BfP24DztxUeVlKX1hg5/sS/vF5joRP1Cr5fvAmjOSS7 svQXWOUUGmfMqYn47kAV+ti4RbBUuCQ4sofKiw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Both 32-bit amd 64-bit ARM use the asm-generic header files for their sysvipc data structures, so no special care is needed to make those work beyond y2038, with the one exception of compat mode: Since there is no asm-generic definition of the compat mode IPC structures, ARM64 provides its own copy, and we make those match the changes in the native asm-generic header files. There is sufficient padding in these data structures to extend all timestamps to 64 bit, but on big-endian ARM kernels, the padding is in the wrong place, so the C library has to ensure it reassembles a 64-bit time_t correctly. Signed-off-by: Arnd Bergmann --- arch/arm64/include/asm/compat.h | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/arch/arm64/include/asm/compat.h b/arch/arm64/include/asm/compat.h index 0030f79808b3..1a037b94eba1 100644 --- a/arch/arm64/include/asm/compat.h +++ b/arch/arm64/include/asm/compat.h @@ -181,10 +181,10 @@ struct compat_ipc64_perm { struct compat_semid64_ds { struct compat_ipc64_perm sem_perm; - compat_time_t sem_otime; - compat_ulong_t __unused1; - compat_time_t sem_ctime; - compat_ulong_t __unused2; + compat_ulong_t sem_otime; + compat_ulong_t sem_otime_high; + compat_ulong_t sem_ctime; + compat_ulong_t sem_ctime_high; compat_ulong_t sem_nsems; compat_ulong_t __unused3; compat_ulong_t __unused4; @@ -192,12 +192,12 @@ struct compat_semid64_ds { struct compat_msqid64_ds { struct compat_ipc64_perm msg_perm; - compat_time_t msg_stime; - compat_ulong_t __unused1; - compat_time_t msg_rtime; - compat_ulong_t __unused2; - compat_time_t msg_ctime; - compat_ulong_t __unused3; + 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; compat_ulong_t msg_cbytes; compat_ulong_t msg_qnum; compat_ulong_t msg_qbytes; @@ -210,12 +210,12 @@ struct compat_msqid64_ds { struct compat_shmid64_ds { struct compat_ipc64_perm shm_perm; compat_size_t shm_segsz; - compat_time_t shm_atime; - compat_ulong_t __unused1; - compat_time_t shm_dtime; - compat_ulong_t __unused2; - compat_time_t shm_ctime; - compat_ulong_t __unused3; + compat_ulong_t shm_atime; + compat_ulong_t shm_atime_high; + compat_ulong_t shm_dtime; + compat_ulong_t shm_dtime_high; + compat_ulong_t shm_ctime; + compat_ulong_t shm_ctime_high; compat_pid_t shm_cpid; compat_pid_t shm_lpid; compat_ulong_t shm_nattch; -- 2.9.0