1. 17 5月, 2019 1 次提交
  2. 15 4月, 2019 1 次提交
  3. 07 2月, 2019 2 次提交
    • A
      y2038: add 64-bit time_t syscalls to all 32-bit architectures · 48166e6e
      Arnd Bergmann 提交于
      This adds 21 new system calls on each ABI that has 32-bit time_t
      today. All of these have the exact same semantics as their existing
      counterparts, and the new ones all have macro names that end in 'time64'
      for clarification.
      
      This gets us to the point of being able to safely use a C library
      that has 64-bit time_t in user space. There are still a couple of
      loose ends to tie up in various areas of the code, but this is the
      big one, and should be entirely uncontroversial at this point.
      
      In particular, there are four system calls (getitimer, setitimer,
      waitid, and getrusage) that don't have a 64-bit counterpart yet,
      but these can all be safely implemented in the C library by wrapping
      around the existing system calls because the 32-bit time_t they
      pass only counts elapsed time, not time since the epoch. They
      will be dealt with later.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Acked-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Acked-by: NCatalin Marinas <catalin.marinas@arm.com>
      48166e6e
    • A
      y2038: syscalls: rename y2038 compat syscalls · 8dabe724
      Arnd Bergmann 提交于
      A lot of system calls that pass a time_t somewhere have an implementation
      using a COMPAT_SYSCALL_DEFINEx() on 64-bit architectures, and have
      been reworked so that this implementation can now be used on 32-bit
      architectures as well.
      
      The missing step is to redefine them using the regular SYSCALL_DEFINEx()
      to get them out of the compat namespace and make it possible to build them
      on 32-bit architectures.
      
      Any system call that ends in 'time' gets a '32' suffix on its name for
      that version, while the others get a '_time32' suffix, to distinguish
      them from the normal version, which takes a 64-bit time argument in the
      future.
      
      In this step, only 64-bit architectures are changed, doing this rename
      first lets us avoid touching the 32-bit architectures twice.
      Acked-by: NCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      8dabe724
  4. 26 1月, 2019 3 次提交
    • A
      ipc: rename old-style shmctl/semctl/msgctl syscalls · 275f2214
      Arnd Bergmann 提交于
      The behavior of these system calls is slightly different between
      architectures, as determined by the CONFIG_ARCH_WANT_IPC_PARSE_VERSION
      symbol. Most architectures that implement the split IPC syscalls don't set
      that symbol and only get the modern version, but alpha, arm, microblaze,
      mips-n32, mips-n64 and xtensa expect the caller to pass the IPC_64 flag.
      
      For the architectures that so far only implement sys_ipc(), i.e. m68k,
      mips-o32, powerpc, s390, sh, sparc, and x86-32, we want the new behavior
      when adding the split syscalls, so we need to distinguish between the
      two groups of architectures.
      
      The method I picked for this distinction is to have a separate system call
      entry point: sys_old_*ctl() now uses ipc_parse_version, while sys_*ctl()
      does not. The system call tables of the five architectures are changed
      accordingly.
      
      As an additional benefit, we no longer need the configuration specific
      definition for ipc_parse_version(), it always does the same thing now,
      but simply won't get called on architectures with the modern interface.
      
      A small downside is that on architectures that do set
      ARCH_WANT_IPC_PARSE_VERSION, we now have an extra set of entry points
      that are never called. They only add a few bytes of bloat, so it seems
      better to keep them compared to adding yet another Kconfig symbol.
      I considered adding new syscall numbers for the IPC_64 variants for
      consistency, but decided against that for now.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      275f2214
    • A
      ARM: add kexec_file_load system call number · 4ab65ba7
      Arnd Bergmann 提交于
      A couple of architectures including arm64 already implement the
      kexec_file_load system call, on many others we have assigned a system
      call number for it, but not implemented it yet.
      
      Adding the number in arch/arm/ lets us use the system call on arm64
      systems in compat mode, and also reduces the number of differences
      between architectures. If we want to implement kexec_file_load on ARM
      in the future, the number assignment means that kexec tools can already
      be built with the now current set of kernel headers.
      Acked-by: NCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      4ab65ba7
    • A
      ARM: add migrate_pages() system call · 78594b95
      Arnd Bergmann 提交于
      The migrate_pages system call has an assigned number on all architectures
      except ARM. When it got added initially in commit d80ade7b ("ARM:
      Fix warning: #warning syscall migrate_pages not implemented"), it was
      intentionally left out based on the observation that there are no 32-bit
      ARM NUMA systems.
      
      However, there are now arm64 NUMA machines that can in theory run 32-bit
      kernels (actually enabling NUMA there would require additional work)
      as well as 32-bit user space on 64-bit kernels, so that argument is no
      longer very strong.
      
      Assigning the number lets us use the system call on 64-bit kernels as well
      as providing a more consistent set of syscalls across architectures.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NCatalin Marinas <catalin.marinas@arm.com>
      78594b95
  5. 04 1月, 2019 1 次提交
  6. 12 7月, 2018 2 次提交
    • M
      arm64: convert compat wrappers to C · 55f84926
      Mark Rutland 提交于
      In preparation for converting to pt_regs syscall wrappers, convert our
      existing compat wrappers to C. This will allow the pt_regs wrappers to
      be automatically generated, and will allow for the compat register
      manipulation to be folded in with the pt_regs accesses.
      
      To avoid confusion with the upcoming pt_regs wrappers and existing
      compat wrappers provided by core code, the C wrappers are renamed to
      compat_sys_aarch32_<syscall>.
      
      With the assembly wrappers gone, we can get rid of entry32.S and the
      associated boilerplate.
      
      Note that these must call the ksys_* syscall entry points, as the usual
      sys_* entry points will be modified to take a single pt_regs pointer
      argument.
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Acked-by: NCatalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      55f84926
    • M
      arm64: remove sigreturn wrappers · 3085e164
      Mark Rutland 提交于
      The arm64 sigreturn* syscall handlers are non-standard. Rather than
      taking a number of user parameters in registers as per the AAPCS,
      they expect the pt_regs as their sole argument.
      
      To make this work, we override the syscall definitions to invoke
      wrappers written in assembly, which mov the SP into x0, and branch to
      their respective C functions.
      
      On other architectures (such as x86), the sigreturn* functions take no
      argument and instead use current_pt_regs() to acquire the user
      registers. This requires less boilerplate code, and allows for other
      features such as interposing C code in this path.
      
      This patch takes the same approach for arm64.
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Tentatively-reviewed-by: NDave Martin <dave.martin@arm.com>
      Reviewed-by: NCatalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      3085e164
  7. 11 7月, 2018 1 次提交
  8. 18 4月, 2017 1 次提交
    • A
      Remove compat_sys_getdents64() · 2611dc19
      Al Viro 提交于
      Unlike normal compat syscall variants, it is needed only for
      biarch architectures that have different alignement requirements for
      u64 in 32bit and 64bit ABI *and* have __put_user() that won't handle
      a store of 64bit value at 32bit-aligned address.  We used to have one
      such (ia64), but its biarch support has been gone since 2010 (after
      being broken in 2008, which went unnoticed since nobody had been using
      it).
      
      It had escaped removal at the same time only because back in 2004
      a patch that switched several syscalls on amd64 from private wrappers to
      generic compat ones had switched to use of compat_sys_getdents64(), which
      hadn't needed (or used) a compat wrapper on amd64.
      
      Let's bury it - it's at least 7 years overdue.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      2611dc19
  9. 22 3月, 2017 1 次提交
  10. 02 6月, 2016 1 次提交
  11. 14 10月, 2015 1 次提交
  12. 19 3月, 2015 1 次提交
  13. 13 1月, 2015 1 次提交
  14. 28 11月, 2014 1 次提交
  15. 06 11月, 2014 1 次提交
  16. 19 8月, 2014 1 次提交
  17. 10 7月, 2014 1 次提交
    • C
      arm64: Add __NR_* definitions for compat syscalls · f3e5c847
      Catalin Marinas 提交于
      This patch adds __NR_* definitions to asm/unistd32.h, moves the
      __NR_compat_* definitions to asm/unistd.h and removes all the explicit
      unistd32.h includes apart from the one building the compat syscall
      table. The aim is to have the compat __NR_* definitions available but
      without colliding with the native syscall definitions (required by
      lib/compat_audit.c to avoid duplicating the audit header files between
      native and compat).
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      f3e5c847
  18. 23 4月, 2014 2 次提交
  19. 05 2月, 2014 1 次提交
  20. 10 5月, 2013 1 次提交
  21. 25 2月, 2013 1 次提交
  22. 24 2月, 2013 1 次提交
  23. 14 2月, 2013 2 次提交
  24. 16 1月, 2013 1 次提交
  25. 05 12月, 2012 1 次提交
  26. 03 12月, 2012 1 次提交
    • A
      open*(2) compat fixes (s390, arm64) · 9d73fc2d
      Al Viro 提交于
      The usual rules for open()/openat()/open_by_handle_at() are
       1) native 32bit - don't force O_LARGEFILE in flags
       2) native 64bit - force O_LARGEFILE in flags
       3) compat on 64bit host - as for native 32bit
       4) native 32bit ABI for 64bit system (mips/n32, x86/x32) - as for
          native 64bit
      
      There are only two exceptions - s390 compat has open() forcing
      O_LARGEFILE and arm64 compat has open_by_handle_at() doing the same
      thing.  The same binaries on native host (s390/31 and arm resp.) will
      *not* force O_LARGEFILE, so IMO both are emulation bugs.
      
      Objections? The fix is obvious...
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      9d73fc2d
  27. 29 11月, 2012 1 次提交
  28. 23 10月, 2012 1 次提交
  29. 17 10月, 2012 1 次提交
  30. 11 10月, 2012 2 次提交
  31. 08 10月, 2012 1 次提交
  32. 04 10月, 2012 1 次提交
    • D
      UAPI: Fix the guards on various asm/unistd.h files · 89013952
      David Howells 提交于
      asm-generic/unistd.h and a number of asm/unistd.h files have been given
      reinclusion guards that allow the guard to be overridden if __SYSCALL is
      defined.  Unfortunately, these files define __SYSCALL and don't undefine it
      when they've finished with it, thus rendering the guard ineffective.
      
      The reason for this override is to allow the file to be #included multiple
      times with different settings on __SYSCALL for purposes like generating syscall
      tables.
      
      The following guards are problematic:
      
      arch/arm64/include/asm/unistd.h:#if !defined(__ASM_UNISTD_H) || defined(__SYSCALL)
      arch/arm64/include/asm/unistd32.h:#if !defined(__ASM_UNISTD32_H) || defined(__SYSCALL)
      arch/c6x/include/asm/unistd.h:#if !defined(_ASM_C6X_UNISTD_H) || defined(__SYSCALL)
      arch/hexagon/include/asm/unistd.h:#if !defined(_ASM_HEXAGON_UNISTD_H) || defined(__SYSCALL)
      arch/openrisc/include/asm/unistd.h:#if !defined(__ASM_OPENRISC_UNISTD_H) || defined(__SYSCALL)
      arch/score/include/asm/unistd.h:#if !defined(_ASM_SCORE_UNISTD_H) || defined(__SYSCALL)
      arch/tile/include/asm/unistd.h:#if !defined(_ASM_TILE_UNISTD_H) || defined(__SYSCALL)
      arch/unicore32/include/asm/unistd.h:#if !defined(__UNICORE_UNISTD_H__) || defined(__SYSCALL)
      include/asm-generic/unistd.h:#if !defined(_ASM_GENERIC_UNISTD_H) || defined(__SYSCALL)
      
      On the assumption that the guards' ineffectiveness has passed unnoticed, just
      remove these guards entirely.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NCatalin Marinas <catalin.marinas@arm.com>
      89013952
  33. 17 9月, 2012 1 次提交