* [PATCH v3 00/10] posix_clocks: Prepare syscalls for 64 bit time_t conversion
@ 2018-01-16 2:18 Deepa Dinamani
2018-01-16 2:18 ` [PATCH v3 02/10] include: Move compat_timespec/ timeval to compat_time.h Deepa Dinamani
[not found] ` <20180116021818.24791-1-deepa.kernel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 2 replies; 12+ messages in thread
From: Deepa Dinamani @ 2018-01-16 2:18 UTC (permalink / raw)
To: tglx, john.stultz
Cc: linux-kernel, arnd, y2038, acme, benh, borntraeger,
catalin.marinas, cmetcalf, cohuck, davem, deller, devel,
gerald.schaefer, gregkh, heiko.carstens, hoeppner, hpa, jejb, jwi,
linux-api, linux-arch, linux-mips, linux-parisc, linuxppc-dev,
linux-s390, mark.rutland, mingo, mpe, oberpar, oprofile-list,
paulus, peterz, ralf
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 [1]
Big picture is as per the lwn article:
https://lwn.net/Articles/643234/ [2]
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 on 32 bit architectures.
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.
4. Add new CONFIG_32BIT_TIME to conditionally compile compat syscalls.
* Changes since v2:
* Dropped the ARCH_HAS_64BIT_TIME config.
* Fixed zeroing out of higher order bits of tv_nsec for real.
* Addressed minor review comments from v1.
* Changes since v1:
* Introduce CONFIG_32BIT_TIME
* Fixed zeroing out of higher order bits of tv_nsec
* Included Arnd's changes to fix up use of compat headers
I decided against using LEGACY_TIME_SYSCALLS to conditionally compile
legacy time syscalls such as sys_nanosleep because this will need to
enclose compat_sys_nanosleep as well. So, defining it as
config LEGACY_TIME_SYSCALLS
def_bool 64BIT || !64BIT_TIME
will not include compat_sys_nanosleep. We will instead need a new config to
exclusively mark legacy syscalls.
Deepa Dinamani (10):
compat: Make compat helpers independent of CONFIG_COMPAT
include: Move compat_timespec/ timeval to compat_time.h
compat: enable compat_get/put_timespec64 always
arch: introduce CONFIG_64BIT_TIME
arch: Introduce CONFIG_COMPAT_32BIT_TIME
posix-clocks: Make compat syscalls depend on CONFIG_COMPAT_32BIT_TIME
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 | 15 +++++++++
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 +-
include/linux/compat.h | 11 ++++---
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/compat.c | 52 +++++-------------------------
kernel/time/hrtimer.c | 10 ++++--
kernel/time/posix-stubs.c | 12 ++++---
kernel/time/posix-timers.c | 24 ++++++++++----
kernel/time/time.c | 58 +++++++++++++++++++++++++++++++---
43 files changed, 176 insertions(+), 190 deletions(-)
create mode 100644 include/linux/compat_time.h
base-commit: 8418f88764046d0e8ca6a3c04a69a0e57189aa1e
--
2.14.1
Cc: acme@kernel.org
Cc: benh@kernel.crashing.org
Cc: borntraeger@de.ibm.com
Cc: catalin.marinas@arm.com
Cc: cmetcalf@mellanox.com
Cc: cohuck@redhat.com
Cc: davem@davemloft.net
Cc: deller@gmx.de
Cc: devel@driverdev.osuosl.org
Cc: gerald.schaefer@de.ibm.com
Cc: gregkh@linuxfoundation.org
Cc: heiko.carstens@de.ibm.com
Cc: hoeppner@linux.vnet.ibm.com
Cc: hpa@zytor.com
Cc: jejb@parisc-linux.org
Cc: jwi@linux.vnet.ibm.com
Cc: linux-api@vger.kernel.org
Cc: linux-arch@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-mips@linux-mips.org
Cc: linux-parisc@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-s390@vger.kernel.org
Cc: mark.rutland@arm.com
Cc: mingo@redhat.com
Cc: mpe@ellerman.id.au
Cc: oberpar@linux.vnet.ibm.com
Cc: oprofile-list@lists.sf.net
Cc: paulus@samba.org
Cc: peterz@infradead.org
Cc: ralf@linux-mips.org
Cc: rostedt@goodmis.org
Cc: rric@kernel.org
Cc: schwidefsky@de.ibm.com
Cc: sebott@linux.vnet.ibm.com
Cc: sparclinux@vger.kernel.org
Cc: sth@linux.vnet.ibm.com
Cc: ubraun@linux.vnet.ibm.com
Cc: will.deacon@arm.com
Cc: x86@kernel.org
^ permalink raw reply [flat|nested] 12+ messages in thread* [PATCH v3 02/10] include: Move compat_timespec/ timeval to compat_time.h 2018-01-16 2:18 [PATCH v3 00/10] posix_clocks: Prepare syscalls for 64 bit time_t conversion Deepa Dinamani @ 2018-01-16 2:18 ` Deepa Dinamani 2018-01-16 9:30 ` Catalin Marinas ` (4 more replies) [not found] ` <20180116021818.24791-1-deepa.kernel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 1 sibling, 5 replies; 12+ messages in thread From: Deepa Dinamani @ 2018-01-16 2:18 UTC (permalink / raw) To: tglx, john.stultz Cc: linux-kernel, arnd, y2038, acme, benh, borntraeger, catalin.marinas, cmetcalf, cohuck, davem, deller, devel, gerald.schaefer, gregkh, heiko.carstens, hoeppner, hpa, jejb, jwi, linux-mips, linux-parisc, linuxppc-dev, linux-s390, mark.rutland, mingo, mpe, oberpar, oprofile-list, paulus, peterz, ralf, rostedt, rric, schwidefsky All the current architecture specific defines for these are the same. Refactor these common defines to a common header file. The new common linux/compat_time.h is also useful as it will eventually be used to hold all the defines that are needed for compat time types that support non y2038 safe types. New architectures need not have to define these new types as they will only use new y2038 safe syscalls. This file can be deleted after y2038 when we stop supporting non y2038 safe syscalls. The patch also requires an operation similar to: git grep "asm/compat\.h" | cut -d ":" -f 1 | xargs -n 1 sed -i -e "s%asm/compat.h%linux/compat.h%g" Cc: acme@kernel.org Cc: benh@kernel.crashing.org Cc: borntraeger@de.ibm.com Cc: catalin.marinas@arm.com Cc: cmetcalf@mellanox.com Cc: cohuck@redhat.com Cc: davem@davemloft.net Cc: deller@gmx.de Cc: devel@driverdev.osuosl.org Cc: gerald.schaefer@de.ibm.com Cc: gregkh@linuxfoundation.org Cc: heiko.carstens@de.ibm.com Cc: hoeppner@linux.vnet.ibm.com Cc: hpa@zytor.com Cc: jejb@parisc-linux.org Cc: jwi@linux.vnet.ibm.com Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: linux-parisc@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-s390@vger.kernel.org Cc: mark.rutland@arm.com Cc: mingo@redhat.com Cc: mpe@ellerman.id.au Cc: oberpar@linux.vnet.ibm.com Cc: oprofile-list@lists.sf.net Cc: paulus@samba.org Cc: peterz@infradead.org Cc: ralf@linux-mips.org Cc: rostedt@goodmis.org Cc: rric@kernel.org Cc: schwidefsky@de.ibm.com Cc: sebott@linux.vnet.ibm.com Cc: sparclinux@vger.kernel.org Cc: sth@linux.vnet.ibm.com Cc: ubraun@linux.vnet.ibm.com Cc: will.deacon@arm.com Cc: x86@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com> Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org> --- 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 +- include/linux/compat.h | 1 + include/linux/compat_time.h | 19 +++++++++++++++++++ 31 files changed, 31 insertions(+), 109 deletions(-) create mode 100644 include/linux/compat_time.h diff --git a/arch/arm64/include/asm/compat.h b/arch/arm64/include/asm/compat.h index a3c7f271ad4c..977b5064afc1 100644 --- a/arch/arm64/include/asm/compat.h +++ b/arch/arm64/include/asm/compat.h @@ -34,7 +34,6 @@ typedef u32 compat_size_t; typedef s32 compat_ssize_t; -typedef s32 compat_time_t; typedef s32 compat_clock_t; typedef s32 compat_pid_t; typedef u16 __compat_uid_t; @@ -66,16 +65,6 @@ typedef u32 compat_ulong_t; typedef u64 compat_u64; typedef u32 compat_uptr_t; -struct compat_timespec { - compat_time_t tv_sec; - s32 tv_nsec; -}; - -struct compat_timeval { - compat_time_t tv_sec; - s32 tv_usec; -}; - struct compat_stat { #ifdef __AARCH64EB__ short st_dev; diff --git a/arch/arm64/include/asm/stat.h b/arch/arm64/include/asm/stat.h index 15e35598ac40..eab738019707 100644 --- a/arch/arm64/include/asm/stat.h +++ b/arch/arm64/include/asm/stat.h @@ -20,6 +20,7 @@ #ifdef CONFIG_COMPAT +#include <linux/compat_time.h> #include <asm/compat.h> /* diff --git a/arch/arm64/kernel/hw_breakpoint.c b/arch/arm64/kernel/hw_breakpoint.c index 74bb56f656ef..413dbe530da8 100644 --- a/arch/arm64/kernel/hw_breakpoint.c +++ b/arch/arm64/kernel/hw_breakpoint.c @@ -30,7 +30,6 @@ #include <linux/smp.h> #include <linux/uaccess.h> -#include <asm/compat.h> #include <asm/current.h> #include <asm/debug-monitors.h> #include <asm/hw_breakpoint.h> diff --git a/arch/arm64/kernel/perf_regs.c b/arch/arm64/kernel/perf_regs.c index 1d091d048d04..929fc369d0be 100644 --- a/arch/arm64/kernel/perf_regs.c +++ b/arch/arm64/kernel/perf_regs.c @@ -5,7 +5,7 @@ #include <linux/bug.h> #include <linux/sched/task_stack.h> -#include <asm/compat.h> +#include <linux/compat.h> #include <asm/perf_regs.h> #include <asm/ptrace.h> diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c index ad8aeb098b31..a1cca69fc14f 100644 --- a/arch/arm64/kernel/process.c +++ b/arch/arm64/kernel/process.c @@ -51,7 +51,6 @@ #include <linux/thread_info.h> #include <asm/alternative.h> -#include <asm/compat.h> #include <asm/cacheflush.h> #include <asm/exec.h> #include <asm/fpsimd.h> diff --git a/arch/mips/include/asm/compat.h b/arch/mips/include/asm/compat.h index 49691331ada4..ccbf14e33282 100644 --- a/arch/mips/include/asm/compat.h +++ b/arch/mips/include/asm/compat.h @@ -14,7 +14,6 @@ typedef u32 compat_size_t; typedef s32 compat_ssize_t; -typedef s32 compat_time_t; typedef s32 compat_clock_t; typedef s32 compat_suseconds_t; @@ -46,16 +45,6 @@ typedef u32 compat_ulong_t; typedef u64 compat_u64; typedef u32 compat_uptr_t; -struct compat_timespec { - compat_time_t tv_sec; - s32 tv_nsec; -}; - -struct compat_timeval { - compat_time_t tv_sec; - s32 tv_usec; -}; - struct compat_stat { compat_dev_t st_dev; s32 st_pad1[3]; diff --git a/arch/mips/kernel/signal32.c b/arch/mips/kernel/signal32.c index cf5c7c05e5a3..a6b04c70a8cb 100644 --- a/arch/mips/kernel/signal32.c +++ b/arch/mips/kernel/signal32.c @@ -14,7 +14,7 @@ #include <linux/signal.h> #include <linux/syscalls.h> -#include <asm/compat.h> +#include <linux/compat.h> #include <asm/compat-signal.h> #include <linux/uaccess.h> #include <asm/unistd.h> diff --git a/arch/parisc/include/asm/compat.h b/arch/parisc/include/asm/compat.h index acf8aa07cbe0..90f844b16beb 100644 --- a/arch/parisc/include/asm/compat.h +++ b/arch/parisc/include/asm/compat.h @@ -13,7 +13,6 @@ typedef u32 compat_size_t; typedef s32 compat_ssize_t; -typedef s32 compat_time_t; typedef s32 compat_clock_t; typedef s32 compat_pid_t; typedef u32 __compat_uid_t; @@ -40,16 +39,6 @@ typedef u32 compat_ulong_t; typedef u64 compat_u64; typedef u32 compat_uptr_t; -struct compat_timespec { - compat_time_t tv_sec; - s32 tv_nsec; -}; - -struct compat_timeval { - compat_time_t tv_sec; - s32 tv_usec; -}; - struct compat_stat { compat_dev_t st_dev; /* dev_t is 32 bits on parisc */ compat_ino_t st_ino; /* 32 bits */ diff --git a/arch/powerpc/include/asm/compat.h b/arch/powerpc/include/asm/compat.h index 8a2aecfe9b02..517dbcfc2240 100644 --- a/arch/powerpc/include/asm/compat.h +++ b/arch/powerpc/include/asm/compat.h @@ -17,7 +17,6 @@ typedef u32 compat_size_t; typedef s32 compat_ssize_t; -typedef s32 compat_time_t; typedef s32 compat_clock_t; typedef s32 compat_pid_t; typedef u32 __compat_uid_t; @@ -45,16 +44,6 @@ typedef u32 compat_ulong_t; typedef u64 compat_u64; typedef u32 compat_uptr_t; -struct compat_timespec { - compat_time_t tv_sec; - s32 tv_nsec; -}; - -struct compat_timeval { - compat_time_t tv_sec; - s32 tv_usec; -}; - struct compat_stat { compat_dev_t st_dev; compat_ino_t st_ino; diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c index a6c72f720e8a..18a32e3c3718 100644 --- a/arch/powerpc/kernel/asm-offsets.c +++ b/arch/powerpc/kernel/asm-offsets.c @@ -42,7 +42,7 @@ #include <asm/paca.h> #include <asm/lppaca.h> #include <asm/cache.h> -#include <asm/compat.h> +#include <linux/compat.h> #include <asm/mmu.h> #include <asm/hvcall.h> #include <asm/xics.h> diff --git a/arch/powerpc/oprofile/backtrace.c b/arch/powerpc/oprofile/backtrace.c index ecc66d5f02c9..11ff763c03ad 100644 --- a/arch/powerpc/oprofile/backtrace.c +++ b/arch/powerpc/oprofile/backtrace.c @@ -11,7 +11,7 @@ #include <linux/sched.h> #include <asm/processor.h> #include <linux/uaccess.h> -#include <asm/compat.h> +#include <linux/compat.h> #include <asm/oprofile_impl.h> #define STACK_SP(STACK) *(STACK) diff --git a/arch/s390/hypfs/hypfs_sprp.c b/arch/s390/hypfs/hypfs_sprp.c index ae0ed8dd5f1b..5d85a039391c 100644 --- a/arch/s390/hypfs/hypfs_sprp.c +++ b/arch/s390/hypfs/hypfs_sprp.c @@ -13,7 +13,6 @@ #include <linux/string.h> #include <linux/types.h> #include <linux/uaccess.h> -#include <asm/compat.h> #include <asm/diag.h> #include <asm/sclp.h> #include "hypfs.h" diff --git a/arch/s390/include/asm/compat.h b/arch/s390/include/asm/compat.h index 5e6a63641a5f..7e587eb9fb58 100644 --- a/arch/s390/include/asm/compat.h +++ b/arch/s390/include/asm/compat.h @@ -53,7 +53,6 @@ typedef u32 compat_size_t; typedef s32 compat_ssize_t; -typedef s32 compat_time_t; typedef s32 compat_clock_t; typedef s32 compat_pid_t; typedef u16 __compat_uid_t; @@ -97,16 +96,6 @@ typedef struct { u32 gprs_high[NUM_GPRS]; } s390_compat_regs_high; -struct compat_timespec { - compat_time_t tv_sec; - s32 tv_nsec; -}; - -struct compat_timeval { - compat_time_t tv_sec; - s32 tv_usec; -}; - struct compat_stat { compat_dev_t st_dev; u16 __pad1; diff --git a/arch/s390/include/asm/elf.h b/arch/s390/include/asm/elf.h index 1a61b1b997f2..3e15c77c7c9a 100644 --- a/arch/s390/include/asm/elf.h +++ b/arch/s390/include/asm/elf.h @@ -126,7 +126,7 @@ */ #include <asm/ptrace.h> -#include <asm/compat.h> +#include <linux/compat.h> #include <asm/syscall.h> #include <asm/user.h> @@ -136,7 +136,6 @@ typedef s390_regs elf_gregset_t; typedef s390_fp_regs compat_elf_fpregset_t; typedef s390_compat_regs compat_elf_gregset_t; -#include <linux/compat.h> #include <linux/sched/mm.h> /* for task_struct */ #include <asm/mmu_context.h> diff --git a/arch/s390/kvm/priv.c b/arch/s390/kvm/priv.c index 0714bfa56da0..5db2e40479aa 100644 --- a/arch/s390/kvm/priv.c +++ b/arch/s390/kvm/priv.c @@ -26,7 +26,6 @@ #include <asm/gmap.h> #include <asm/io.h> #include <asm/ptrace.h> -#include <asm/compat.h> #include <asm/sclp.h> #include "gaccess.h" #include "kvm-s390.h" diff --git a/arch/s390/pci/pci_clp.c b/arch/s390/pci/pci_clp.c index 93cd0f1ca12b..19b2d2a9b43d 100644 --- a/arch/s390/pci/pci_clp.c +++ b/arch/s390/pci/pci_clp.c @@ -19,7 +19,6 @@ #include <linux/uaccess.h> #include <asm/pci_debug.h> #include <asm/pci_clp.h> -#include <asm/compat.h> #include <asm/clp.h> #include <uapi/asm/clp.h> diff --git a/arch/sparc/include/asm/compat.h b/arch/sparc/include/asm/compat.h index fa38c78de0f0..5b49b6a66cdb 100644 --- a/arch/sparc/include/asm/compat.h +++ b/arch/sparc/include/asm/compat.h @@ -11,7 +11,6 @@ typedef u32 compat_size_t; typedef s32 compat_ssize_t; -typedef s32 compat_time_t; typedef s32 compat_clock_t; typedef s32 compat_pid_t; typedef u16 __compat_uid_t; @@ -39,16 +38,6 @@ typedef u32 compat_ulong_t; typedef u64 compat_u64; typedef u32 compat_uptr_t; -struct compat_timespec { - compat_time_t tv_sec; - s32 tv_nsec; -}; - -struct compat_timeval { - compat_time_t tv_sec; - s32 tv_usec; -}; - struct compat_stat { compat_dev_t st_dev; compat_ino_t st_ino; diff --git a/arch/tile/include/asm/compat.h b/arch/tile/include/asm/compat.h index 62a7b83025dd..21ab5b80f5c7 100644 --- a/arch/tile/include/asm/compat.h +++ b/arch/tile/include/asm/compat.h @@ -29,7 +29,6 @@ typedef u32 compat_ulong_t; typedef u32 compat_size_t; typedef s32 compat_ssize_t; typedef s32 compat_off_t; -typedef s32 compat_time_t; typedef s32 compat_clock_t; typedef u32 compat_ino_t; typedef u32 compat_caddr_t; @@ -59,16 +58,6 @@ typedef unsigned long compat_elf_greg_t; #define COMPAT_ELF_NGREG (sizeof(struct pt_regs) / sizeof(compat_elf_greg_t)) typedef compat_elf_greg_t compat_elf_gregset_t[COMPAT_ELF_NGREG]; -struct compat_timespec { - compat_time_t tv_sec; - s32 tv_nsec; -}; - -struct compat_timeval { - compat_time_t tv_sec; - s32 tv_usec; -}; - #define compat_stat stat #define compat_statfs statfs diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c index 140d33288e78..6b8961912781 100644 --- a/arch/x86/events/core.c +++ b/arch/x86/events/core.c @@ -2391,7 +2391,7 @@ static unsigned long get_segment_base(unsigned int segment) #ifdef CONFIG_IA32_EMULATION -#include <asm/compat.h> +#include <linux/compat.h> static inline int perf_callchain_user32(struct pt_regs *regs, struct perf_callchain_entry_ctx *entry) diff --git a/arch/x86/include/asm/compat.h b/arch/x86/include/asm/compat.h index 2cbd75dd2fd3..160804ed875e 100644 --- a/arch/x86/include/asm/compat.h +++ b/arch/x86/include/asm/compat.h @@ -17,7 +17,6 @@ typedef u32 compat_size_t; typedef s32 compat_ssize_t; -typedef s32 compat_time_t; typedef s32 compat_clock_t; typedef s32 compat_pid_t; typedef u16 __compat_uid_t; @@ -46,16 +45,6 @@ typedef u32 compat_u32; typedef u64 __attribute__((aligned(4))) compat_u64; typedef u32 compat_uptr_t; -struct compat_timespec { - compat_time_t tv_sec; - s32 tv_nsec; -}; - -struct compat_timeval { - compat_time_t tv_sec; - s32 tv_usec; -}; - struct compat_stat { compat_dev_t st_dev; u16 __pad1; diff --git a/arch/x86/include/asm/ftrace.h b/arch/x86/include/asm/ftrace.h index 09ad88572746..db25aa15b705 100644 --- a/arch/x86/include/asm/ftrace.h +++ b/arch/x86/include/asm/ftrace.h @@ -49,7 +49,7 @@ int ftrace_int3_handler(struct pt_regs *regs); #if !defined(__ASSEMBLY__) && !defined(COMPILE_OFFSETS) #if defined(CONFIG_FTRACE_SYSCALLS) && defined(CONFIG_IA32_EMULATION) -#include <asm/compat.h> +#include <linux/compat.h> /* * Because ia32 syscalls do not map to x86_64 syscall numbers diff --git a/arch/x86/include/asm/sys_ia32.h b/arch/x86/include/asm/sys_ia32.h index 82c34ee25a65..8527b26ad36f 100644 --- a/arch/x86/include/asm/sys_ia32.h +++ b/arch/x86/include/asm/sys_ia32.h @@ -16,7 +16,7 @@ #include <linux/linkage.h> #include <linux/types.h> #include <linux/signal.h> -#include <asm/compat.h> +#include <linux/compat.h> #include <asm/ia32.h> /* ia32/sys_ia32.c */ diff --git a/arch/x86/kernel/sys_x86_64.c b/arch/x86/kernel/sys_x86_64.c index 676774b9bb8d..9d8ea652e31c 100644 --- a/arch/x86/kernel/sys_x86_64.c +++ b/arch/x86/kernel/sys_x86_64.c @@ -19,7 +19,7 @@ #include <linux/elf.h> #include <asm/elf.h> -#include <asm/compat.h> +#include <linux/compat.h> #include <asm/ia32.h> #include <asm/syscalls.h> #include <asm/mpx.h> diff --git a/drivers/s390/block/dasd_ioctl.c b/drivers/s390/block/dasd_ioctl.c index 7bdc6aaa0ba3..2016e0ed5865 100644 --- a/drivers/s390/block/dasd_ioctl.c +++ b/drivers/s390/block/dasd_ioctl.c @@ -18,7 +18,6 @@ #include <linux/fs.h> #include <linux/blkpg.h> #include <linux/slab.h> -#include <asm/compat.h> #include <asm/ccwdev.h> #include <asm/schid.h> #include <asm/cmb.h> diff --git a/drivers/s390/char/fs3270.c b/drivers/s390/char/fs3270.c index 61822480a2a0..16a4e8528bbc 100644 --- a/drivers/s390/char/fs3270.c +++ b/drivers/s390/char/fs3270.c @@ -19,7 +19,6 @@ #include <linux/slab.h> #include <linux/types.h> -#include <asm/compat.h> #include <asm/ccwdev.h> #include <asm/cio.h> #include <asm/ebcdic.h> diff --git a/drivers/s390/char/sclp_ctl.c b/drivers/s390/char/sclp_ctl.c index a78cea0c3a09..248b5db3eaa8 100644 --- a/drivers/s390/char/sclp_ctl.c +++ b/drivers/s390/char/sclp_ctl.c @@ -14,7 +14,6 @@ #include <linux/init.h> #include <linux/ioctl.h> #include <linux/fs.h> -#include <asm/compat.h> #include <asm/sclp_ctl.h> #include <asm/sclp.h> diff --git a/drivers/s390/char/vmcp.c b/drivers/s390/char/vmcp.c index 17e411c57576..948ce82a7725 100644 --- a/drivers/s390/char/vmcp.c +++ b/drivers/s390/char/vmcp.c @@ -23,7 +23,6 @@ #include <linux/mutex.h> #include <linux/cma.h> #include <linux/mm.h> -#include <asm/compat.h> #include <asm/cpcmd.h> #include <asm/debug.h> #include <asm/vmcp.h> diff --git a/drivers/s390/cio/chsc_sch.c b/drivers/s390/cio/chsc_sch.c index 0015729d917d..8d9f36625ba5 100644 --- a/drivers/s390/cio/chsc_sch.c +++ b/drivers/s390/cio/chsc_sch.c @@ -16,7 +16,6 @@ #include <linux/miscdevice.h> #include <linux/kernel_stat.h> -#include <asm/compat.h> #include <asm/cio.h> #include <asm/chsc.h> #include <asm/isc.h> diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c index 6abd3bc285e4..e070adf32cd4 100644 --- a/drivers/s390/net/qeth_core_main.c +++ b/drivers/s390/net/qeth_core_main.c @@ -32,7 +32,7 @@ #include <asm/chpid.h> #include <asm/io.h> #include <asm/sysinfo.h> -#include <asm/compat.h> +#include <linux/compat.h> #include <asm/diag.h> #include <asm/cio.h> #include <asm/ccwdev.h> diff --git a/include/linux/compat.h b/include/linux/compat.h index b24aaf66feb4..2f79dac5ed65 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h @@ -7,6 +7,7 @@ */ #include <linux/types.h> +#include <linux/compat_time.h> #include <linux/stat.h> #include <linux/param.h> /* for HZ */ diff --git a/include/linux/compat_time.h b/include/linux/compat_time.h new file mode 100644 index 000000000000..56a54a1e4355 --- /dev/null +++ b/include/linux/compat_time.h @@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_COMPAT_TIME_H +#define _LINUX_COMPAT_TIME_H + +#include <linux/types.h> + +typedef s32 compat_time_t; + +struct compat_timespec { + compat_time_t tv_sec; + s32 tv_nsec; +}; + +struct compat_timeval { + compat_time_t tv_sec; + s32 tv_usec; +}; + +#endif /* _LINUX_COMPAT_TIME_H */ -- 2.14.1 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH v3 02/10] include: Move compat_timespec/ timeval to compat_time.h 2018-01-16 2:18 ` [PATCH v3 02/10] include: Move compat_timespec/ timeval to compat_time.h Deepa Dinamani @ 2018-01-16 9:30 ` Catalin Marinas 2018-01-16 15:34 ` Steven Rostedt ` (3 subsequent siblings) 4 siblings, 0 replies; 12+ messages in thread From: Catalin Marinas @ 2018-01-16 9:30 UTC (permalink / raw) To: Deepa Dinamani Cc: tglx, john.stultz, linux-kernel, arnd, y2038, acme, benh, borntraeger, cmetcalf, cohuck, davem, deller, devel, gerald.schaefer, gregkh, heiko.carstens, hoeppner, hpa, jejb, jwi, linux-mips, linux-parisc, linuxppc-dev, linux-s390, mark.rutland, mingo, mpe, oberpar, oprofile-list, paulus, peterz, ralf, rostedt, rric, s On Mon, Jan 15, 2018 at 06:18:10PM -0800, Deepa Dinamani wrote: > All the current architecture specific defines for these > are the same. Refactor these common defines to a common > header file. > > The new common linux/compat_time.h is also useful as it > will eventually be used to hold all the defines that > are needed for compat time types that support non y2038 > safe types. New architectures need not have to define these > new types as they will only use new y2038 safe syscalls. > This file can be deleted after y2038 when we stop supporting > non y2038 safe syscalls. For arm64: Acked-by: Catalin Marinas <catalin.marinas@arm.com> ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v3 02/10] include: Move compat_timespec/ timeval to compat_time.h 2018-01-16 2:18 ` [PATCH v3 02/10] include: Move compat_timespec/ timeval to compat_time.h Deepa Dinamani 2018-01-16 9:30 ` Catalin Marinas @ 2018-01-16 15:34 ` Steven Rostedt 2018-03-02 21:57 ` James Hogan ` (2 subsequent siblings) 4 siblings, 0 replies; 12+ messages in thread From: Steven Rostedt @ 2018-01-16 15:34 UTC (permalink / raw) To: Deepa Dinamani Cc: mark.rutland, linux-mips, peterz, benh, heiko.carstens, paulus, hpa, sparclinux, devel, linux-s390, y2038, mpe, deller, x86, sebott, jejb, will.deacon, borntraeger, mingo, oprofile-list, catalin.marinas, rric, cmetcalf, arnd, oberpar, acme, jwi, john.stultz, tglx, ubraun, gerald.schaefer, linux-parisc, gregkh, cohuck, linux-kernel, ralf, hoeppner, sth T24gTW9uLCAxNSBKYW4gMjAxOCAxODoxODoxMCAtMDgwMApEZWVwYSBEaW5hbWFuaSA8ZGVlcGEu a2VybmVsQGdtYWlsLmNvbT4gd3JvdGU6Cgo+IGRpZmYgLS1naXQgYS9hcmNoL3g4Ni9pbmNsdWRl L2FzbS9mdHJhY2UuaCBiL2FyY2gveDg2L2luY2x1ZGUvYXNtL2Z0cmFjZS5oCj4gaW5kZXggMDlh ZDg4NTcyNzQ2Li5kYjI1YWExNWI3MDUgMTAwNjQ0Cj4gLS0tIGEvYXJjaC94ODYvaW5jbHVkZS9h c20vZnRyYWNlLmgKPiArKysgYi9hcmNoL3g4Ni9pbmNsdWRlL2FzbS9mdHJhY2UuaAoKQWNrZWQt Ynk6IFN0ZXZlbiBSb3N0ZWR0IChWTXdhcmUpIDxyb3N0ZWR0QGdvb2RtaXMub3JnPgoKLS0gU3Rl dmUKCj4gQEAgLTQ5LDcgKzQ5LDcgQEAgaW50IGZ0cmFjZV9pbnQzX2hhbmRsZXIoc3RydWN0IHB0 X3JlZ3MgKnJlZ3MpOwo+ICAjaWYgIWRlZmluZWQoX19BU1NFTUJMWV9fKSAmJiAhZGVmaW5lZChD T01QSUxFX09GRlNFVFMpCj4gIAo+ICAjaWYgZGVmaW5lZChDT05GSUdfRlRSQUNFX1NZU0NBTExT KSAmJiBkZWZpbmVkKENPTkZJR19JQTMyX0VNVUxBVElPTikKPiAtI2luY2x1ZGUgPGFzbS9jb21w YXQuaD4KPiArI2luY2x1ZGUgPGxpbnV4L2NvbXBhdC5oPgo+ICAKPiAgLyoKPiAgICogQmVjYXVz ZSBpYTMyIHN5c2NhbGxzIGRvIG5vdCBtYXAgdG8geDg2XzY0IHN5c2NhbGwgbnVtYmVycwpfX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fXwpZMjAzOCBtYWlsaW5n IGxpc3QKWTIwMzhAbGlzdHMubGluYXJvLm9yZwpodHRwczovL2xpc3RzLmxpbmFyby5vcmcvbWFp bG1hbi9saXN0aW5mby95MjAzOAo= ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v3 02/10] include: Move compat_timespec/ timeval to compat_time.h 2018-01-16 2:18 ` [PATCH v3 02/10] include: Move compat_timespec/ timeval to compat_time.h Deepa Dinamani 2018-01-16 9:30 ` Catalin Marinas 2018-01-16 15:34 ` Steven Rostedt @ 2018-03-02 21:57 ` James Hogan 2018-03-04 20:45 ` Helge Deller 2018-03-05 9:30 ` Christian Borntraeger 4 siblings, 0 replies; 12+ messages in thread From: James Hogan @ 2018-03-02 21:57 UTC (permalink / raw) To: Deepa Dinamani Cc: mark.rutland, linux-mips, peterz, benh, heiko.carstens, paulus, hpa, sparclinux, devel, linux-s390, y2038, mpe, deller, x86, sebott, jejb, will.deacon, borntraeger, mingo, oprofile-list, catalin.marinas, rric, cmetcalf, arnd, oberpar, acme, jwi, john.stultz, rostedt, tglx, ubraun, gerald.schaefer, linux-parisc, gregkh, cohuck, linux-kernel, ralf, hoeppner [-- Attachment #1.1: Type: text/plain, Size: 775 bytes --] On Mon, Jan 15, 2018 at 06:18:10PM -0800, Deepa Dinamani wrote: > All the current architecture specific defines for these > are the same. Refactor these common defines to a common > header file. > > The new common linux/compat_time.h is also useful as it > will eventually be used to hold all the defines that > are needed for compat time types that support non y2038 > safe types. New architectures need not have to define these > new types as they will only use new y2038 safe syscalls. > This file can be deleted after y2038 when we stop supporting > non y2038 safe syscalls. ... > arch/mips/include/asm/compat.h | 11 ----------- > arch/mips/kernel/signal32.c | 2 +- For MIPS: Acked-by: James Hogan <jhogan@kernel.org> Cheers James [-- Attachment #1.2: Digital signature --] [-- Type: application/pgp-signature, Size: 833 bytes --] [-- Attachment #2: Type: text/plain, Size: 169 bytes --] _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v3 02/10] include: Move compat_timespec/ timeval to compat_time.h 2018-01-16 2:18 ` [PATCH v3 02/10] include: Move compat_timespec/ timeval to compat_time.h Deepa Dinamani ` (2 preceding siblings ...) 2018-03-02 21:57 ` James Hogan @ 2018-03-04 20:45 ` Helge Deller 2018-03-05 9:30 ` Christian Borntraeger 4 siblings, 0 replies; 12+ messages in thread From: Helge Deller @ 2018-03-04 20:45 UTC (permalink / raw) To: Deepa Dinamani, tglx, john.stultz Cc: mark.rutland, linux-mips, peterz, benh, heiko.carstens, paulus, hpa, sparclinux, devel, linux-s390, y2038, mpe, ubraun, x86, sebott, jejb, will.deacon, borntraeger, mingo, oprofile-list, catalin.marinas, rric, cmetcalf, arnd, oberpar, acme, jwi, rostedt, gerald.schaefer, linux-parisc, gregkh, cohuck, linux-kernel, ralf, hoeppner, sth, schwidefsky, linuxppc-dev T24gMTYuMDEuMjAxOCAwMzoxOCwgRGVlcGEgRGluYW1hbmkgd3JvdGU6Cj4gQWxsIHRoZSBjdXJy ZW50IGFyY2hpdGVjdHVyZSBzcGVjaWZpYyBkZWZpbmVzIGZvciB0aGVzZQo+IGFyZSB0aGUgc2Ft ZS4gUmVmYWN0b3IgdGhlc2UgY29tbW9uIGRlZmluZXMgdG8gYSBjb21tb24KPiBoZWFkZXIgZmls ZS4KPiAKPiBUaGUgbmV3IGNvbW1vbiBsaW51eC9jb21wYXRfdGltZS5oIGlzIGFsc28gdXNlZnVs IGFzIGl0Cj4gd2lsbCBldmVudHVhbGx5IGJlIHVzZWQgdG8gaG9sZCBhbGwgdGhlIGRlZmluZXMg dGhhdAo+IGFyZSBuZWVkZWQgZm9yIGNvbXBhdCB0aW1lIHR5cGVzIHRoYXQgc3VwcG9ydCBub24g eTIwMzgKPiBzYWZlIHR5cGVzLiBOZXcgYXJjaGl0ZWN0dXJlcyBuZWVkIG5vdCBoYXZlIHRvIGRl ZmluZSB0aGVzZQo+IG5ldyB0eXBlcyBhcyB0aGV5IHdpbGwgb25seSB1c2UgbmV3IHkyMDM4IHNh ZmUgc3lzY2FsbHMuCj4gVGhpcyBmaWxlIGNhbiBiZSBkZWxldGVkIGFmdGVyIHkyMDM4IHdoZW4g d2Ugc3RvcCBzdXBwb3J0aW5nCj4gbm9uIHkyMDM4IHNhZmUgc3lzY2FsbHMuCgpGb3IgcGFyaXNj OgoKQWNrZWQtYnk6IEhlbGdlIERlbGxlciA8ZGVsbGVyQGdteC5kZT4gIyBwYXJpc2MKX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWTIwMzggbWFpbGluZyBs aXN0ClkyMDM4QGxpc3RzLmxpbmFyby5vcmcKaHR0cHM6Ly9saXN0cy5saW5hcm8ub3JnL21haWxt YW4vbGlzdGluZm8veTIwMzgK ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v3 02/10] include: Move compat_timespec/ timeval to compat_time.h 2018-01-16 2:18 ` [PATCH v3 02/10] include: Move compat_timespec/ timeval to compat_time.h Deepa Dinamani ` (3 preceding siblings ...) 2018-03-04 20:45 ` Helge Deller @ 2018-03-05 9:30 ` Christian Borntraeger 2018-03-06 12:46 ` Arnd Bergmann 4 siblings, 1 reply; 12+ messages in thread From: Christian Borntraeger @ 2018-03-05 9:30 UTC (permalink / raw) To: Deepa Dinamani, tglx, john.stultz Cc: linux-kernel, arnd, y2038, acme, benh, catalin.marinas, cmetcalf, cohuck, davem, deller, devel, gerald.schaefer, gregkh, heiko.carstens, hoeppner, hpa, jejb, jwi, linux-mips, linux-parisc, linuxppc-dev, linux-s390, mark.rutland, mingo, mpe, oberpar, oprofile-list, paulus, peterz, ralf, rostedt, rric, schwidefsky, sebott On 01/16/2018 03:18 AM, Deepa Dinamani wrote: > All the current architecture specific defines for these > are the same. Refactor these common defines to a common > header file. > > The new common linux/compat_time.h is also useful as it > will eventually be used to hold all the defines that > are needed for compat time types that support non y2038 > safe types. New architectures need not have to define these > new types as they will only use new y2038 safe syscalls. > This file can be deleted after y2038 when we stop supporting > non y2038 safe syscalls. You are now include a <linux/*.h> from several asm files ( arch/arm64/include/asm/stat.h arch/s390/include/asm/elf.h arch/x86/include/asm/ftrace.h arch/x86/include/asm/sys_ia32.h ) It works, and it is done in many places, but it looks somewhat weird. Would it make sense to have an asm-generic/compate-time.h instead? Asking for opinions here. > > The patch also requires an operation similar to: > > git grep "asm/compat\.h" | cut -d ":" -f 1 | xargs -n 1 sed -i -e "s%asm/compat.h%linux/compat.h%g" some comments from the s390 perspective: > --- a/arch/s390/hypfs/hypfs_sprp.c > +++ b/arch/s390/hypfs/hypfs_sprp.c ok. [...] > --- a/arch/s390/include/asm/elf.h > +++ b/arch/s390/include/asm/elf.h > @@ -126,7 +126,7 @@ > */ > > #include <asm/ptrace.h> > -#include <asm/compat.h> > +#include <linux/compat.h> > #include <asm/syscall.h> > #include <asm/user.h> see above. [...] > --- a/arch/s390/kvm/priv.c > +++ b/arch/s390/kvm/priv.c ok > --- a/arch/s390/pci/pci_clp.c > +++ b/arch/s390/pci/pci_clp.c ok > --- a/drivers/s390/block/dasd_ioctl.c > +++ b/drivers/s390/block/dasd_ioctl.c ok > --- a/drivers/s390/char/fs3270.c > +++ b/drivers/s390/char/fs3270.c ok > --- a/drivers/s390/char/sclp_ctl.c > +++ b/drivers/s390/char/sclp_ctl.c ok > --- a/drivers/s390/char/vmcp.c > +++ b/drivers/s390/char/vmcp.c ok > --- a/drivers/s390/cio/chsc_sch.c > +++ b/drivers/s390/cio/chsc_sch.c ok > --- a/drivers/s390/net/qeth_core_main.c > +++ b/drivers/s390/net/qeth_core_main.c > @@ -32,7 +32,7 @@ > #include <asm/chpid.h> > #include <asm/io.h> > #include <asm/sysinfo.h> > -#include <asm/compat.h> > +#include <linux/compat.h> > #include <asm/diag.h> > #include <asm/cio.h> > #include <asm/ccwdev.h> Can you move that into the other includes (where all the other <linux/*> includes are. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v3 02/10] include: Move compat_timespec/ timeval to compat_time.h 2018-03-05 9:30 ` Christian Borntraeger @ 2018-03-06 12:46 ` Arnd Bergmann 2018-03-06 12:48 ` Christian Borntraeger 0 siblings, 1 reply; 12+ messages in thread From: Arnd Bergmann @ 2018-03-06 12:46 UTC (permalink / raw) To: Christian Borntraeger Cc: Mark Rutland, open list:RALINK MIPS ARCHITECTURE, Peter Zijlstra, Catalin Marinas, Heiko Carstens, Paul Mackerras, Deepa Dinamani, H. Peter Anvin, sparclinux, devel, linux-s390, y2038 Mailman List, Helge Deller, the arch/x86 maintainers, sebott, James E.J. Bottomley, Ingo Molnar, oprofile-list, Peter Oberparleiter, Robert Richter, Chris Metcalf, Will Deacon, Arnaldo T24gTW9uLCBNYXIgNSwgMjAxOCBhdCAxMDozMCBBTSwgQ2hyaXN0aWFuIEJvcm50cmFlZ2VyCjxi b3JudHJhZWdlckBkZS5pYm0uY29tPiB3cm90ZToKPiBPbiAwMS8xNi8yMDE4IDAzOjE4IEFNLCBE ZWVwYSBEaW5hbWFuaSB3cm90ZToKPj4gQWxsIHRoZSBjdXJyZW50IGFyY2hpdGVjdHVyZSBzcGVj aWZpYyBkZWZpbmVzIGZvciB0aGVzZQo+PiBhcmUgdGhlIHNhbWUuIFJlZmFjdG9yIHRoZXNlIGNv bW1vbiBkZWZpbmVzIHRvIGEgY29tbW9uCj4+IGhlYWRlciBmaWxlLgo+Pgo+PiBUaGUgbmV3IGNv bW1vbiBsaW51eC9jb21wYXRfdGltZS5oIGlzIGFsc28gdXNlZnVsIGFzIGl0Cj4+IHdpbGwgZXZl bnR1Y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] 12+ messages in thread
* Re: [PATCH v3 02/10] include: Move compat_timespec/ timeval to compat_time.h 2018-03-06 12:46 ` Arnd Bergmann @ 2018-03-06 12:48 ` Christian Borntraeger 2018-03-06 22:58 ` Deepa Dinamani 0 siblings, 1 reply; 12+ messages in thread From: Christian Borntraeger @ 2018-03-06 12:48 UTC (permalink / raw) To: Arnd Bergmann Cc: Mark Rutland, open list:RALINK MIPS ARCHITECTURE, Peter Zijlstra, Catalin Marinas, Heiko Carstens, Paul Mackerras, Deepa Dinamani, H. Peter Anvin, sparclinux, devel, linux-s390, y2038 Mailman List, Helge Deller, the arch/x86 maintainers, sebott, James E.J. Bottomley, Ingo Molnar, oprofile-list, Peter Oberparleiter, Robert Richter, Chris Metcalf, Will Deacon, Arnaldo CgpPbiAwMy8wNi8yMDE4IDAxOjQ2IFBNLCBBcm5kIEJlcmdtYW5uIHdyb3RlOgo+IE9uIE1vbiwg TWFyIDUsIDIwMTggYXQgMTA6MzAgQU0sIENocmlzdGlhbiBCb3JudHJhZWdlcgo+IDxib3JudHJh ZWdlckBkZS5pYm0uY29tPiB3cm90ZToKPj4gT24gMDEvMTYvMjAxOCAwMzoxOCBBTSwgRGVlcGEg RGluYW1hbmkgd3JvdGU6Cj4+PiBBbGwgdGhlIGN1cnJlbnQgYXJjaGl0ZWN0dXJlIHNwZWNpZmlj IGRlZmluZXMgZm9yIHRoZXNlCj4+PiBhcmUgdGhlIHNhbWUuIFJlZmFjdG9yIHRoZXNlIGNvbW1v biBkZWZpbmVzIHRvIGEgY29tbW9uCj4+PiBoZWFkZXIgZmlsZS4KPj4+Cj4+PiBUaGUgbmV3IGNv bW1vbiBsaW51eC9jb21wYXRfdGltZS5oIGlzIGFsc28gdXNlZnVsIGFzIGl0Cj4+PiB3aWxsIGV2 ZW50dWFsbHkgYmUgdXNlZCB0byBob2xkIGFsbCB0aGUgZGVmaW5lcyB0aGF0Cj4+PiBhcmUgbmVl ZGVkIGZvciBjb21wYXQgdGltZSB0eXBlcyB0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0aW5mby95MjAzOAo= ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v3 02/10] include: Move compat_timespec/ timeval to compat_time.h 2018-03-06 12:48 ` Christian Borntraeger @ 2018-03-06 22:58 ` Deepa Dinamani 2018-03-12 17:59 ` Deepa Dinamani 0 siblings, 1 reply; 12+ messages in thread From: Deepa Dinamani @ 2018-03-06 22:58 UTC (permalink / raw) To: Christian Borntraeger Cc: Mark Rutland, open list:RALINK MIPS ARCHITECTURE, Peter Zijlstra, Catalin Marinas, Heiko Carstens, Paul Mackerras, H. Peter Anvin, sparclinux, devel, linux-s390, y2038 Mailman List, Helge Deller, the arch/x86 maintainers, sebott, James E.J. Bottomley, Ingo Molnar, oprofile-list, Peter Oberparleiter, Robert Richter, Chris Metcalf, Arnd Bergmann, Will Deacon, Arnaldo Carvalho de Melo On Tue, Mar 6, 2018 at 4:48 AM, Christian Borntraeger <borntraeger@de.ibm.com> wrote: > > > On 03/06/2018 01:46 PM, Arnd Bergmann wrote: >> On Mon, Mar 5, 2018 at 10:30 AM, Christian Borntraeger >> <borntraeger@de.ibm.com> wrote: >>> On 01/16/2018 03:18 AM, Deepa Dinamani wrote: >>>> All the current architecture specific defines for these >>>> are the same. Refactor these common defines to a common >>>> header file. >>>> >>>> The new common linux/compat_time.h is also useful as it >>>> will eventually be used to hold all the defines that >>>> are needed for compat time types that support non y2038 >>>> safe types. New architectures need not have to define these >>>> new types as they will only use new y2038 safe syscalls. >>>> This file can be deleted after y2038 when we stop supporting >>>> non y2038 safe syscalls. >>> >>> You are now include a <linux/*.h> from several asm files >>> ( >>> arch/arm64/include/asm/stat.h >>> arch/s390/include/asm/elf.h >>> arch/x86/include/asm/ftrace.h >>> arch/x86/include/asm/sys_ia32.h >>> ) >>> It works, and it is done in many places, but it looks somewhat weird. >>> Would it make sense to have an asm-generic/compate-time.h instead? Asking for >>> opinions here. >> >> I don't think we have such a rule. If a header file is common to all >> architectures (i.e. no architecture uses a different implementation), >> it should be in include/linux rather than include/asm-generic, regardless >> of whether it can be used by assembler files or not. >> >>>> --- a/drivers/s390/net/qeth_core_main.c >>>> +++ b/drivers/s390/net/qeth_core_main.c >>>> @@ -32,7 +32,7 @@ >>>> #include <asm/chpid.h> >>>> #include <asm/io.h> >>>> #include <asm/sysinfo.h> >>>> -#include <asm/compat.h> >>>> +#include <linux/compat.h> >>>> #include <asm/diag.h> >>>> #include <asm/cio.h> >>>> #include <asm/ccwdev.h> >>> >>> Can you move that into the other includes (where all the other <linux/*> includes are. >> >> Good catch, this is definitely a rule we have ;-) > > FWIW, this was also broken for > arch/x86/include/asm/sys_ia32.h The reason that this was done this way is because of the sed script mentioned in the commit text. I was trying to make minimal change apart from the script so that we don't have other changes like moving the lines to keep the patch simpler. I will fix this by hand since this is preferred. I will post an update. -Deepa ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v3 02/10] include: Move compat_timespec/ timeval to compat_time.h 2018-03-06 22:58 ` Deepa Dinamani @ 2018-03-12 17:59 ` Deepa Dinamani 0 siblings, 0 replies; 12+ messages in thread From: Deepa Dinamani @ 2018-03-12 17:59 UTC (permalink / raw) To: Christian Borntraeger Cc: Mark Rutland, open list:RALINK MIPS ARCHITECTURE, Peter Zijlstra, Catalin Marinas, Heiko Carstens, Paul Mackerras, H. Peter Anvin, sparclinux, devel, linux-s390, y2038 Mailman List, Helge Deller, the arch/x86 maintainers, sebott, James E.J. Bottomley, Ingo Molnar, oprofile-list, Peter Oberparleiter, Robert Richter, Chris Metcalf, Arnd Bergmann, Will Deacon, Arnaldo Carvalho de Melo I posted the updated series. I fixed up the order of include files where I could find some order. There have been other commits that used scripts to do such replacements and have already stomped on the order. For example: commit 7c0f6ba682b9c7632072ffbedf8d328c8f3c42ba Author: Linus Torvalds <torvalds@linux-foundation.org> Replace <asm/uaccess.h> with <linux/uaccess.h> globally -Deepa On Tue, Mar 6, 2018 at 2:58 PM, Deepa Dinamani <deepa.kernel@gmail.com> wrote: > On Tue, Mar 6, 2018 at 4:48 AM, Christian Borntraeger > <borntraeger@de.ibm.com> wrote: >> >> >> On 03/06/2018 01:46 PM, Arnd Bergmann wrote: >>> On Mon, Mar 5, 2018 at 10:30 AM, Christian Borntraeger >>> <borntraeger@de.ibm.com> wrote: >>>> On 01/16/2018 03:18 AM, Deepa Dinamani wrote: >>>>> All the current architecture specific defines for these >>>>> are the same. Refactor these common defines to a common >>>>> header file. >>>>> >>>>> The new common linux/compat_time.h is also useful as it >>>>> will eventually be used to hold all the defines that >>>>> are needed for compat time types that support non y2038 >>>>> safe types. New architectures need not have to define these >>>>> new types as they will only use new y2038 safe syscalls. >>>>> This file can be deleted after y2038 when we stop supporting >>>>> non y2038 safe syscalls. >>>> >>>> You are now include a <linux/*.h> from several asm files >>>> ( >>>> arch/arm64/include/asm/stat.h >>>> arch/s390/include/asm/elf.h >>>> arch/x86/include/asm/ftrace.h >>>> arch/x86/include/asm/sys_ia32.h >>>> ) >>>> It works, and it is done in many places, but it looks somewhat weird. >>>> Would it make sense to have an asm-generic/compate-time.h instead? Asking for >>>> opinions here. >>> >>> I don't think we have such a rule. If a header file is common to all >>> architectures (i.e. no architecture uses a different implementation), >>> it should be in include/linux rather than include/asm-generic, regardless >>> of whether it can be used by assembler files or not. >>> >>>>> --- a/drivers/s390/net/qeth_core_main.c >>>>> +++ b/drivers/s390/net/qeth_core_main.c >>>>> @@ -32,7 +32,7 @@ >>>>> #include <asm/chpid.h> >>>>> #include <asm/io.h> >>>>> #include <asm/sysinfo.h> >>>>> -#include <asm/compat.h> >>>>> +#include <linux/compat.h> >>>>> #include <asm/diag.h> >>>>> #include <asm/cio.h> >>>>> #include <asm/ccwdev.h> >>>> >>>> Can you move that into the other includes (where all the other <linux/*> includes are. >>> >>> Good catch, this is definitely a rule we have ;-) >> >> FWIW, this was also broken for >> arch/x86/include/asm/sys_ia32.h > > The reason that this was done this way is because of the sed script > mentioned in the commit text. > I was trying to make minimal change apart from the script so that we > don't have other changes like moving the lines to keep the patch > simpler. > I will fix this by hand since this is preferred. > I will post an update. > > -Deepa ^ permalink raw reply [flat|nested] 12+ messages in thread
[parent not found: <20180116021818.24791-1-deepa.kernel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH v3 00/10] posix_clocks: Prepare syscalls for 64 bit time_t conversion [not found] ` <20180116021818.24791-1-deepa.kernel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2018-01-16 15:18 ` Arnd Bergmann 0 siblings, 0 replies; 12+ messages in thread From: Arnd Bergmann @ 2018-01-16 15:18 UTC (permalink / raw) To: Deepa Dinamani Cc: Thomas Gleixner, John Stultz, Linux Kernel Mailing List, y2038 Mailman List, Arnaldo Carvalho de Melo, Benjamin Herrenschmidt, Christian Borntraeger, Catalin Marinas, Chris Metcalf, cohuck-H+wXaHxf7aLQT0dZR+AlfA, David Miller, Helge Deller, devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b, gerald.schaefer-tA70FqPdS9bQT0dZR+AlfA, gregkh, Heiko Carstens, Jan Hoeppner, H. Peter Anvin, James E.J. Bottomley, Julian On Tue, Jan 16, 2018 at 3:18 AM, Deepa Dinamani <deepa.kernel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > 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 [1] > > Big picture is as per the lwn article: > https://lwn.net/Articles/643234/ [2] > > 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 on 32 bit architectures. > 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. > 4. Add new CONFIG_32BIT_TIME to conditionally compile compat syscalls. This looks all good to me. I think we should have this included in linux-next as soon as possible, but this probably means after -rc1 at the current point, since it's a bit late for 4.16. I'll pick up the series into my randconfig build tree again to find possible build time regressions. Otherwise the way I'd stage it out is to put it into my y2038 branch after -rc1 and then send a pull request to Thomas for the tip tree a week later. It seems unlikely that any major problems come up, so we could plan to address additional requests for changes by adding commits on top once it's in linux-next. Arnd ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2018-03-12 17:59 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-16 2:18 [PATCH v3 00/10] posix_clocks: Prepare syscalls for 64 bit time_t conversion Deepa Dinamani
2018-01-16 2:18 ` [PATCH v3 02/10] include: Move compat_timespec/ timeval to compat_time.h Deepa Dinamani
2018-01-16 9:30 ` Catalin Marinas
2018-01-16 15:34 ` Steven Rostedt
2018-03-02 21:57 ` James Hogan
2018-03-04 20:45 ` Helge Deller
2018-03-05 9:30 ` Christian Borntraeger
2018-03-06 12:46 ` Arnd Bergmann
2018-03-06 12:48 ` Christian Borntraeger
2018-03-06 22:58 ` Deepa Dinamani
2018-03-12 17:59 ` Deepa Dinamani
[not found] ` <20180116021818.24791-1-deepa.kernel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-01-16 15:18 ` [PATCH v3 00/10] posix_clocks: Prepare syscalls for 64 bit time_t conversion Arnd Bergmann
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox