117211 Commits

Author SHA1 Message Date
rwatson
e13b2df854 Merge linux_ioctl.c:1.128 svr4_sockio.c:1.17 altq_cbq.c:1.3 if_oltr.c:1.38
if_pflog.c:1.14 if_pfsync.c:1.21 if_an.c:1.70 if_ar.c:1.72 if_arl.c:1.11
amrr.c:1.10 onoe.c:1.10 if_ath.c:1.101 awi.c:1.41 if_bfe.c:1.27
if_bge.c:1.93 if_cm_isa.c:1.7 smc90cx6.c:1.16 if_cnw.c:1.20 if_cp.c:1.25
if_cs.c:1.42 if_ct.c:1.26 if_cx.c:1.46 if_ed.c:1.256 if_em.c:1.68
if_en_pci.c:1.37 midway.c:1.66 if_ep.c:1.143 if_ex.c:1.58 if_fatm.c:1.20
if_fe.c:1.93 if_fwe.c:1.38 if_fwip.c:1.8 if_fxp.c:1.244 if_gem.c:1.33
if_hatm.c:1.25 if_hatm_intr.c:1.20 if_hatm_ioctl.c:1.13 if_hatm_rx.c:1.10
if_hatm_tx.c:1.14 if_hme.c:1.39 if_ie.c:1.104 if_ndis.c:1.101
if_ic.c:1.24 if_ipw.c:1.10 if_iwi.c:1.10 if_ixgb.c:1.13 if_lge.c:1.41
if_lnc.c:1.113 if_my.c:1.31 if_nge.c:1.77 if_nve.c:1.10 if_owi.c:1.12
if_patm.c:1.9 if_patm_intr.c:1.6 if_patm_ioctl.c:1.10 if_patm_tx.c:1.10
pdq_ifsubr.c:1.28 if_plip.c:1.38 if_ral.c:1.12 if_ral_pci.c:1.2
if_ray.c:1.81 if_rayvar.h:1.22 if_re.c:1.49 if_sbni.c:1.21 if_sbsh.c:1.14
if_sn.c:1.48 dp83932.c:1.21 if_snc_pccard.c:1.9 if_sr.c:1.70 if_tx.c:1.91
if_txp.c:1.33 if_aue.c:1.92 if_axe.c:1.32 if_cdce.c:1.8 if_cue.c:1.59
if_kue.c:1.66 if_rue.c:1.23 if_udav.c:1.16 if_ural.c:1.12 if_vge.c:1.16
if_vx.c:1.58 if_wi.c:1.185 if_wi_pci.c:1.26 if_wl.c:1.68 if_xe.c:1.60
if_xe_pccard.c:1.30 if_el.c:1.68 i4b_ipr.c:1.35 i4b_isppp.c:1.31
kern_poll.c:1.20 bridge.c:1.94 bridgestp.c:1.4 if_arcsubr.c:1.27
if_atm.h:1.24 if_atmsubr.c:1.40 if_bridge.c:1.16 if_ef.c:1.35
if_ethersubr.c:1.196 if_faith.c:1.37 if_fddisubr.c:1.100 if_fwsubr.c:1.14
if_gif.c:1.54 if_gre.c:1.34 if_iso88025subr.c:1.70 if_loop.c:1.107
if_ppp.c:1.106 if_spppsubr.c:1.121 if_tap.c:1.57 if_tun.c:1.154
if_vlan.c:1.80 ppp_tty.c:1.67 ieee80211_ioctl.c:1.32 atm_if.c:1.31
ng_eiface.c:1.33 ng_ether.c:1.50 ng_fec.c:1.19 ng_iface.c:1.44
ng_sppp.c:1.9 ip_carp.c:1.30 ip_fastfwd.c:1.30 in6.c:1.53 nd6_nbr.c:1.31
natm.c:1.40 if_dc.c:1.162 if_de.c:1.168 if_pcn.c:1.72 if_rl.c:1.154
if_sf.c:1.84 if_sis.c:1.135 if_sk.c:1.108 if_ste.c:1.86 if_ti.c:1.109
if_tl.c:1.101 if_vr.c:1.106 if_wb.c:1.81 if_xl.c:1.194 from HEAD to
RELENG_6:

  Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and
  IFF_DRV_RUNNING, as well as the move from ifnet.if_flags to
  ifnet.if_drv_flags.  Device drivers are now responsible for
  synchronizing access to these flags, as they are in if_drv_flags.  This
  helps prevent races between the network stack and device driver in
  maintaining the interface flags field.

  Many __FreeBSD__ and __FreeBSD_version checks maintained and continued;
  some less so.

  Reviewed by:    pjd, bz

