From patchwork Fri Nov 10 22:42:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepa Dinamani X-Patchwork-Id: 836961 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=sparclinux-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="GHfQlb7E"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3yYZrw5TcQz9sRm for ; Sat, 11 Nov 2017 09:46:24 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754483AbdKJWns (ORCPT ); Fri, 10 Nov 2017 17:43:48 -0500 Received: from mail-qk0-f195.google.com ([209.85.220.195]:49125 "EHLO mail-qk0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753687AbdKJWnp (ORCPT ); Fri, 10 Nov 2017 17:43:45 -0500 Received: by mail-qk0-f195.google.com with SMTP id a142so13726098qkb.5; Fri, 10 Nov 2017 14:43:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=4h26Sn+vfQbf+LfvNARTRYMvHGUZY3j52Mx6JoznCuI=; b=GHfQlb7EaPUMD1JXA+RCcF6reep8ubaKnCIKAUQ+av3mnSD7DEB7wabQwNu49+th2L /rIdZW2PQ1C1KEQqeWuQeL6vrkY/YQUVFVbi/rfP9mxZEGOPojvlbueWVMKIE8n7+2e2 vVnZRRC5HnZuBrPKvG+v6LTgDD9iAWPk10UxX1qpHznajCfuJW+u+TOVopomrbVYXC05 v1W0np88bOHdRVyGl4ecEw+htWOXJhiLdIZQxyiWxacs8Tf7JRemE3NsUqhAlTi1sjzN Lzonr/yjn9yGIf6muy9fojioAgDIXXXq/I5KH+jvGIvu/XdZVcEoP2MRtdN2zTdWGD1g 8Ryg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=4h26Sn+vfQbf+LfvNARTRYMvHGUZY3j52Mx6JoznCuI=; b=bq39EgxZ3dg6j6U8Z1qZHwW2MEQHZiO7qiUYbnBs1fBaMpZTRJieBNr9v9NpJjztZK ybVSrgzZFcVzm0KE4neWBLqWhGQ9WM1ewfgvokWkUystPHIRjCoRWYGZvyi9MfXRgo5O q9NswfH7CghibuIPcJNtmn8xyuFoWo9gF5Ze/uetbjV3PZhUHjRx0c/mOPPnt35OegTT HIeu+3dzRZZdXhuCUugCRe8VDfJ+Q5hTPGsunMIoOsWw4HFf7dL5Bdj0GVGs0+8Ijge7 O4SkM3n5evIhppwru7hK5k7sOpAskA/5r8yfQgSCgoKhwv2DEJY4FE/wIfHWsKrX4bHP ohmg== X-Gm-Message-State: AJaThX7kVoiaTfcT5f3aiMMHkRj85xbEyDiPtQTsN2sgqQVEJcNZNBMJ EhRdu4qZR/At0HGhf4BU2leCQJC1 X-Google-Smtp-Source: AGs4zMac0KyGjDSMKQeX7iVYXDAHSxYUfJ24j/0USRSfnjEyt+Wxc9zeh88FhWmG2E0FjxGSLiRhIw== X-Received: by 10.55.40.230 with SMTP id o99mr3102313qko.81.1510353824297; Fri, 10 Nov 2017 14:43:44 -0800 (PST) Received: from localhost.localdomain ([2601:647:5000:6620:39ae:25d9:c1b6:63dd]) by smtp.gmail.com with ESMTPSA id y7sm6997341qke.58.2017.11.10.14.43.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Nov 2017 14:43:43 -0800 (PST) From: Deepa Dinamani To: tglx@linutronix.de, john.stultz@linaro.org Cc: linux-kernel@vger.kernel.org, arnd@arndb.de, y2038@lists.linaro.org, acme@kernel.org, benh@kernel.crashing.org, borntraeger@de.ibm.com, catalin.marinas@arm.com, cmetcalf@mellanox.com, cohuck@redhat.com, davem@davemloft.net, deller@gmx.de, devel@driverdev.osuosl.org, gerald.schaefer@de.ibm.com, gregkh@linuxfoundation.org, heiko.carstens@de.ibm.com, hoeppner@linux.vnet.ibm.com, hpa@zytor.com, jejb@parisc-linux.org, jwi@linux.vnet.ibm.com, linux-api@vger.kernel.org, linux-arch@vger.kernel.org, linux-mips@linux-mips.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, mark.rutland@arm.com, mingo@redhat.com, mpe@ellerman.id.au, oberpar@linux.vnet.ibm.com, oprofile-list@lists.sf.net, paulus@samba.org, peterz@infradead.org, ralf@linux-mips.org, rostedt@goodmis.org, rric@kernel.org, schwidefsky@de.ibm.com, sebott@linux.vnet.ibm.com, sparclinux@vger.kernel.org, sth@linux.vnet.ibm.com, ubraun@linux.vnet.ibm.com, will.deacon@arm.com, x86@kernel.org Subject: [PATCH 0/9] posix_clocks: Prepare syscalls for 64 bit time_t conversion Date: Fri, 10 Nov 2017 14:42:50 -0800 Message-Id: <20171110224259.15930-1-deepa.kernel@gmail.com> X-Mailer: git-send-email 2.11.0 Sender: sparclinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: sparclinux@vger.kernel.org The series is a preparation series for individual architectures to use 64 bit time_t syscalls in compat and 32 bit emulation modes. This is a follow up to the series Arnd Bergmann posted: https://sourceware.org/ml/libc-alpha/2015-05/msg00070.html Big picture is as per the lwn article: https://lwn.net/Articles/643234/ The series is directed at converting posix clock syscalls: clock_gettime, clock_settime, clock_getres and clock_nanosleep to use a new data structure __kernel_timespec at syscall boundaries. __kernel_timespec maintains 64 bit time_t across all execution modes. vdso will be handled as part of each architecture when they enable support for 64 bit time_t. The compat syscalls are repurposed to provide backward compatibility by using them as native syscalls as well for 32 bit architectures. They will continue to use timespec at syscall boundaries. CONFIG_64_BIT_TIME controls whether the syscalls use __kernel_timespec or timespec at syscall boundaries. The series does the following: 1. Enable compat syscalls unconditionally. 2. Add a new __kernel_timespec type to be used as the data structure for all the new syscalls. 3. Add new config CONFIG_64BIT_TIME(intead of the CONFIG_COMPAT_TIME in [1] and [2] to switch to new definition of __kernel_timespec. It is the same as struct timespec otherwise. Arnd Bergmann (1): y2038: introduce CONFIG_64BIT_TIME Deepa Dinamani (8): include: Move compat_timespec/ timeval to compat_time.h compat: Make compat helpers independent of CONFIG_COMPAT compat: enable compat_get/put_timespec64 always posix-clocks: Enable compat syscalls always include: Add new y2038 safe __kernel_timespec fix get_timespec64() for y2038 safe compat interfaces change time types to new y2038 safe __kernel_* types nanosleep: change time types to safe __kernel_* types arch/Kconfig | 11 ++++ arch/arm64/include/asm/compat.h | 11 ---- arch/arm64/include/asm/stat.h | 1 + arch/arm64/kernel/hw_breakpoint.c | 1 - arch/arm64/kernel/perf_regs.c | 2 +- arch/arm64/kernel/process.c | 1 - arch/mips/include/asm/compat.h | 11 ---- arch/mips/kernel/signal32.c | 2 +- arch/parisc/include/asm/compat.h | 11 ---- arch/powerpc/include/asm/compat.h | 11 ---- arch/powerpc/kernel/asm-offsets.c | 2 +- arch/powerpc/oprofile/backtrace.c | 2 +- arch/s390/hypfs/hypfs_sprp.c | 1 - arch/s390/include/asm/compat.h | 11 ---- arch/s390/include/asm/elf.h | 3 +- arch/s390/kvm/priv.c | 1 - arch/s390/pci/pci_clp.c | 1 - arch/sparc/include/asm/compat.h | 11 ---- arch/tile/include/asm/compat.h | 11 ---- arch/x86/events/core.c | 2 +- arch/x86/include/asm/compat.h | 11 ---- arch/x86/include/asm/ftrace.h | 2 +- arch/x86/include/asm/sys_ia32.h | 2 +- arch/x86/kernel/sys_x86_64.c | 2 +- drivers/s390/block/dasd_ioctl.c | 1 - drivers/s390/char/fs3270.c | 1 - drivers/s390/char/sclp_ctl.c | 1 - drivers/s390/char/vmcp.c | 1 - drivers/s390/cio/chsc_sch.c | 1 - drivers/s390/net/qeth_core_main.c | 2 +- drivers/staging/pi433/pi433_if.c | 2 +- include/linux/compat.h | 7 ++- include/linux/compat_time.h | 23 +++++++++ include/linux/restart_block.h | 7 +-- include/linux/syscalls.h | 12 ++--- include/linux/time.h | 4 +- include/linux/time64.h | 10 +++- include/uapi/asm-generic/posix_types.h | 1 + include/uapi/linux/time.h | 7 +++ kernel/Makefile | 2 +- kernel/compat.c | 92 ++++++++++++++++++---------------- kernel/time/hrtimer.c | 7 +-- kernel/time/posix-stubs.c | 12 ++--- kernel/time/posix-timers.c | 20 ++++---- kernel/time/time.c | 10 +++- 45 files changed, 152 insertions(+), 195 deletions(-) create mode 100644 include/linux/compat_time.h base-commit: d9e0e63d9a6f88440eb201e1491fcf730272c706