freebsd-skq/sys
csjp 7aaca1dfe1 Fix LOR between the syncache and inpcb locks when MAC is present in the
kernel.  This LOR snuck in with some of the recent syncache changes.  To
fix this, the inpcb handling was changed:

- Hang a MAC label off the syncache object
- When the syncache entry is initially created, we pickup the PCB lock
  is held because we extract information from it while initializing the
  syncache entry.  While we do this, copy the MAC label associated with
  the PCB and use it for the syncache entry.
- When the packet is transmitted, copy the label from the syncache entry
  to the mbuf so it can be processed by security policies which analyze
  mbuf labels.

This change required that the MAC framework be extended to support the
label copy operations from the PCB to the syncache entry, and then from
the syncache entry to the mbuf.

These functions really should be referencing the syncache structure instead
of the label.  However, due to some of the complexities associated with
exposing this syncache structure we operate directly on it's label pointer.
This should be OK since we aren't making any access control decisions within
this code directly, we are merely allocating and copying label storage so
we can properly initialize mbuf labels for any packets the syncache code
might create.

This also has a nice side effect of caching.  Prior to this change, the
PCB would be looked up/locked for each packet transmitted.  Now the label
is cached at the time the syncache entry is initialized.

Submitted by:	andre [1]
Discussed with:	rwatson

[1] andre submitted the tcp_syncache.c changes
2006-12-13 06:00:57 +00:00
..
amd64 Add msk(4) to the list of drivers supported by GENERIC kernel. 2006-12-13 03:41:47 +00:00
arm Handle a missing NPE firmware file better; if it's missing print a 2006-12-07 00:49:33 +00:00
boot Add an entry for the msk(4) module. 2006-12-13 02:48:22 +00:00
bsm
cam Make cam_xpt's pronouncements match camcontrol 2006-12-10 05:37:48 +00:00
coda change vop_lock handling to allowing tracking of callers' file and line for 2006-11-13 05:51:22 +00:00
compat MFP4: 109653 2006-12-04 22:46:09 +00:00
conf Hook up msk(4) to the build. 2006-12-13 02:37:48 +00:00
contrib
crypto
ddb Threading cleanup.. part 2 of several. 2006-12-06 06:34:57 +00:00
dev Add msk(4), a driver for Marvell/SysKonnect Yukon II Gigabit Ethernet 2006-12-13 02:30:11 +00:00
fs Remove unused variable in unionfs_root(). 2006-12-09 17:24:18 +00:00
gdb
geom Softc may be NULL in g_journal_orphan(), so don't be surprised. 2006-12-02 09:10:29 +00:00
gnu Previously, the mount_ext2fs binary listed the acceptable mount 2006-11-18 18:22:11 +00:00
i4b
i386 Add msk(4) to the list of drivers supported by GENERIC kernel. 2006-12-13 03:41:47 +00:00
ia64 Threading cleanup.. part 2 of several. 2006-12-06 06:34:57 +00:00
isa Optimized RTC accesses by avoiding null writes to the index register 2006-12-03 03:49:28 +00:00
isofs/cd9660 The ISO9660 spec does allow files up to 4G. Change the i_size 2006-12-08 07:43:53 +00:00
kern Add a function to return the MD interrupt source cookie associated with 2006-12-12 19:20:19 +00:00
libkern
modules Hook up msk(4) to the build. 2006-12-13 02:37:48 +00:00
net MFp4: 92972, 98913 + one more change 2006-12-12 12:17:58 +00:00
net80211 Fix packing on the country band descriptor. No real change since this 2006-12-01 18:40:51 +00:00
netatalk
netatm
netgraph Correctly calculate length of IP header. 2006-12-12 12:35:06 +00:00
netinet Fix LOR between the syncache and inpcb locks when MAC is present in the 2006-12-13 06:00:57 +00:00
netinet6 MFp4: 92972, 98913 + one more change 2006-12-12 12:17:58 +00:00
netipsec MFp4: 92972, 98913 + one more change 2006-12-12 12:17:58 +00:00
netipx
netkey
netnatm
netncp
netsmb
nfs NFSv4 client: 2006-11-28 19:33:28 +00:00
nfs4client NFSv4 client: 2006-11-28 19:33:28 +00:00
nfsclient NetApp filers return corrupt post op attrs in the wcc on NFS error responses. 2006-12-11 19:54:25 +00:00
nfsserver MFp4: 92972, 98913 + one more change 2006-12-12 12:17:58 +00:00
opencrypto
pc98 Allow machdep.cpu_idle_hlt to be set from the loader. This should allow 2006-12-06 18:27:17 +00:00
pccard
pci - Revert the parts of the previous revision which reloaded the watchdog 2006-12-08 03:18:16 +00:00
powerpc Implement bus_space_map(). 2006-12-13 03:25:31 +00:00
rpc
security Fix LOR between the syncache and inpcb locks when MAC is present in the 2006-12-13 06:00:57 +00:00
sparc64 Do explicit bounds checking as a function of the actual size of the 2006-12-10 04:18:03 +00:00
sun4v workaround kernel malloc's brittleness 2006-12-12 03:50:06 +00:00
sys Fix LOR between the syncache and inpcb locks when MAC is present in the 2006-12-13 06:00:57 +00:00
tools
ufs change vop_lock handling to allowing tracking of callers' file and line for 2006-11-13 05:51:22 +00:00
vm Remove the requirement that phys_avail be sorted in ascending order 2006-12-08 08:44:47 +00:00
Makefile o Add cam to a list of cscope dirs. 2006-11-26 18:27:16 +00:00