1. 29 8月, 2018 4 次提交
    • A
      asm-generic: Remove empty asm/unistd.h · c5ba7e6c
      Arnd Bergmann 提交于
      Nothing is left in asm/unistd.h except for the redirect to
      uapi/asm/unistd.h, so removing the file simply leads to that one being
      used directly.  The linux/export.h inclusion is a leftover from commit
      e1b5bb6d ("consolidate cond_syscall and SYSCALL_ALIAS declarations")
      and should not be used anyway.
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      c5ba7e6c
    • A
      asm-generic: Remove unneeded __ARCH_WANT_SYS_LLSEEK macro · caf6f9c8
      Arnd Bergmann 提交于
      The sys_llseek sytem call is needed on all 32-bit architectures and
      none of the 64-bit ones, so we can remove the __ARCH_WANT_SYS_LLSEEK guard
      and simplify the include/asm-generic/unistd.h header further.
      
      Since 32-bit tasks can run either natively or in compat mode on 64-bit
      architectures, we have to check for both !CONFIG_64BIT and CONFIG_COMPAT.
      
      There are a few 64-bit architectures that also reference sys_llseek
      in their 64-bit ABI (e.g. sparc), but I verified that those all
      select CONFIG_COMPAT, so the #if check is still correct here. It's
      a bit odd to include it in the syscall table though, as it's the
      same as sys_lseek() on 64-bit, but with strange calling conventions.
      Acked-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      caf6f9c8
    • A
      asm-generic: Move common compat types to asm-generic/compat.h · fb373975
      Arnd Bergmann 提交于
      While converting compat system call handlers to work on 32-bit
      architectures, I found a number of types used in those handlers
      that are identical between all architectures.
      
      Let's move all the identical ones into asm-generic/compat.h to avoid
      having to add even more identical definitions of those types.
      
      For unknown reasons, mips defines __compat_gid32_t, __compat_uid32_t
      and compat_caddr_t as signed, while all others have them unsigned.
      This seems to be a mistake, but I'm leaving it alone here. The other
      types all differ by size or alignment on at least on architecture.
      
      compat_aio_context_t is currently defined in linux/compat.h but
      also needed for compat_sys_io_getevents(), so let's move it into
      the same place.
      
      While we still have not decided whether the 32-bit time handling
      will always use the compat syscalls, or in which form, I think this
      is a useful cleanup that we can merge regardless.
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      fb373975
    • A
      y2038: Remove stat64 family from default syscall set · bf4b6a7d
      Arnd Bergmann 提交于
      New architectures should no longer need stat64, which is not y2038
      safe and has been replaced by statx(). This removes the 'select
      __ARCH_WANT_STAT64' statement from asm-generic/unistd.h and instead
      moves it into the respective asm/unistd.h UAPI header files for each
      architecture that uses it today.
      
      In the generic file, the system call number and entry points are now
      made conditional, so newly added architectures (e.g. riscv32 or csky)
      will never need to carry backwards compatiblity for it.
      
      arm64 is the only 64-bit architecture using the asm-generic/unistd.h
      file, and it already sets __ARCH_WANT_NEW_STAT in its headers, and I
      use the same #ifdef here: future 64-bit architectures therefore won't
      see newstat or stat64 any more. They don't suffer from the y2038 time_t
      overflow, but for consistency it seems best to also let them use statx().
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      bf4b6a7d
  2. 27 8月, 2018 3 次提交
    • A
      y2038: globally rename compat_time to old_time32 · 9afc5eee
      Arnd Bergmann 提交于
      Christoph Hellwig suggested a slightly different path for handling
      backwards compatibility with the 32-bit time_t based system calls:
      
      Rather than simply reusing the compat_sys_* entry points on 32-bit
      architectures unchanged, we get rid of those entry points and the
      compat_time types by renaming them to something that makes more sense
      on 32-bit architectures (which don't have a compat mode otherwise),
      and then share the entry points under the new name with the 64-bit
      architectures that use them for implementing the compatibility.
      
      The following types and interfaces are renamed here, and moved
      from linux/compat_time.h to linux/time32.h:
      
      old				new
      ---				---
      compat_time_t			old_time32_t
      struct compat_timeval		struct old_timeval32
      struct compat_timespec		struct old_timespec32
      struct compat_itimerspec	struct old_itimerspec32
      ns_to_compat_timeval()		ns_to_old_timeval32()
      get_compat_itimerspec64()	get_old_itimerspec32()
      put_compat_itimerspec64()	put_old_itimerspec32()
      compat_get_timespec64()		get_old_timespec32()
      compat_put_timespec64()		put_old_timespec32()
      
      As we already have aliases in place, this patch addresses only the
      instances that are relevant to the system call interface in particular,
      not those that occur in device drivers and other modules. Those
      will get handled separately, while providing the 64-bit version
      of the respective interfaces.
      
      I'm not renaming the timex, rusage and itimerval structures, as we are
      still debating what the new interface will look like, and whether we
      will need a replacement at all.
      
      This also doesn't change the names of the syscall entry points, which can
      be done more easily when we actually switch over the 32-bit architectures
      to use them, at that point we need to change COMPAT_SYSCALL_DEFINEx to
      SYSCALL_DEFINEx with a new name, e.g. with a _time32 suffix.
      Suggested-by: NChristoph Hellwig <hch@infradead.org>
      Link: https://lore.kernel.org/lkml/20180705222110.GA5698@infradead.org/Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      9afc5eee
    • A
      y2038: make do_gettimeofday() and get_seconds() inline · 33e26418
      Arnd Bergmann 提交于
      get_seconds() and do_gettimeofday() are only used by a few modules now any
      more (waiting for the respective patches to get accepted), and they are
      among the last holdouts of code that is not y2038 safe in the core kernel.
      
      Move the implementation into the timekeeping32.h header to clean up
      the core kernel and isolate the old interfaces further.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      33e26418
    • A
      y2038: remove unused time interfaces · 97651640
      Arnd Bergmann 提交于
      After many small patches, at least some of the deprecated interfaces
      have no remaining users any more and can be removed:
      
        current_kernel_time
        do_settimeofday
        get_monotonic_boottime
        get_monotonic_boottime64
        get_monotonic_coarse
        get_monotonic_coarse64
        getrawmonotonic64
        ktime_get_real_ts
        timekeeping_clocktai
        timespec_trunc
        timespec_valid_strict
        time_to_tm
      
      For many of the remaining time functions, we are missing one or
      two patches that failed to make it into 4.19, they will be removed
      in the following merge window.
      
      The replacement functions for the removed interfaces are documented in
      Documentation/core-api/timekeeping.rst.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      97651640
  3. 24 8月, 2018 7 次提交
  4. 23 8月, 2018 26 次提交