From patchwork Wed Apr 25 15:05:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 134341 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp988640lji; Wed, 25 Apr 2018 08:11:59 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpsutngA+fb61lLNdQv7eM6N9ynME7mheIVVHUjSpsfmxhv2jqlAkGSlzLHEHXKhoIK+5U6 X-Received: by 2002:a17:902:8345:: with SMTP id z5-v6mr3442138pln.311.1524669119259; Wed, 25 Apr 2018 08:11:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524669119; cv=none; d=google.com; s=arc-20160816; b=r0W8DRRPqPvN1XHLSWHkw97wFbb0CU5ka/MTlFFlL4u7wJ1lkdHsUF2DeV8ivKAhF0 JIIrLm9LFsCSnoJccyQo6shl+0akHENB6z23/pYcGZlH/nBqirwvy7fsFlFIW/T0XYES 0a8kpS4D+p9XZQo7kx3Y8i/Hhg4F0s0LHB2vCywGLwdKUqJBpduL51ldiH76O4FLxFJJ /B/bgVjsoeuY1iUu54O6lA7BGB55UdJSgG3xnADIlS/+B2DAg6RM9ikQsPUpWomcfTxp xzfAkln6slsOjk9eJ7/vj+/JyVq6XEn5pneDe8RtpTKV02V4I+lp4SwMZ7wRYBdaK1m9 Olbw== 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=l+sB8A1nW3W59rYk31lujMMhgMRzPfFKE8WrVD3fhvB57bJry1HCk/IrkSlPDfP4Kw P533NiZ7FvBTrebdfqcokN9lgQZpl++AmckRJJIhtUdJNkPqWfrQIOLHZtdiIQ7parrj lIZ7pj5k2aDLcPsFC2J1IYhr0ODyT4tfzuc9kLfoW5qmKyoZb4+D+lCTKW0/yMAEUuwK JtKY/wgN1WzEtLxzIKAXkmoweNJ13njpIIoG7kbZU9h54hY55ApxciDKDsXT4fS2ZB+U co15D5l3aoa0LydYX3JLtq3pmXwofm41fmahw+6Xppl9SQ2oXO6eybuYhh9pAKagqHGy 2L9g== 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 d12si2927341pgt.175.2018.04.25.08.11.58; Wed, 25 Apr 2018 08:11:59 -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 S1755242AbeDYPLz (ORCPT + 29 others); Wed, 25 Apr 2018 11:11:55 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:42959 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753632AbeDYPLq (ORCPT ); Wed, 25 Apr 2018 11:11:46 -0400 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue002 [212.227.15.129]) with ESMTPA (Nemesis) id 0M7yDJ-1eP93h2r0D-00vcU2; Wed, 25 Apr 2018 17:06:24 +0200 From: Arnd Bergmann To: y2038@lists.linaro.org, linux-kernel@vger.kernel.org Cc: 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, zackw@panix.com, noloader@gmail.com, Arnd Bergmann Subject: [PATCH v4 06/16] y2038: arm64: Extend sysvipc compat data structures Date: Wed, 25 Apr 2018 17:05:56 +0200 Message-Id: <20180425150606.954771-6-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180425132242.1500539-1-arnd@arndb.de> References: <20180425132242.1500539-1-arnd@arndb.de> X-Provags-ID: V03:K1:fcRe0DNUcAVypwYlTp3IXYFjuFjQDfKycU59jL2OVL1JElO2Czw OE3O+8kugMP8MM8qSe0gl4B84vNx8+8fz8CM0FUk0juPvtVA5NIs2vXpuvE13AsmxMmxuWQ zAmwTXQC3OJAye3+ai4/1PSx820rUFtAlA13zxP95WAEKTVRPfspaYCR+JGE7Vc2mrI+6D6 Q4DTVOwUDgW9NCviLvM4A== X-UI-Out-Filterresults: notjunk:1; V01:K0:5DF63PkmOZo=:aHh74NeT3u2ZSVdacBqemX +OgQnTWtvULVk3AyDRneAvKH3R/CC+2OEBKWWmZ47pfFbEuM7+OG44vQjTSD7aWscavqKlJE3 D4dvgoDnYxHfRuzb7JWJJeVoHrFu089TjO05RGKg82S7i7DnMXiLihFnTUlTJ1qui+G8fMm0U KMnJgWaav9p7FrHCESq/tTzvtzhB0puPNTicKTVBIInsTFSsyXjBiJ2ynuCrTkslg7BIifFOf HI+gZ6lXmDQ+CysBvE6KiOmmrm4oOvJD6QMrK1/uODQqVhx69CYjPQytrNE4Whywbv8X/xSju olrd0EiPfTLFFrzpQ8tgOlJ2/aLpaJ2QNRuZj1pn7+YRw42r6GExgIA5kcpZvUwxAZEuH7lLE dlL+/gM+iKNsOxmqdeKhW2aULrnnObBT/M9zt1wadrhd6Rd43hsSM/g+WJj4P5lU+sXKmkAzM bU3BuyJ4urHe8HiTSSNvywsnvbjJJURyn6who2U5OZ3ltGomYF8D0qRgVCeP/MpOV4HC/9yK7 DyN+VXaX3i31zpCCEQOZ0Ea5O8zTFYclkC11FOvloYIaxbW6uUx8N+kpwpuweAuTRKT2JHo0z 5MENXYM4aJYUNNjDadPDn6hEYuHfq8jztoaSg+7lppghIwO6kei8lNZT5Xg39+GWSC4Esgv5u EB6WLUAuNpamsY10tyHcbHLB/zNmLu24NU7S0qMzWC/K8U9RfjAp+BIDFDFht9ElcSzutk8Uu l/9MKfuchOqX1rk7+wInQ0poBINe2fvOnxe+lw== 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(-) -- 2.9.0 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;