1. 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
  2. 11 7月, 2018 1 次提交
  3. 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
  4. 22 3月, 2017 1 次提交
  5. 02 6月, 2016 1 次提交
  6. 14 10月, 2015 1 次提交
  7. 19 3月, 2015 1 次提交
  8. 13 1月, 2015 1 次提交
  9. 28 11月, 2014 1 次提交
  10. 06 11月, 2014 1 次提交
  11. 19 8月, 2014 1 次提交
  12. 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
  13. 23 4月, 2014 2 次提交
  14. 05 2月, 2014 1 次提交
  15. 10 5月, 2013 1 次提交
  16. 25 2月, 2013 1 次提交
  17. 24 2月, 2013 1 次提交
  18. 14 2月, 2013 2 次提交
  19. 16 1月, 2013 1 次提交
  20. 05 12月, 2012 1 次提交
  21. 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
  22. 29 11月, 2012 1 次提交
  23. 23 10月, 2012 1 次提交
  24. 17 10月, 2012 1 次提交
  25. 11 10月, 2012 2 次提交
  26. 08 10月, 2012 1 次提交
  27. 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
  28. 17 9月, 2012 1 次提交