Approved by:	re (scottl)
2005-08-25 05:01:24 +00:00
rwatson
8f8fa61d9b Merge if.c:1.242, if.h:1.97, if_var.h:1.102, rtsock.c:1.125 from HEAD
to RELENG_6:

  Rename IFF_RUNNING to IFF_DRV_RUNNING, IFF_OACTIVE to IFF_DRV_OACTIVE,
  and move both flags from ifnet.if_flags to ifnet.if_drv_flags, making
  and documenting the locking of these flags the responsibility of the
  device driver, not the network stack.  The flags for these two fields
  will be mutually exclusive so that they can be exposed to user space as
  though they were stored in the same variable.

  Provide #defines to provide the old names #ifndef _KERNEL, so that user
  applications (such as ifconfig) can use the old flag names.  Using the
  old names in a device driver will result in a compile error in order to
  help device driver writers adopt the new model.

  When exposing the interface flags to user space, via interface ioctls
  or routing sockets, or the two fields together.  Since the driver flags
  cannot currently be set for user space, no new logic is currently
  required to handle this case.

  Add some assertions that general purpose network stack routines, such
  as if_setflags(), are not improperly used on driver-owned flags.

  With this change, a large number of very minor network stack races are
  closed, subject to correct device driver locking.  Most were likely
  never triggered.

  Driver sweep to follow; many thanks to pjd and bz for the line-by-line
  review they gave this patch.

  Reviewed by:    pjd, bz

Approved by:	re (scottl)
2005-08-25 04:55:48 +00:00
rodrigc
1273bd9a5e MFC rev 1.411:
- Remove NTP servers which do not resolve in DNS.
 - Use pool.ntp.org servers where possible, thanks to
   Chuck Swiger <cswiger at mac dot com> .
 - Update list of Swedish NTP servers, thanks to
   Fredrik Lindberg <fli+freebsd-current at shapeshifter dot se> .

PR:		bin/75479
Approved by:	re (scottl)
2005-08-25 00:42:26 +00:00
rwatson
605eed31ef Merge if_atmsubr.c:1.38 from HEAD to RELENG_6:
Lock down netnatm and mark as MPSAFE:

  - Introduce a subsystem mutex, natm_mtx, manipulated with accessor macros
    NATM_LOCK_INIT(), NATM_LOCK(), NATM_UNLOCK(), NATM_LOCK_ASSERT().  It
    protects the consistency of pcb-related data structures.  Finer grained
    locking is possible, but should be done in the context of specific
    measurements (as very little work is done in netnatm -- most is in the
    ATM device driver or socket layer, so there's probably not much
    contention).

  - Remove GIANT_REQUIRED, mark as NETISR_MPSAFE, remove
    NET_NEEDS_GIANT("netnatm").

  - Conditionally acquire Giant when entering network interfaces for
    ifp->if_ioctl() using IFF_LOCKGIANT(ifp)/IFF_UNLOCKGIANT(ifp) in order
    to coexist with non-MPSAFE atm ifnet drivers..

  - De-spl.

  Reviewed by:    harti, bms (various versions)

