kernel - Make adjustments to the per-lwp ucred
authorMatthew Dillon <dillon@apollo.backplane.com>
Tue, 15 Dec 2009 04:40:54 +0000 (20:40 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Tue, 15 Dec 2009 04:40:54 +0000 (20:40 -0800)
commit7bd858e51115d0dff9cc33c4e3fdbe7951e62d64
treeee634ae83e256bfaa710e3e89115e40a61fcaf1b
parent0d355d3b49728a53cced9b5348b7320dfad58990
kernel - Make adjustments to the per-lwp ucred

* Rename lwp_syscall_ucred to lwp_ucred and move ucred synchronization
  from syscall2() to userenter().  It now runs on any user entry into
  the kernel, not just for system calls.

  NOTE: A VM fault from the kernel itself does not call userenter() and
        does not trigger another synchronization.  This is the behavior
we desire, to ensure that lwp_ucred is stable.

  There are numerous non-syscall cases (e.g. signal, fault, etc) where
  we may need to access a safe ucred.

* Remove the SMP conditional.  lwp_ucred is now tracked for both UP and SMP.
  There is no point optimizing this for UP since there is basically no cost
  for tracking lwp_ucred.
sys/kern/kern_exit.c
sys/platform/pc32/i386/trap.c
sys/platform/pc64/x86_64/trap.c
sys/platform/vkernel/i386/trap.c
sys/sys/proc.h