From patchwork Thu Apr 19 14:37:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 133816 Delivered-To: patch@linaro.org Received: by 10.80.173.174 with SMTP id a43csp881691edd; Thu, 19 Apr 2018 07:40:16 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+c6VDQ2nZeMjBOssM/Q7rs4eBP3tA5bjE6hN/kWyBug7i0IR2hOa9E6RRZzA6Xp2mJrQXL X-Received: by 10.98.133.15 with SMTP id u15mr6056044pfd.160.1524148816426; Thu, 19 Apr 2018 07:40:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524148816; cv=none; d=google.com; s=arc-20160816; b=c22FWlQ+yBEcHIkd1xohOUX98ZpJz9LToU1VuayxvbKeufhcXurUAvMb6fckdNGimh kJDyF1sUIW4ac0dsSgrYYmYkWa9VyrxRgoYS300GJxCz2R73chrxZi94EmoRTilKIGk6 kyozaOPU0yGcwGcRFpU6ug9DG5JoLU6esYzPauPIKeME52zPBsYnrkZfuym41zGIpTfE WnFAWt3X9A5GnOypj/rAHVBeO1r31L7v9d9WgVXPF52kuLCUM905+HJWgm+xq0/L7rMA GD1F5UhUzKryG4jVag5+IEik2CRpS3kayPL9atc7VdRtC+M4kmnJGKtAnm6FtMeFniTB 5nNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :delivered-to:sender:list-help:list-post:list-archive:list-subscribe :list-unsubscribe:list-id:precedence:mailing-list:dkim-signature :domainkey-signature:arc-authentication-results; bh=15SVco5QnoxEbj1na1GDw8PFl3LCtQIeCla91vOMdXQ=; b=PceJrfad04yBUEDxBUlxEqzsVXp4vy9OvUvJ+uWSTbBYbUY/CDvsXK9/0X3lSDbSil O6RAzC/EBLWAqvO0cGUVYl8GtGLpLPaYagMokvHVRQXI6/K2fNGBTt0AIXgnx2GHorLo Q9ZM7qHNxe7YQu8bWJveBVVj7viK6YDPcdEWS4UMXPBxmkbqP9KyIKSX7NtExWnucGIM i18wCI9eyOfpjLGK8JU2hcTScHyWmGHQdAC+50rinVV2vEQs2RSD965kivdLmEB8TskL nEW9pc2XokDdqj7cMFtykjn9tOQ90oeGg9q3mCTcp5vZgF98pcX4T4WSaEQnEUEtUc1U iRPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=VVk6qMg/; spf=pass (google.com: domain of libc-alpha-return-91710-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-91710-patch=linaro.org@sourceware.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id q5si3149528pgc.620.2018.04.19.07.40.16 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 07:40:16 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-91710-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=VVk6qMg/; spf=pass (google.com: domain of libc-alpha-return-91710-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-91710-patch=linaro.org@sourceware.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=sYSQbXnirO4o9WwGk7y/Z4vCujItbfL WBdTldobLvhEqbpWlUS9m0tItNPfi0ehonqF3Ctd1DegBmdLIms4VYaW0UXocny0 P7026PfY2KbC3dI2+O7Tt0fpGM5A+S48B9e/5OIpa6nwOTk0MWSGQooW5DD3TuiY Q+NS2CVVdDcQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; s=default; bh=y6mC2rWhfBhEAVGRFP3AE0Sa17A=; b=VVk6q Mg//LL7w9AnTOijc/X6rmM17c5KTmmwBf6TMJAUdCrFqCdJZE2ETau+GbgCE3hP4 2sFv7eLnwMqokXuVMVIHahdgCvvtGcSA9d6XVU1qPk/5wBrr1zuqXv42F7ZdkXWd zoRWL/ty9hG/Uqaiq9JwCY0vwVv/8P7H3YuC10= Received: (qmail 114298 invoked by alias); 19 Apr 2018 14:39:14 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 113805 invoked by uid 89); 19 Apr 2018 14:39:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy= X-HELO: mout.kundenserver.de 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> In-Reply-To: <20180419143737.606138-1-arnd@arndb.de> References: <20180419143737.606138-1-arnd@arndb.de> 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== 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;