Approved by:	re (hrs)
2005-08-24 18:10:51 +00:00
rwatson
6bafdfe2e2 Merge subr_witness.c:1.196, igmp.c:1.49, in.c:1.86, in_var.h:1.55,
ip_input.c:1.303, ip_output.c:1.243 from HEAD to RELENG_6:

  Introduce in_multi_mtx, which will protect IPv4-layer multicast address
  lists, as well as accessor macros.  For now, this is a recursive mutex
  due code sequences where IPv4 multicast calls into IGMP calls into
  ip_output(), which then tests for a multicast forwarding case.

  For support macros in in_var.h to check multicast address lists, assert
  that in_multi_mtx is held.

  Acquire in_multi_mtx around iteration over the IPv4 multicast address
  lists, such as in ip_input() and ip_output().

  Acquire in_multi_mtx when manipulating the IPv4 layer multicast
  addresses, as well as over the manipulation of ifnet multicast address
  lists in order to keep the two layers in sync.

  Lock down accesses to IPv4 multicast addresses in IGMP, or assert the
  lock when performing IGMP join/leave events.

  Eliminate spl's associated with IPv4 multicast addresses, portions of
  IGMP that weren't previously expunged by IGMP locking.

  Add in_multi_mtx, igmp_mtx, and if_addr_mtx lock order to hard-coded
  lock order in WITNESS, in that order.

  Problem reported by:    Ed Maste <emaste at phaedrus dot sandvine dot ca>

