Add AUDITVNODE[12] flags to namei(), which cause namei() to audit path
and vnode attribute information for looked up vnodes during the lookup
operation. This will allow consumers of namei() to specify that this
information be added to the in-process audit record.
Obtained from: TrustedBSD Project
Hook up audit to fork() and exit() events. These changes manage the
audit state on processes, not auditing of these events.
Obtained from: TrustedBSD Project
Add new fields to process-related data structures:
- td_ar to struct thread, which holds the in-progress audit record during
a system call.
- p_au to struct proc, which holds per-process audit state, such as the
audit identifier, audit terminal, and process audit masks.
In the earlier implementation, td_ar was added to the zero'd section of
struct thread. In order to facilitate merging to RELENG_6, it has been
moved to the end of the data structure, requiring explicit
initalization in the thread constructor.
Obtained from: TrustedBSD Project
'show thread' (currently doesn't work due to a ddb bug that in 6.x
that causes 'show thread' to be treated as 'show threads'), 'show lockmgr',
'show sleepchain', 'show lockchain', 'show allchains', 'show locktree',
'show sleepq', and 'show turnstile'.
Use NET_LOCK_GIANT() and VFS_LOCK_GIANT() instead of unconditionally
acquiring Giant in kern_sendfile().
Guard against the forced reclamation of a vnode in kern_sendfile().
- Teach WITNESS_SAVE() and WITNESS_RESTORE() to work with spin locks instead
of only sleep locks.
- Do the extra step required when destroying a locked spin mutex.
- Initialize thread0.td_contested in init_turnstiles() rather than
mutex_init().
- Add LOCK_CLASS() macro and sync with HEAD on its usage. For RELENG_6
this just maps to lock->lo_class. (In HEAD lo_class was removed an array
index was encoded into lo_flags instead.)
- Add subr_lock.c including adding lock_init() and lock_destroy() functions
as we as moving the 'show lock' command into this file from kern_mutex.c.
Re-order MAC and DAC checks in shmget() in order to give precedence to
the MAC result, as well as avoid losing the DAC check result when MAC
is enabled.
Reported by: Patrick LeBlanc <Patrick dot LeBlanc at sparta dot com>
Reminded by: shangjie dot li at gmail dot com
linked SCM_CREDS control messages and then add a control message with
struct sockcred so the process specifically asked for the peer credentials
by LOCAL_CREDS option always gets struct sockcred.
Create bus_enumerate_hinted_children. This routine will allow
drivers to use the hinted child system. Bus drivers that use
this need to implmenet the bus_hinted_child method, where they
actually add the child to their bus, as they see fit. The bus
is repsonsible for getting the attribtues for the child,
adding it in the right order, etc. ISA hinting will be
updated to use this method.
Remove sbinsertoob(), sbinsertoob_locked(). They violate (and have
basically always violated) invariannts of soreceive(), which assume
that the first mbuf pointer in a receive socket buffer can't change
while the SB_LOCK sleepable lock is held on the socket buffer,
which is precisely what these functions do. No current protocols
invoke these functions, and removing them will help discourage them
from ever being used. I should have removed them years ago, but
lost track of it.
Prodded almost by accident by: peter
ext2_vfsops.c:1.157, cd9660_vfsops.c:1.145, ffs_vfsops.c:1.314,
reiserfs_vfsops.c:1.5
Remove calls to vfs_export() for exporting a filesystem for NFS mounting
from individual filesystems. Call it instead in vfs_mount.c,
after we call VFS_MOUNT() for a specific filesystem.
Add a sysctl, regression.sonewconn_earlytest, which when options
REGRESSION is enabled, allows user space to dictate that sonewconn()
should skip it's "skip the hard work" check to see if the listen
queue is full, and instead proceed with allocation of a socket and
trimming of the overflowed queue. This makes it easier to test the
queue overflow logic.
vmspace_exitfree() and vmspace_free() which could result in the same
vmspace being freed twice.
Factor out part of exit1() into new function vmspace_exit(). Attach
to vmspace0 to allow old vmspace to be freed earlier.
Add new function, vmspace_acquire_ref(), for obtaining a vmspace
reference for a vmspace belonging to another process. Avoid changing
vmspace refcount from 0 to 1 since that could also lead to the same
vmspace being freed twice.
Change vmtotal() and swapout_procs() to use vmspace_acquire_ref().
In devfs_first(), set mp->mnt_opt to a valid empty list of mount options
instead of leaving it NULL. This eliminates a kernel panic
when trying to do a mount -o update of /dev.
Noticed by: cjsp
Reviewed by: phk
date: 2006/04/10 14:07:28; author: csjp; state: Exp; lines: +0 -2
Kill the last Giant acquisition in the exit(2) code. This Giant acquisition
doesn't appear to be protecting anything. Most of consumers funsetownlst(9)
do not appear to be picking up Giant anywhere. This was originally a part
of my Giant exit(2) clean up revision 1.272 but I thought it was a good idea
to leave it out until we were able to analyze it better.
Don't try to kill embryonic processes in killpg1(). This prevents
a race condition between fork() and kill(pid,sig) with pid < 0 that
can cause a kernel panic.
vn_start_write()/vn_finished_write() is not needed here, because
vn_start_write() is always called earlier in the code path and calling
the function recursively may lead to a deadlock.
Confirmed by: tegge