From patchwork Fri Nov 8 21:07:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 178968 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp3283908ilf; Fri, 8 Nov 2019 13:11:10 -0800 (PST) X-Google-Smtp-Source: APXvYqxHhdd4TASzksWvZ8DxvNi0FuvLyNICmmbXXWbx0nddRP44sfd3RyrqnormpN/+AFbGqXbq X-Received: by 2002:a05:6402:1250:: with SMTP id l16mr12671981edw.219.1573247470201; Fri, 08 Nov 2019 13:11:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573247470; cv=none; d=google.com; s=arc-20160816; b=utoDqlZz88gfnCC2zeCL6IE7zY25kv9v+i6+Of63LgtLnf3qdQ+9kaQdeKEov5apHL wqQoj+vf5YerFpV0yba+k40k2mtppiwT5ExrLhZolesV8cyEMqodLpsF44W7fuB2nUiX NGwZT3shaO9WIezVM/6EF2YKEpU+RCL1JZD9IfrY/KqBj7YeOZMq0DDFQX3llf1UUdQ/ VvAEl0q1fO3cqzumOM+9lkytGk3KnI+lToYV+Z+mWLNfVlND1DUnGowOI74pT+t3+R4Y W567YliKo7lRSNVOf6dxKHoOZASpSSNF8fAZ08qIpBxFU5h4EiAaQ8pBDR/bkoRL0/nk T5iA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=qLjUahYTthBYbRGotnYx/LS444dTxHI+GoahCpn6OXY=; b=Bs+GHCjGV6rgfmi8NSImjm8mOFi/gZ1K+Lw3ubml1SfexlTc46qkxnxJT0ZFNgciim tzkZubt20oY+EJX/Zr2Yx/I+h4wLsvIXVe+leKaVMLjNfyTyvrjSd8Rval6gvPKSuwF8 pnRVbgdApbRubVDEiU1l8NpZ7bY5NOXSQlg5oSeAQZFThi6HXjtn6LzMMa/QxRiRPy9B NmhBxZrN5ycNdATdxeqlcKPu2AiOHQ1kHbTP0s9RPVS+bJE8e/afiAQwXaU9P3Aiwm86 CCAdn933DljIwjvCtd2SLT7jHKNIgXKZJuCeV3n+iFHzVAjRw1fFL0MFDj4kIs4f76fe SD6w== 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 p11si4536285ejz.98.2019.11.08.13.11.09; Fri, 08 Nov 2019 13:11:10 -0800 (PST) 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 S1732533AbfKHVLH (ORCPT + 26 others); Fri, 8 Nov 2019 16:11:07 -0500 Received: from mout.kundenserver.de ([217.72.192.75]:58533 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731386AbfKHVLF (ORCPT ); Fri, 8 Nov 2019 16:11:05 -0500 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1MrQR7-1i6FJk2Bdf-00oUk0; Fri, 08 Nov 2019 22:10:27 +0100 From: Arnd Bergmann To: y2038@lists.linaro.org, Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, Jeff Dike , Richard Weinberger , Anton Ivanov , Vincenzo Frascino Cc: linux-kernel@vger.kernel.org, Arnd Bergmann , "H. Peter Anvin" , linux-um@lists.infradead.org Subject: [PATCH 05/23] y2038: vdso: change time_t to __kernel_old_time_t Date: Fri, 8 Nov 2019 22:07:25 +0100 Message-Id: <20191108210824.1534248-5-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20191108210236.1296047-1-arnd@arndb.de> References: <20191108210236.1296047-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:o8Zkr+sOZ52wm0ae45/RQryAsK7xYXnsT+HPUpQaufkmPH+Q6/t Mx1QjONjSFAcKcXg6d+qmIO5Nz2Z1PzDnxY6Ir3M0ox/+vbOAVauXJZo7+cMsdRcRszJBe7 Aj8ZN5RLd1R69CpmSVEU9MTURTureJNFvVMuvJJDqIIb4Y4IhYa+4XE+s6Ccc/3w7U5VVCC UD2jKhDgaH7FjqUd1a5VA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:1Ts/01x3JdM=:/uunyXLl4bvJWCavpfEcb/ 9UoHBVyzqBkcj75fodAjDhjhAyjHi2SMlxz2uJbRFRUmXsG6e6eAogVfcdfts7c47d1reojiA KrgDDY253RADofyZtnh5viCrKGzvxm4TKGABjrnBJ0bt1w3KfIWjCYWav1trSnZDSOZooRHfO WWwwqG5TUQys5Sv+D10PdDh1BmV1PkR0uQvqi3CJd4F1tM+ZGkEG/J9xbVfFsiF8+0dbqDPUQ hr3zgVglY92iRK6SwZ3FDgYMfVogf9R2bfVq1QDRbmGdrtFL2VujlHW7nH5WANGKBkOXxZHrO gXnN2qQQM31mucJGqTVaHLg+IF8tEGR7WvtN5gFD771I0OsvEOSfwY4xnWz6Z8mPCLoTrrfg0 iO1f2ahEO0l71Q3MDRR9pChW632vnUMGqXR0Ky4OTVKsj1JqLoKg32dGg6Nf2QnNk4+i5Nn4N 8P3pt9RnLY3nZ8uRAevHKgNdEPEzkueh4uRRA1fLHzn7oheQgyQ958Xc84M2+/zWIdm4pq7h/ ReSWhlc/Z0PIHrf6SCL/pkAUlTZ0nXkqcG2+JlONuaSiCIQ1UBPDIwAPipVV24b3qpbmW4+uZ ELTyVt3T3AirdIi6KcrlMebb/OnK4+Dpa2LEw92WHUcZ8wj70YTk2UptblgI1j60iH9hZBR7V DB3kobMcaX8Q7kGMdND8zIaTooRs/2vF0yOcrx4+3ujrUla+IZhROs6oWdLsansep6RTDDz3R 3oqTybQw5FsZaFfFrXLoFrDZGx9IkW9T7vaKNmv/iEf/bxmME60Q+D50eSBPH5cE5flykxY1y 89ZLtDAK60bylXgCvCP2fF5he1cpwrsVM+CNavdYFN4bEulPNhEaj7Ri0q4m9ntK04XxaoFqh BWMSp+QkU2j1ZURv5T0w== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Only x86 uses the 'time' syscall in vdso, so change that to __kernel_old_time_t as a preparation for removing 'time_t' and '__kernel_time_t' later. Signed-off-by: Arnd Bergmann --- arch/x86/entry/vdso/vclock_gettime.c | 6 +++--- arch/x86/entry/vsyscall/vsyscall_64.c | 2 +- arch/x86/um/vdso/um_vdso.c | 4 ++-- lib/vdso/gettimeofday.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) -- 2.20.0 Reviewed-by: Thomas Gleixner diff --git a/arch/x86/entry/vdso/vclock_gettime.c b/arch/x86/entry/vdso/vclock_gettime.c index d9ff616bb0f6..7d70935b6758 100644 --- a/arch/x86/entry/vdso/vclock_gettime.c +++ b/arch/x86/entry/vdso/vclock_gettime.c @@ -15,7 +15,7 @@ #include "../../../../lib/vdso/gettimeofday.c" extern int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz); -extern time_t __vdso_time(time_t *t); +extern __kernel_old_time_t __vdso_time(__kernel_old_time_t *t); int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz) { @@ -25,12 +25,12 @@ int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz) int gettimeofday(struct __kernel_old_timeval *, struct timezone *) __attribute__((weak, alias("__vdso_gettimeofday"))); -time_t __vdso_time(time_t *t) +__kernel_old_time_t __vdso_time(__kernel_old_time_t *t) { return __cvdso_time(t); } -time_t time(time_t *t) __attribute__((weak, alias("__vdso_time"))); +__kernel_old_time_t time(__kernel_old_time_t *t) __attribute__((weak, alias("__vdso_time"))); #if defined(CONFIG_X86_64) && !defined(BUILD_VDSO32_64) diff --git a/arch/x86/entry/vsyscall/vsyscall_64.c b/arch/x86/entry/vsyscall/vsyscall_64.c index 76e62bcb8d87..bba5bfdb2a56 100644 --- a/arch/x86/entry/vsyscall/vsyscall_64.c +++ b/arch/x86/entry/vsyscall/vsyscall_64.c @@ -194,7 +194,7 @@ bool emulate_vsyscall(unsigned long error_code, break; case 1: - if (!write_ok_or_segv(regs->di, sizeof(time_t))) { + if (!write_ok_or_segv(regs->di, sizeof(__kernel_old_time_t))) { ret = -EFAULT; goto check_fault; } diff --git a/arch/x86/um/vdso/um_vdso.c b/arch/x86/um/vdso/um_vdso.c index 371724cf70da..2112b8d14668 100644 --- a/arch/x86/um/vdso/um_vdso.c +++ b/arch/x86/um/vdso/um_vdso.c @@ -37,7 +37,7 @@ int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz) int gettimeofday(struct __kernel_old_timeval *, struct timezone *) __attribute__((weak, alias("__vdso_gettimeofday"))); -time_t __vdso_time(time_t *t) +__kernel_old_time_t __vdso_time(__kernel_old_time_t *t) { long secs; @@ -47,7 +47,7 @@ time_t __vdso_time(time_t *t) return secs; } -time_t time(time_t *t) __attribute__((weak, alias("__vdso_time"))); +__kernel_old_time_t time(__kernel_old_time_t *t) __attribute__((weak, alias("__vdso_time"))); long __vdso_getcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *unused) diff --git a/lib/vdso/gettimeofday.c b/lib/vdso/gettimeofday.c index 45f57fd2db64..9ecfd3b547ba 100644 --- a/lib/vdso/gettimeofday.c +++ b/lib/vdso/gettimeofday.c @@ -164,10 +164,10 @@ __cvdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz) } #ifdef VDSO_HAS_TIME -static __maybe_unused time_t __cvdso_time(time_t *time) +static __maybe_unused __kernel_old_time_t __cvdso_time(__kernel_old_time_t *time) { const struct vdso_data *vd = __arch_get_vdso_data(); - time_t t = READ_ONCE(vd[CS_HRES_COARSE].basetime[CLOCK_REALTIME].sec); + __kernel_old_time_t t = READ_ONCE(vd[CS_HRES_COARSE].basetime[CLOCK_REALTIME].sec); if (time) *time = t;