Approved by:	re (scottl)
2005-08-24 17:30:44 +00:00
rwatson
091aba35eb Merge if_ath.c:1.99 awi.c:1.39 if_bfe.c:1.26 if_bge.c:1.92 if_ed.c:1.255
if_em.c:1.67 if_ex.c:1.57 if_fe.c:1.92 if_fxp.c:1.242 if_gem.c:1.32
if_hme.c:1.38 if_ie.c:1.103 if_ndis.c:1.100 if_ixgb.c:1.12 if_lge.c:1.40
if_lnc.c:1.112 if_my.c:1.30 if_nge.c:1.76 if_nve.c:1.9 if_owi.c:1.11
pdq_ifsubr.c:1.27 if_ray.c:1.80 if_re.c:1.47 if_sn.c:1.47 dp83932.c:1.20
if_tx.c:1.90 if_txp.c:1.32 if_aue.c:1.91 if_axe.c:1.31 if_cue.c:1.58
if_kue.c:1.65 if_rue.c:1.22 if_udav.c:1.15 if_vge.c:1.15 if_wi.c:1.182
if_wl.c:1.67 if_xe.c:1.58 if_dc.c:1.161 if_de.c:1.167 if_pcn.c:1.70
if_rl.c:1.153 if_sf.c:1.83 if_sis.c:1.134 if_sk.c:1.107 if_ste.c:1.85
if_ti.c:1.108 if_tl.c:1.100 if_vr.c:1.105 if_wb.c:1.80 if_xl.c:1.193
from HEAD to RELENG_6:

  Modify device drivers supporting multicast addresses to lock if_addr_mtx
  over iteration of their multicast address lists when synchronizing the
  hardware address filter with the network stack-maintained list.

  Problem reported by:    Ed Maste (emaste at phaedrus dot sandvine dot ca>

Approved by:	re (scottl)
2005-08-24 16:50:46 +00:00
keramida
8081c1d979 MFC 1.34: Spell "partition" correctly.
Reminded by:	simon
Approved by:	re (scottl)
2005-08-24 15:42:12 +00:00
rwatson
8cc2738362 Merge in_var.h:1.54, in6_var.h:1.23, mld6.c:1.22 from HEAD to RELENG_6:
Modify network protocol consumers of the ifnet multicast address lists
  to lock if_addr_mtx.

  Problem reported by:    Ed Maste <emaste at phaedrus dot sandvine dot ca>

Approved by:	re (scottl)
2005-08-24 15:18:38 +00:00
rwatson
5ff1ab3e14 Merge if_arcsubr.c:1.26, if_ethersubr.c:1.195, if_fddisubr.c:1.99,
if_iso88025subr.c:1.68 from HEAD to RELENG_6:

  When allocating link layer ifnet address list entries in
  ifp->if_resolvemulti(), do so with M_NOWAIT rather than M_WAITOK, so
  that a mutex can be held over the call.  In the FDDI code, add a
  missing M_ZERO.  Consumers are already aware that if_resolvemulti()
  can fail.

Approved by:	re (scottl)
2005-08-24 13:51:55 +00:00
rwatson
c5a05437c6 Merge if_var.h:1.101 from HEAD to RELENG_6:
- Rename ifmaof_ifpforaddr() to if_findmulti(); assert if_addr_mtx.
    Staticize.

  Problem reported by:    Ed Maste <emaste at phaedrus dot sandvine dot ca>

Approved by:	re (scottl)
2005-08-24 13:26:14 +00:00
simon
f1b084d403 MFC rev 1.35:
Remove reference to raid(4), the RAIDframe manual page, which was
  deleted a while ago.

Approved by:	re (scottl)
2005-08-24 08:07:29 +00:00
suz
6bba028c03 MFC 1.55
added a missing unlock (just do the same thing as in netinet/raw_ip.c)

Approved by: re(scottl)
2005-08-24 06:46:16 +00:00
rwatson
3f3866054d Merge if.c:1.240, if.c:1.241, if.c:1.242 from HEAD to RELENG_6, which
correct nits in the addition of if_addr_mtx:

if.c:1.240:
  Initialize the if_addr mutex in if_alloc() rather than waiting until
  if_attach().  This allows ethernet drivers to use it in their routines
  to program their MAC filters before ether_ifattach() is called (de(4) is
  one such driver).  Also, the if_addr mutex is destroyed in if_free()
  rather than if_detach(), so there was another potential bug in that a
  driver that failed during attach and called if_free() without having
  called ether_ifattach() would have tried to destroy an uninitialized
  mutex.

  Reported by:    Holm Tiffe holm at freibergnet dot de
  Discussed with: rwatson

if.c:1.241:
  destroy lock _before_ free'ing the structure it resides in

if.c:1.242:
  - Move IF_ADDR_LOCK_DESTROY(ifp) from if_free to if_free_type.
  - Add a note that additions should be made to if_free_type and not
    if_free to help avoid this in the future.

  This apparently fixes a use after free in if_bridge and may fix bugs
  in other direct if_free_type consumers.

  Reported by:    thompsa

Approved by:	re (hrs)
2005-08-24 04:45:02 +00:00
rwatson
b44c9e8aef Merge if.c:1.239, if_var.h:1.101 from HEAD to RELENG_6:
Protect link layer network interface multicast address list manipulation
  using ifp->if_addr_mtx:

  - Initialize if_addr_mtx when ifnet is initialized.

  - Destroy if_addr_mtx when ifnet is torn down.

  - Rename ifmaof_ifpforaddr() to if_findmulti(); assert if_addr_mtx.
    Staticize.

  - Extract ifmultiaddr allocation and initialization into if_allocmulti();
    accept a 'mflags' argument to indicate whether or not sleeping is
    permitted.  This centralizes error handling and address duplication.

  - Extract ifmultiaddr tear-down and deallocation in if_freemulti().

  - Re-structure if_addmulti() to hold if_addr_mtx around manipulation of
    the ifnet multicast address list and reference count manipulation.
    Make use of non-sleeping allocations.  Annotate the fact that we only
    generate routing socket events for explicit address addition, not
    implicit link layer address addition.

  - Re-structure if_delmulti() to hold if_addr_mtx around manipulation of
    the ifnet multicast address list and reference count manipulation.
    Annotate the lack of a routing socket event for implicit link layer
    address removal.

  - De-spl all and sundry.

  Problem reported by:    Ed Maste <emaste at phaedrus dot sandvine dot ca>

Approved by:	re (hrs)
2005-08-24 04:42:03 +00:00
rwatson
fb6d446f5c Merge if.c:1.235 from HEAD to RELENG_6:
- Introduce a helper function if_setflag() containing the code common
    to ifpromisc() and if_allmulti() instead of duplicating the code poorly,
    with different bugs.
  - Call ifp->if_ioctl() in a consistent way: always use more compatible C
    syntax and check whether ifp->if_ioctl is not NULL prior to the call.

Discussed with:	yar
Approved by:	re (scottl)
2005-08-24 04:19:48 +00:00
rwatson
bf826e6d59 Merge vfs_subr.c:1.641 from HEAD to RELENG_6:
Silence "busy" warnings when unmounting devfs at system shutdown.  This
  is a workaround for non-symetric teardown of the file systems at
  shutdown with respect to the mount order at boot.  The proper long term
  fix is to properly detach devfs from the root mount before unmounting
  each, and should be implemented, but since the problem is non-harmful,
  this temporary band-aid will prevent false positive bug reports and
  unnecessary error output for 6.0-RELEASE.

  Tested by:      pav, pjd

Approved by:	re (scottl)
2005-08-23 01:50:19 +00:00
kensmith
2d603d9e8f Almost ready for BETA3 builds.
Approved by:	re (implicit)
2005-08-22 03:01:35 +00:00
rwatson
4297cbfe9b Merge ip_output.c:1.244 from HEAD to RELENG_6:
Add helper function ip_findmoptions(), which accepts an inpcb, and attempts
  to atomically return either an existing set of IP multicast options for the
  PCB, or a newlly allocated set with default values.  The inpcb is returned
  locked.  This function may sleep.

  Call ip_moptions() to acquire a reference to a PCB's socket options, and
  perform the update of the options while holding the PCB lock.  Release the
  lock before returning.

  Remove garbage collection of multicast options when values return to the
  default, as this complicates locking substantially.  Most applications
  allocate a socket either to be multicast, or not, and don't tend to keep
  around sockets that have previously been used for multicast, then used for
  unicast.

  This closes a number of race conditions involving multiple threads or
  processes modifying the IP multicast state of a socket simultaenously.

Approved by:	re (scottl)
2005-08-20 21:32:08 +00:00
rwatson
92800007fa Merge libmemstat.3:1.10 from HEAD to RELENG_6:
The "Mbuf" zone was renamed "mbuf" to improve consistency, but the code
  example in libmemstat.3 was not updated to take this rename into account.
  Update the example.

  PR:             84946
  Submitted by:   Wojciech A. Koszek <dunstan at freebsd dot czest dot pl>

Approved by:	re (scottl)
2005-08-20 21:25:21 +00:00
rwatson
487c3ba9fb Merge if_var.h:1.99 from HEAD to RELENG_6:
Allocate one of the spare ifnet integer fields to hold if_drv_flags,
  which in the future will hold IFF_OACTIVE and IFF_RUNNING, and have
  its access synchronized by the device driver rather than the
  protocol stack.  This will avoid potential races in the management
  of flags in if_flags.

  Discussed with: various (scottl, jhb, ...)

Approved by:	re (kensmith)
2005-08-20 13:38:22 +00:00
rwatson
ee3dd8b8ab Merge in_pcb.c:1.166 from HEAD to RELENG_6:
Remove no-op spl references in in_pcb.c, since in_pcb locking has been
  basically complete for several years now.  Update one spl comment to
  reference the locking strategy.

Approved by:	re (kensmith)
2005-08-20 13:34:59 +00:00
rwatson
e1076be2c0 Merge tcp_subr.c:1.229, tcp_syncache.c:1.75, tcp_timer.c:1.75 from HEAD
to RELENG_6:

  Remove no-op spl's and most comment references to spls, as TCP locking
  is believed to be basically done (modulo any remaining bugs).

Approved by:	re (kensmith)
2005-08-20 13:34:13 +00:00
rwatson
c15d856fac Merge uma_dbg.c:1.21, uma_dbg.h:1.9 from HEAD to RELENG_6:
Improve canonicalization of copyrights.  Order copyrights by order of
  assertion (jeff, bmilekic, rwatson).

  Suggested ages ago by:  bde

Approved by:	re (kensmith)
2005-08-20 13:31:05 +00:00
rwatson
5a0a2e7624 Merge mdoc.local:1.50 from HEAD to RELENG_6:
Hook up libmemstat(3) to the library list in mdoc.local.  This will cause
  the library description (specifically, -lmemstat) to render properly in
  the libmemstat.3 man page.

  Submitted by:   ru

Approved by:	re (kensmith)
2005-08-20 13:24:28 +00:00
ume
b7cb727fcd MFC 1.34, 1.35:
- avoid exclusive sleep mutex witness warning using sx lock.
  - use TAILQ_FOREACH() for readability.

Approved by:	re (kensmith)
2005-08-20 12:20:48 +00:00
bz
bf3595b8d8 MFC:
rev. 1.108, 1.109 src/sys/netinet/ip_fw2.c
rev. 1.101        src/sys/netinet/ip_fw.h
rev. 1.77         src/sbin/ipfw/ipfw2.c
rev. 1.176        src/sbin/ipfw/ipfw.8

* Add dynamic sysctl for net.inet6.ip6.fw.
* Correct handling of IPv6 Extension Headers.
* Add unreach6 code.
* Add logging for IPv6.
* Fix build without INET6 and IPFIREWALL compiled into kernel.[1]

Submitted by:   sysctl handling derived from patch from ume needed for ip6fw
Obtained from:  is_icmp6_query and send_reject6 derived from similar
                functions of netinet6,ip6fw
Reviewed by:    ume, gnn; silence on ipfw@
Spotted and tested by:  Michal Mertl <mime at traveller.cz>[1]
Approved by:    re (kensmith)
2005-08-20 08:36:57 +00:00
yar
afb8ace5c6 MFC rev. 1.29-1.31:
Make the procfs module buildable again in the MODULES_WITH_WORLD case.
This means defining a target for default opt_compat.h, but only if we
are not building the modules along with the kernel.

Approved by:	re (kensmith)
2005-08-20 08:05:01 +00:00
alc
a574f3c833 MFC
Eliminate inconsistency in the setting of the B_DONE flag.

Approved by:	re (kensmith)
2005-08-20 06:07:55 +00:00
brooks
ff880e3c80 MFC rev 1.9, remove an incorrect and unnecessicary bzero of the softc.
Approved by:	re (kensmith)
2005-08-20 04:35:29 +00:00
brooks
0ad36e7cf7 MFC rev 1.81, use if_free_type to avoid leaking struct arpcoms.
Approved by:	re (kensmith)
2005-08-20 04:34:11 +00:00
brooks
453f516d46 MFC rev 1.244, removal of if_findindex and correction of two if_alloc
calls before an if_attach.

Partial MFC of 1.243.  The change it was a response to has not been
MFCd, but the comment is relevent without it.

Approved by:	re (kensmith)
2005-08-20 04:32:54 +00:00
brooks
7eb0d8677e MFC revs 1.257 and 1.216.
- interface startup doc updates
 - s/ISC dhclient/OpenBSD dhclient/

Approved by:	re (kensmith)
2005-08-20 04:30:35 +00:00
iedowse
b9efd783a8 MFC 1.22: in the ufsdirhash_build() failure case for corrupted
directories or unreadable blocks, make sure to destroy the mutex
we created.

Approved by:	re (scottl)
2005-08-20 04:27:15 +00:00
gshapiro
d9a1e9f7c0 MFC: Make links for hoststat(8) and purgestat(8) man pages.
Revision  Changes    Path
     1.52      +2 -0      src/usr.sbin/sendmail/Makefile

Approved by:	re (hrs)
2005-08-20 01:39:08 +00:00
dougb
d63c35b6a5 MFC 1.1.1.3, a patch to aid in out of memory conditions.
Take this opportunity to note that glebius indicated
that the initial work in this area was done by
Igor Sysoev <is rambler-co.ru>

Approved by:	re (kensmith)
2005-08-19 22:09:16 +00:00
brian
e0f3ccfd97 MFC: Make ichsmb unloadable
Approved by:	re (kensmith)
Sponsored by:	Sophos/ActiveState
2005-08-19 18:38:55 +00:00
ume
b026cdd3cf MFC 1.36: create sysctl tree dynamically. it is required to share
net.inet6.ip6.fw with upcoming ipfw2 improvement for IPv6.

Requested by:	bz
Approved by:	re (kensmith)
2005-08-19 17:38:52 +00:00
brueffer
3f7188ceb3 MFC: rev. 1.27
Clarify how the 'channel' argument should look like and add an
example on how to obtain information on devices on an ata channel.

Approved by:	re (hrs)
2005-08-19 15:54:42 +00:00
glebius
d4bfa24b97 MFC:
Add a new switch -h for interface stats mode, which prints all interface
  statistics in human readable form.

  In collaboration with:	vsevolod
  Reviewed by:			cperciva

Approved by:	re (kensmith)
2005-08-19 15:08:43 +00:00
glebius
f367659d48 MFC:
Axe ppp_for_tty(). Use tty->t_lsc pointer to store sc. This
  also eliminates recursive use of ppp_softc_list_mtx.
  PR:		kern/84686
  Reviewed by:	phk

Approved by:	re (kensmith)
2005-08-19 14:52:21 +00:00
nyan
ebca1aed62 MFC: Attempt g_ctl for metadata modification.
Approved by:	re (kensmith)
2005-08-19 12:43:55 +00:00
nyan
a3a2b08eb8 MFC: revision 1.54 (Implement g_ctl api).
Approved by:	re (kensmith)
2005-08-19 12:40:32 +00:00
pjd
354d9a41b6 MFC: sys/opencrypto/cryptodev.c 1.26
Fix bogus check. It was possible to panic the kernel by giving 0 length.
This is actually a local DoS, as every user can use /dev/crypto if there
is crypto hardware in the system and cryptodev.ko is loaded (or compiled
into the kernel).

Reported by:    Mike Tancsa <mike@sentex.net>
Security:	Local DoS on systems with crypto HW and with /dev/crypto available
Approved by:	re (kensmith)
2005-08-19 12:04:19 +00:00
pjd
c9e4dff1ad MFC: usr.sbin/jls/jls.c 1.4,1.5
Not sure why, but SYSCTL_OUT() can sometimes keep returning ENOMEM
in sysctl_jail_list(). Because of this, jls(8) could enter into
an endless loop. The strange thing is, that we can call jls(8) while
the other one is in loop and it will succeed - SYSCTL_OUT() will
not return ENOMEM there.

Approved by:	re (kensmith)
2005-08-19 11:09:11 +00:00
glebius
10a0fa240e MFC:
Implement a new feature for ping(8) - sweeping pings. In a sweeping
  ping ICMP payload of packets being sent is increased with given step.
  Sweeping pings are useful for testing problematic channels, MTU
  issues or traffic policing functions in networks.

  PR:		bin/82625
  Submitted by:	Chris Hellberg <chellberg juniper.net> (with some cleanups)

Approved by:	re (kensmith)
2005-08-19 09:29:25 +00:00
le
60ff518762 MFC:
geom_vinum.c        rev. 1.17
  geom_vinum_drive.c  rev. 1.19
  geom_vinum_plex.c   rev. 1.16
  geom_vinum_rm.c     rev. 1.7
  geom_vinum_var.h    rev. 1.9, 1.10
  geom_vinum_volume.c rev. 1.9

Approved by:  re (kensmith)
2005-08-19 08:48:04 +00:00
csjp
9c24f2345e MFC revision 1.157
date: 2005/08/18 22:30:52;  author: csjp;  state: Exp;  lines: +4 -2
Add missing braces around bpf_filter which were missed when I
merged the bpfstat code.

Approved by:	re (kensmith)
2005-08-19 04:52:02 +00:00
csjp
20f8edeaa1 Synch with HEAD:
MFC revision 1.167
date: 2005/08/08 21:06:42;  author: csjp;  state: Exp;  lines: +2 -0
Drop in a WITNESS_WARN into SYSCTL_IN to make sure that we are
not holding any non-sleep-able-locks locks when copyin is called.
This gets executed un-conditionally since we have no function
to wire the buffer in this direction.

MFC revision 1.166
date: 2005/08/08 18:54:35;  author: csjp;  state: Exp;  lines: +6 -1
Check to see if we wired the user-supplied buffers in SYSCTL_OUT, if
the buffer has not been wired and we are holding any non-sleep-able locks,
drop a witness warning. If the buffer has not been wired, it is possible
that the writing of the data can sleep, especially if the page is not in
memory. This can result in a number of different locking issues, including
dead locks.

Approved by:	re (kensmith)
2005-08-19 04:50:08 +00:00
cperciva
a0c5d836f0 MFC: Pad the strings sccs[], version[], and osrelease[], and add a
BRANCH_OVERRIDE environment variable (which, if set, overrides the
BRANCH specified here).  These make my FreeBSD Update build code
simpler by making it easier to recognize when two kernels are identical
modulo version numbers.

Approved by:	re (kensmith)
2005-08-19 04:12:41 +00:00
marcel
58aac0d793 MFC 1.3: Fix backtraces.
Approved by: re (kensmith)
2005-08-19 04:02:34 +00:00