| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Notes:
svn path=/head/; revision=131020
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
reference count:
- Assert SOCK_LOCK(so) macros that directly manipulate so_count:
soref(), sorele().
- Assert SOCK_LOCK(so) in macros/functions that rely on the state of
so_count: sofree(), sotryfree().
- Acquire SOCK_LOCK(so) before calling these functions or macros in
various contexts in the stack, both at the socket and protocol
layers.
- In some cases, perform soisdisconnected() before sotryfree(), as
this could result in frobbing of a non-present socket if
sotryfree() actually frees the socket.
- Note that sofree()/sotryfree() will release the socket lock even if
they don't free the socket.
Submitted by: sam
Sponsored by: FreeBSD Foundation
Obtained from: BSD/OS
Notes:
svn path=/head/; revision=130387
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
functions in kern_socket.c.
Rename the "canwait" field to "mflags" and pass M_WAITOK and M_NOWAIT
in from the caller context rather than "1" or "0".
Correct mflags pass into mac_init_socket() from previous commit to not
include M_ZERO.
Submitted by: sam
Notes:
svn path=/head/; revision=126425
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the MAC label referenced from 'struct socket' in the IPv4 and
IPv6-based protocols. This permits MAC labels to be checked during
network delivery operations without dereferencing inp->inp_socket
to get to so->so_label, which will eventually avoid our having to
grab the socket lock during delivery at the network layer.
This change introduces 'struct inpcb' as a labeled object to the
MAC Framework, along with the normal circus of entry points:
initialization, creation from socket, destruction, as well as a
delivery access control check.
For most policies, the inpcb label will simply be a cache of the
socket label, so a new protocol switch method is introduced,
pr_sosetlabel() to notify protocols that the socket layer label
has been updated so that the cache can be updated while holding
appropriate locks. Most protocols implement this using
pru_sosetlabel_null(), but IPv4/IPv6 protocols using inpcbs use
the the worker function in_pcbsosetlabel(), which calls into the
MAC Framework to perform a cache update.
Biba, LOMAC, and MLS implement these entry points, as do the stub
policy, and test policy.
Reviewed by: sam, bms
Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories
Notes:
svn path=/head/; revision=122875
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
whether or not the isr needs to hold Giant when running; Giant-less
operation is also controlled by the setting of debug_mpsafenet
o mark all netisr's except NETISR_IP as needing Giant
o add a GIANT_REQUIRED assertion to the top of netisr's that need Giant
o pickup Giant (when debug_mpsafenet is 1) inside ip_input before
calling up with a packet
o change netisr handling so swi_net runs w/o Giant; instead we grab
Giant before invoking handlers based on whether the handler needs Giant
o change netisr handling so that netisr's that are marked MPSAFE may
have multiple instances active at a time
o add netisr statistics for packets dropped because the isr is inactive
Supported by: FreeBSD Foundation
Notes:
svn path=/head/; revision=122320
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
if_xname, if_dname, and if_dunit. if_xname is the name of the interface
and if_dname/unit are the driver name and instance.
This change paves the way for interface renaming and enhanced pseudo
device creation and configuration symantics.
Approved By: re (in principle)
Reviewed By: njl, imp
Tested On: i386, amd64, sparc64
Obtained From: NetBSD (if_xname)
Notes:
svn path=/head/; revision=121816
|
|
|
|
|
|
|
|
| |
long time and has already been removed from the only driver that supported
it (en(4)) and from the man page.
Notes:
svn path=/head/; revision=118547
|
|
|
|
|
|
|
| |
channel. These have been the last consumers of the old ioctls.
Notes:
svn path=/head/; revision=118543
|
|
|
|
|
|
|
|
|
|
| |
function prototypes. Use LIST_FOREACH instead of explicit loops.
The indentation of functions indendet by 4 space have been left alone.
2-space indented functions have been re-indented.
Notes:
svn path=/head/; revision=118541
|
|
|
|
|
|
|
|
| |
when we get request that we cannot handle ourself. This allows userland
to reach the ATM interfaces for ioctls.
Notes:
svn path=/head/; revision=117643
|
|
|
|
| |
Notes:
svn path=/head/; revision=116189
|
|
|
|
|
|
|
|
|
|
| |
of asserting that an mbuf has a packet header. Use it instead of hand-
rolled versions wherever applicable.
Submitted by: Hiten Pandya <hiten@unixdaemons.com>
Notes:
svn path=/head/; revision=113255
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
drain routines are done by swi_net, which allows for better queue control
at some future point. Packets may also be directly dispatched to a netisr
instead of queued, this may be of interest at some installations, but
currently defaults to off.
Reviewed by: hsu, silby, jayanth, sam
Sponsored by: DARPA, NAI Labs
Notes:
svn path=/head/; revision=111888
|
|
|
|
|
|
|
| |
Approved by: trb
Notes:
svn path=/head/; revision=111119
|
|
|
|
|
|
|
| |
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
Notes:
svn path=/head/; revision=109623
|
|
|
|
|
|
|
| |
Spotted by: FlexeLint.
Notes:
svn path=/head/; revision=105222
|
|
|
|
|
|
|
| |
Requested by: hsu
Notes:
svn path=/head/; revision=97658
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
o Add a mutex (sb_mtx) to struct sockbuf. This protects the data in a
socket buffer. The mutex in the receive buffer also protects the data
in struct socket.
o Determine the lock strategy for each members in struct socket.
o Lock down the following members:
- so_count
- so_options
- so_linger
- so_state
o Remove *_locked() socket APIs. Make the following socket APIs
touching the members above now require a locked socket:
- sodisconnect()
- soisconnected()
- soisconnecting()
- soisdisconnected()
- soisdisconnecting()
- sofree()
- soref()
- sorele()
- sorwakeup()
- sotryfree()
- sowakeup()
- sowwakeup()
Reviewed by: alfred
Notes:
svn path=/head/; revision=96972
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Requested by: bde
Since locking sigio_lock is usually followed by calling pgsigio(),
move the declaration of sigio_lock and the definitions of SIGIO_*() to
sys/signalvar.h.
While I am here, sort include files alphabetically, where possible.
Notes:
svn path=/head/; revision=95759
|
|
|
|
|
|
|
|
|
|
| |
most cases NULL is passed, but in some cases such as network driver locks
(which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used.
Tested on: i386, alpha, sparc64
Notes:
svn path=/head/; revision=93818
|
|
|
|
| |
Notes:
svn path=/head/; revision=92745
|
|
|
|
| |
Notes:
svn path=/head/; revision=91458
|
|
|
|
|
|
|
|
|
| |
us to load protocols at runtime, and avoids the use of common variables.
Also fix the ip6_intrq assignment so that it works at all.
Notes:
svn path=/head/; revision=89069
|
|
|
|
|
|
|
|
|
|
| |
vnodes. This will hopefully serve as a base from which we can
expand the MP code. We currently do not attempt to obtain any
mutex or SX locks, but the door is open to add them when we nail
down exactly how that part of it is going to work.
Notes:
svn path=/head/; revision=86487
|
|
|
|
|
|
|
|
|
| |
is what they should be. As the returned mbuf is already checked for
failure of M_PREPEND even in the wait case, nothing more to be done
here.
Notes:
svn path=/head/; revision=75217
|
|
|
|
|
|
|
|
|
|
| |
fondling implementation details.
Created with: sed(1)
Reviewed by: md5(1)
Notes:
svn path=/head/; revision=71999
|
|
|
|
|
|
|
|
| |
Submitted by: josh@zipperup.org
Submitted by: Robert Drehmel <robd@gmx.net>
Notes:
svn path=/head/; revision=69781
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
before adding/removing packets from the queue. Also, the if_obytes and
if_omcasts fields should only be manipulated under protection of the mutex.
IF_ENQUEUE, IF_PREPEND, and IF_DEQUEUE perform all necessary locking on
the queue. An IF_LOCK macro is provided, as well as the old (mutex-less)
versions of the macros in the form _IF_ENQUEUE, _IF_QFULL, for code which
needs them, but their use is discouraged.
Two new macros are introduced: IF_DRAIN() to drain a queue, and IF_HANDOFF,
which takes care of locking/enqueue, and also statistics updating/start
if necessary.
Notes:
svn path=/head/; revision=69152
|
|
|
|
|
|
|
|
|
| |
It was not discussed and should probably not happen.
Requested by: msmith and others
Notes:
svn path=/head/; revision=60938
|
|
|
|
|
|
|
|
|
|
|
| |
the type argument to *_HEAD and *_ENTRY is a struct.
Suggested by: phk
Reviewed by: phk
Approved by: mdodd
Notes:
svn path=/head/; revision=60833
|
|
|
|
| |
Notes:
svn path=/head/; revision=59874
|
|
|
|
|
|
|
|
|
|
| |
#ifdefs. Clean out unused netisr's and leftover netisr linker set gunk.
Tested on x86 and alpha, including world.
Approved by: jkh
Notes:
svn path=/head/; revision=57178
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
include this in all kernels. Declare some const *intrq_present
variables that can be checked by a module prior to using *intrq
to queue data.
Make the if_tun module capable of processing atm, ip, ip6, ipx,
natm and netatalk packets when TUNSIFHEAD is ioctl()d on.
Review not required by: freebsd-hackers
Notes:
svn path=/head/; revision=56555
|
|
|
|
|
|
|
|
|
| |
is an application space macro and the applications are supposed to be free
to use it as they please (but cannot). This is consistant with the other
BSD's who made this change quite some time ago. More commits to come.
Notes:
svn path=/head/; revision=55205
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for possible buffer overflow problems. Replaced most sprintf()'s
with snprintf(); for others cases, added terminating NUL bytes where
appropriate, replaced constants like "16" with sizeof(), etc.
These changes include several bug fixes, but most changes are for
maintainability's sake. Any instance where it wasn't "immediately
obvious" that a buffer overflow could not occur was made safer.
Reviewed by: Bruce Evans <bde@zeta.org.au>
Reviewed by: Matthew Dillon <dillon@apollo.backplane.com>
Reviewed by: Mike Spengler <mks@networkcs.com>
Notes:
svn path=/head/; revision=41514
|
|
|
|
|
|
|
| |
about unused variables, labels and other lint.
Notes:
svn path=/head/; revision=40648
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
FreeBSD/alpha. The most significant item is to change the command
argument to ioctl functions from int to u_long. This change brings us
inline with various other BSD versions. Driver writers may like to
use (__FreeBSD_version == 300003) to detect this change.
The prototype FreeBSD/alpha machdep will follow in a couple of days
time.
Notes:
svn path=/head/; revision=36735
|
|
|
|
| |
Notes:
svn path=/head/; revision=33181
|
|
|
|
| |
Notes:
svn path=/head/; revision=33134
|
|
|
|
| |
Notes:
svn path=/head/; revision=33108
|
|
|
|
|
|
|
|
|
| |
natm_pcb.c:
Include <sys/socketvar.h> which will be used when M_PCB is declared
in the right place.
Notes:
svn path=/head/; revision=31885
|
|
|
|
| |
Notes:
svn path=/head/; revision=30813
|
|
|
|
|
|
|
|
|
|
|
| |
Distribute all but the most fundamental malloc types. This time I also
remembered the trick to making things static: Put "static" in front of
them.
A couple of finer points by: bde
Notes:
svn path=/head/; revision=30354
|
|
|
|
| |
Notes:
svn path=/head/; revision=29366
|
|
|
|
|
|
|
| |
<sys/malloc.h> (unless we only use the bogusly shared M*WAIT flags).
Notes:
svn path=/head/; revision=29024
|
|
|
|
|
|
|
|
|
|
|
| |
socket addresses in mbufs. (Socket buffers are the one exception.) A number
of kernel APIs needed to get fixed in order to make this happen. Also,
fix three protocol families which kept PCBs in mbufs to not malloc them
instead. Delete some old compatibility cruft while we're at it, and add
some new routines in the in_cksum family.
Notes:
svn path=/head/; revision=28270
|
|
|
|
| |
Notes:
svn path=/head/; revision=27845
|
|
|
|
| |
Notes:
svn path=/cvs2svn/branches/CRANOR/; revision=25605
|
|
Notes:
svn path=/cvs2svn/branches/CRANOR/; revision=25603
|