Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Oct 2009 10:55:34 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/lib/libc/gen pselect.c src/lib/libc/sys Symbol.map src/lib/libthr/thread thr_syscalls.c src/sys/compat/freebsd32 freebsd32_misc.c syscalls.master src/sys/kern subr_trap.c sys_generic.c syscalls.master src/sys/sys syscallsubr.h
Message-ID:  <200910271057.n9RAvkLj078414@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
kib         2009-10-27 10:55:34 UTC

  FreeBSD src repository

  Modified files:
    lib/libc/sys         Symbol.map 
    lib/libthr/thread    thr_syscalls.c 
    sys/compat/freebsd32 freebsd32_misc.c syscalls.master 
    sys/kern             subr_trap.c sys_generic.c syscalls.master 
    sys/sys              syscallsubr.h 
  Removed files:
    lib/libc/gen         pselect.c 
  Log:
  SVN rev 198508 on 2009-10-27 10:55:34Z by kib
  
  Current pselect(3) is implemented in usermode and thus vulnerable to
  well-known race condition, which elimination was the reason for the
  function appearance in first place. If sigmask supplied as argument to
  pselect() enables a signal, the signal might be delivered before thread
  called select(2), causing lost wakeup. Reimplement pselect() in kernel,
  making change of sigmask and sleep atomic.
  
  Since signal shall be delivered to the usermode, but sigmask restored,
  set TDP_OLDMASK and save old mask in td_oldsigmask. The TDP_OLDMASK
  should be cleared by ast() in case signal was not gelivered during
  syscall execution.
  
  Reviewed by:    davidxu
  Tested by:      pho
  MFC after:      1 month
  
  Revision  Changes    Path
  1.7       +0 -78     src/lib/libc/gen/pselect.c (dead)
  1.30      +3 -0      src/lib/libc/sys/Symbol.map
  1.22      +3 -1      src/lib/libthr/thread/thr_syscalls.c
  1.97      +35 -0     src/sys/compat/freebsd32/freebsd32_misc.c
  1.125     +4 -0      src/sys/compat/freebsd32/syscalls.master
  1.310     +5 -0      src/sys/kern/subr_trap.c
  1.178     +53 -3     src/sys/kern/sys_generic.c
  1.261     +4 -0      src/sys/kern/syscalls.master
  1.60      +2 -0      src/sys/sys/syscallsubr.h



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