Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Jan 2010 11:45:35 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/sys/amd64/amd64 trap.c src/sys/amd64/ia32 ia32_syscall.c src/sys/i386/i386 trap.c src/sys/kern sys_process.c src/sys/sys proc.h
Message-ID:  <201001231146.o0NBk1e2038661@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
kib         2010-01-23 11:45:35 UTC

  FreeBSD src repository

  Modified files:
    sys/amd64/amd64      trap.c 
    sys/amd64/ia32       ia32_syscall.c 
    sys/i386/i386        trap.c 
    sys/kern             sys_process.c 
    sys/sys              proc.h 
  Log:
  SVN rev 202882 on 2010-01-23 11:45:35Z by kib
  
  For PT_TO_SCE stop that stops the ptraced process upon syscall entry,
  syscall arguments are collected before ptracestop() is called. As a
  consequence, debugger cannot modify syscall or its arguments.
  
  For i386, amd64 and ia32 on amd64 MD syscall(), reread syscall number
  and arguments after ptracestop(), if debugger modified anything in the
  process environment. Since procfs stopeven requires number of syscall
  arguments in p_xstat, this cannot be solved by moving stop/trace point
  before argument fetching.
  
  Move the code to read arguments into separate function
  fetch_syscall_args() to avoid code duplication. Note that ktrace point
  for modified syscall is intentionally recorded twice, once with original
  arguments, and second time with the arguments set by debugger.
  
  PT_TO_SCX stop is executed after cpu_syscall_set_retval() already.
  
  Reported by:    Ali Polatel <alip exherbo org>
  Briefly discussed with: jhb
  MFC after:      3 weeks
  
  Revision  Changes    Path
  1.339     +107 -69   src/sys/amd64/amd64/trap.c
  1.21      +93 -56    src/sys/amd64/ia32/ia32_syscall.c
  1.326     +100 -65   src/sys/i386/i386/trap.c
  1.159     +5 -0      src/sys/kern/sys_process.c
  1.544     +1 -0      src/sys/sys/proc.h



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