lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180314040333.3291-1-deepa.kernel@gmail.com>
Date:   Tue, 13 Mar 2018 21:03:23 -0700
From:   Deepa Dinamani <deepa.kernel@...il.com>
To:     arnd@...db.de, tglx@...utronix.de, john.stultz@...aro.org
Cc:     linux-kernel@...r.kernel.org, y2038@...ts.linaro.org,
        acme@...nel.org, benh@...nel.crashing.org, borntraeger@...ibm.com,
        catalin.marinas@....com, cmetcalf@...lanox.com, cohuck@...hat.com,
        davem@...emloft.net, deller@....de, devel@...verdev.osuosl.org,
        gerald.schaefer@...ibm.com, gregkh@...uxfoundation.org,
        heiko.carstens@...ibm.com, hoeppner@...ux.vnet.ibm.com,
        hpa@...or.com, jejb@...isc-linux.org, jwi@...ux.vnet.ibm.com,
        linux-api@...r.kernel.org, linux-arch@...r.kernel.org,
        linux-mips@...ux-mips.org, linux-parisc@...r.kernel.org,
        linuxppc-dev@...ts.ozlabs.org, linux-s390@...r.kernel.org,
        mark.rutland@....com, mingo@...hat.com, mpe@...erman.id.au,
        oberpar@...ux.vnet.ibm.com, oprofile-list@...ts.sf.net,
        paulus@...ba.org, peterz@...radead.org, ralf@...ux-mips.org,
        rostedt@...dmis.org, rric@...nel.org, schwidefsky@...ibm.com,
        sebott@...ux.vnet.ibm.com, sparclinux@...r.kernel.org,
        sth@...ux.vnet.ibm.com, ubraun@...ux.vnet.ibm.com,
        will.deacon@....com, x86@...nel.org
Subject: [PATCH v5 00/10] posix_clocks: Prepare syscalls for 64 bit time_t conversion

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]

Thomas, Arnd, this seems ready to be merged now.
Can you help get this merged?

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 v4:
 * Fixed up kbuild errors for arm64 and powerpc non compat configs
* Changes since v3:
 * Updated include file ordering
* 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/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      |  1 +
 arch/s390/hypfs/hypfs_sprp.c           |  1 -
 arch/s390/include/asm/compat.h         | 11 -------
 arch/s390/include/asm/elf.h            |  4 +--
 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 +++++++++++++++++++++++++++++++---
 42 files changed, 177 insertions(+), 188 deletions(-)
 create mode 100644 include/linux/compat_time.h


base-commit: 61530b14b059d4838dcc2186e9de9d57e195ce55
-- 
2.14.1

Cc: acme@...nel.org
Cc: benh@...nel.crashing.org
Cc: borntraeger@...ibm.com
Cc: catalin.marinas@....com
Cc: cmetcalf@...lanox.com
Cc: cohuck@...hat.com
Cc: davem@...emloft.net
Cc: deller@....de
Cc: devel@...verdev.osuosl.org
Cc: gerald.schaefer@...ibm.com
Cc: gregkh@...uxfoundation.org
Cc: heiko.carstens@...ibm.com
Cc: hoeppner@...ux.vnet.ibm.com
Cc: hpa@...or.com
Cc: jejb@...isc-linux.org
Cc: jwi@...ux.vnet.ibm.com
Cc: linux-api@...r.kernel.org
Cc: linux-arch@...r.kernel.org
Cc: linux-kernel@...r.kernel.org
Cc: linux-mips@...ux-mips.org
Cc: linux-parisc@...r.kernel.org
Cc: linuxppc-dev@...ts.ozlabs.org
Cc: linux-s390@...r.kernel.org
Cc: mark.rutland@....com
Cc: mingo@...hat.com
Cc: mpe@...erman.id.au
Cc: oberpar@...ux.vnet.ibm.com
Cc: oprofile-list@...ts.sf.net
Cc: paulus@...ba.org
Cc: peterz@...radead.org
Cc: ralf@...ux-mips.org
Cc: rostedt@...dmis.org
Cc: rric@...nel.org
Cc: schwidefsky@...ibm.com
Cc: sebott@...ux.vnet.ibm.com
Cc: sparclinux@...r.kernel.org
Cc: sth@...ux.vnet.ibm.com
Cc: ubraun@...ux.vnet.ibm.com
Cc: will.deacon@....com
Cc: x86@...nel.org

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