Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 May 2010 18:32:02 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/sys/amd64/amd64 elf_machdep.c trap.c src/sys/amd64/ia32 ia32_syscall.c src/sys/amd64/include proc.h src/sys/amd64/linux32 linux32_sysvec.c src/sys/arm/arm elf_machdep.c trap.c src/sys/cddl/dev/systrace systrace.c ...
Message-ID:  <201005231833.o4NIXcDK081887@repoman.freebsd.org>

index | next in thread | raw e-mail

kib         2010-05-23 18:32:02 UTC

  FreeBSD src repository

  Modified files:
    sys/amd64/amd64      elf_machdep.c trap.c 
    sys/amd64/ia32       ia32_syscall.c 
    sys/amd64/include    proc.h 
    sys/amd64/linux32    linux32_sysvec.c 
    sys/arm/arm          elf_machdep.c trap.c 
    sys/cddl/dev/systrace systrace.c 
    sys/compat/ia32      ia32_sysvec.c ia32_util.h 
    sys/compat/svr4      svr4_sysvec.c 
    sys/conf             files 
    sys/i386/i386        elf_machdep.c trap.c 
    sys/i386/ibcs2       ibcs2_sysvec.c 
    sys/i386/include     proc.h 
    sys/i386/linux       linux_sysvec.c 
    sys/ia64/ia32        ia32_trap.c 
    sys/ia64/ia64        elf_machdep.c trap.c 
    sys/ia64/include     proc.h 
    sys/kern             imgact_aout.c init_main.c kern_exec.c 
                         kern_sig.c subr_trap.c sys_process.c 
    sys/mips/mips        elf64_machdep.c elf_machdep.c trap.c 
    sys/powerpc/aim      trap.c 
    sys/powerpc/booke    trap.c 
    sys/powerpc/include  proc.h 
    sys/powerpc/powerpc  elf_machdep.c 
    sys/sparc64/include  proc.h 
    sys/sparc64/sparc64  elf_machdep.c trap.c 
    sys/sun4v/include    proc.h 
    sys/sun4v/sun4v      trap.c 
    sys/sys              proc.h ptrace.h sysent.h 
  Log:
  SVN rev 208453 on 2010-05-23 18:32:02Z by kib
  
  Reorganize syscall entry and leave handling.
  
  Extend struct sysvec with three new elements:
  sv_fetch_syscall_args - the method to fetch syscall arguments from
    usermode into struct syscall_args. The structure is machine-depended
    (this might be reconsidered after all architectures are converted).
  sv_set_syscall_retval - the method to set a return value for usermode
    from the syscall. It is a generalization of
    cpu_set_syscall_retval(9) to allow ABIs to override the way to set a
    return value.
  sv_syscallnames - the table of syscall names.
  
  Use sv_set_syscall_retval in kern_sigsuspend() instead of hardcoding
  the call to cpu_set_syscall_retval().
  
  The new functions syscallenter(9) and syscallret(9) are provided that
  use sv_*syscall* pointers and contain the common repeated code from
  the syscall() implementations for the architecture-specific syscall
  trap handlers.
  
  Syscallenter() fetches arguments, calls syscall implementation from
  ABI sysent table, and set up return frame. The end of syscall
  bookkeeping is done by syscallret().
  
  Take advantage of single place for MI syscall handling code and
  implement ptrace_lwpinfo pl_flags PL_FLAG_SCE, PL_FLAG_SCX and
  PL_FLAG_EXEC. The SCE and SCX flags notify the debugger that the
  thread is stopped at syscall entry or return point respectively.  The
  EXEC flag augments SCX and notifies debugger that the process address
  space was changed by one of exec(2)-family syscalls.
  
  The i386, amd64, sparc64, sun4v, powerpc and ia64 syscall()s are
  changed to use syscallenter()/syscallret(). MIPS and arm are not
  converted and use the mostly unchanged syscall() implementation.
  
  Reviewed by:    jhb, marcel, marius, nwhitehorn, stas
  Tested by:      marcel (ia64), marius (sparc64), nwhitehorn (powerpc),
          stas (mips)
  MFC after:      1 month
  
  Revision  Changes    Path
  1.34      +5 -1      src/sys/amd64/amd64/elf_machdep.c
  1.344     +19 -138   src/sys/amd64/amd64/trap.c
  1.22      +38 -122   src/sys/amd64/ia32/ia32_syscall.c
  1.29      +8 -0      src/sys/amd64/include/proc.h
  1.57      +31 -16    src/sys/amd64/linux32/linux32_sysvec.c
  1.15      +5 -1      src/sys/arm/arm/elf_machdep.c
  1.42      +0 -1      src/sys/arm/arm/trap.c
  1.3       +0 -1      src/sys/cddl/dev/systrace/systrace.c
  1.38      +6 -1      src/sys/compat/ia32/ia32_sysvec.c
  1.10      +4 -0      src/sys/compat/ia32/ia32_util.h
  1.51      +4 -1      src/sys/compat/svr4/svr4_sysvec.c
  1.1517    +1 -1      src/sys/conf/files
  1.31      +5 -1      src/sys/i386/i386/elf_machdep.c
  1.329     +25 -139   src/sys/i386/i386/trap.c
  1.35      +4 -1      src/sys/i386/ibcs2/ibcs2_sysvec.c
  1.31      +8 -0      src/sys/i386/include/proc.h
  1.171     +36 -18    src/sys/i386/linux/linux_sysvec.c
  1.15      +75 -107   src/sys/ia64/ia32/ia32_trap.c
  1.33      +4 -1      src/sys/ia64/ia64/elf_machdep.c
  1.137     +42 -93    src/sys/ia64/ia64/trap.c
  1.19      +10 -0     src/sys/ia64/include/proc.h
  1.107     +4 -0      src/sys/kern/imgact_aout.c
  1.310     +20 -1     src/sys/kern/init_main.c
  1.347     +4 -0      src/sys/kern/kern_exec.c
  1.390     +1 -1      src/sys/kern/kern_sig.c
  1.311     +162 -0    src/sys/kern/subr_trap.c
  1.166     +6 -2      src/sys/kern/sys_process.c
  1.5       +5 -1      src/sys/mips/mips/elf64_machdep.c
  1.13      +9 -2      src/sys/mips/mips/elf_machdep.c
  1.13      +0 -1      src/sys/mips/mips/trap.c
  1.81      +37 -88    src/sys/powerpc/aim/trap.c
  1.7       +34 -86    src/sys/powerpc/booke/trap.c
  1.10      +10 -0     src/sys/powerpc/include/proc.h
  1.31      +4 -1      src/sys/powerpc/powerpc/elf_machdep.c
  1.17      +12 -0     src/sys/sparc64/include/proc.h
  1.31      +5 -1      src/sys/sparc64/sparc64/elf_machdep.c
  1.104     +14 -109   src/sys/sparc64/sparc64/trap.c
  1.4       +12 -0     src/sys/sun4v/include/proc.h
  1.22      +51 -106   src/sys/sun4v/sun4v/trap.c
  1.548     +8 -0      src/sys/sys/proc.h
  1.32      +3 -0      src/sys/sys/ptrace.h
  1.65      +6 -0      src/sys/sys/sysent.h


help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201005231833.o4NIXcDK081887>