Commit Graph

116986 Commits

Author SHA1 Message Date
cvs2svn
ec43e58941 This commit was manufactured by cvs2svn to create branch 'RELENG_6'. 2005-07-29 10:06:58 +00:00
jkoshy
d8ee659609 MFC r1.9:
Fix breakage introduced in rev 1.7.

Approved by:	re (kensmith)
2005-07-29 03:01:40 +00:00
jkoshy
478aec733a MFC r1.12:
Use LK_CANRECURSE since when a PMC-owning process performs an exec(),
  the new text vnode is already locked by itself.

Approved by:	re (kensmith)
2005-07-29 02:58:34 +00:00
rwatson
2be4c0a749 Merge mbuf.c:1.43,1.44 and Makefile:1.27 from HEAD to RELENG_6:
Modify "netstat -mb" to use libmemstat(3) when acting on a live system,
  with a number of positive benefits:

  - Start using UMA(9) statistics for mbufs and clusters, which avoids
    using the mbuf allocator statistics which suffer from races under
    load on SMP.  This should eliminate "negative" mbuf counts in
    netstat -mb.

  - We are now able to track cached (free) mbufs and clusters and count
    it towards memory allocated by the network stack.

  - We are now also able to track memory allocated to mbuf tags since
    libmemstat(3) can also query malloc(9).  We don't print this except
    as part of the total (for now - #if 0).

  - We are now able to track mbuf/cluster/packet allocation failures,
    although they are not currently printed (#if 0).

  - Don't print out sfbuf statistics when running on a kernel core, as
    currently that code is able only to query sysctl for statistics.

mbuf.c:1.44:

  Since libmemstat(3) now supports its own error management mechanism,
  use that instead of trying to use errno, in order to produce a
  sensible error message.

Approved by:	re (kensmith)
2005-07-28 19:54:55 +00:00
nyan
533eeeea47 MFi386: revision 1.616.2.1
> Use an interrupt gate for the NMI handler and prevent too-early
> enabling of interrupts inside of trap().

Approved by:	re (kensmith)
2005-07-28 17:22:39 +00:00
rwatson
41ed4ba1fd Merge Makefile:1.206 from HEAD to RELENG_6:
Hook libmemstat(3) up to the build.

Approved by:	re (kensmith)
2005-07-28 13:47:18 +00:00
rwatson
15a631b33f Merge memstat_uma.c:1.8 from HEAD to RELENG_6:
If a retrieved UMA zone is a secondary zone, don't report keg free
  items, as they actually belong to the  primary zone, and maye otherwise
  be reported more than once.

Approved by:	re (kensmith)
2005-07-28 12:11:41 +00:00
rwatson
b90366a3fc Merge uma.h:1.27, uma_core.c:1.129 from HEAD to RELENG_6:
Rename UMA_MAX_NAME to UTH_MAX_NAME, since it's a maximum in the
  monitoring API, which might or might not be the same as the internal
  maximum (currently none).

  Export flag information on UMA zones -- in particular, whether or
  not this is a secondary zone, and so the keg free count should be
  considered in that light.

Approved by:	re (kensmith)
2005-07-28 12:10:19 +00:00
jkoshy
0775c0fa95 MFC { exception.s:r1.114, machdep.c:r1.617, trap.c:r1.278 }
Use an interrupt gate for the NMI handler and prevent too-early
enabling of interrupts inside of trap().

Revert rev 1.113 of "sys/i386/i386/exception.s" as it is no longer
needed.

Approved by:	re (kensmith)
2005-07-28 03:30:53 +00:00
grehan
85dcd28828 MFC, r1.234:
Make sure /etc/fstab is written out for Apple-partitioned drives

    reviewed by:    scottl

Approved by:	re (Ken Smith)
2005-07-28 01:18:19 +00:00
grehan
c3509ed9f1 MFC, r1.161:
Recognise GEM ethernet adapter (sparc64/ppc).

    reviewed by:    scottl

Approved by:	re (Ken Smith)
2005-07-28 01:17:12 +00:00
avatar
0120539207 MFC: (1.5) Fixing an off-by-one error.
Approved by:	re (kensmith)
2005-07-27 12:45:36 +00:00
cperciva
bc436e7a70 Correct a buffer overflow which can occur when decompressing a
carefully crafted deflated data stream. [1]

Correct problems in the AES-XCBC-MAC IPsec authentication algorithm. [2]

Submitted by:   suz [2]
Security:       FreeBSD-SA-05:18.zlib [1], FreeBSD-SA-05:19.ipsec [2]
Approved by:	re (kensmith)
2005-07-27 08:41:44 +00:00
scottl
930f4f73bd MFC: Don't cross-reference VFS_START.9 anymore.
Approved by: re
2005-07-27 02:11:20 +00:00
scottl
7e373004fa MFC: Don't reference VFS_START.9 in the Makefile anymore.
Approved by: re
2005-07-27 02:10:45 +00:00
hmp
9b7585dee0 Remove the VFS_START(9) manual page because it's no longer relevant. The
entry point was removed as its only consumer was MFS.

MFC of revision 1.13 of src/share/man/man9/VFS_START.9

Approved by:	re (hrs)
2005-07-26 23:59:55 +00:00
brueffer
b4d850168e MFC: rev. 1.5
snd_ess needs snd_sbc to compile.

Noticed by:	oliver
Approved by:	re (hrs)
2005-07-26 18:33:19 +00:00
mdodd
96f0ea74d4 MFC: 1.13
Move initialization above point of first possible reference to
avoid overwriting ty_status values set from the 'type' field.
Approved by:	 re (scottl)
2005-07-25 20:19:39 +00:00
thompsa
6171107e4e MFC: if_bridge.c, r1.13
>   Clear the PROMISC flag from the vlan interface when we remove a member. We
>   checked for IFT_L2VLAN in bridge_ioctl_add() but not bridge_delete_member().
>
>   Approved by:    mlaier (mentor)
>
>   Revision  Changes    Path
>   1.13      +1 -0      src/sys/net/if_bridge.c

Approved by:	re (kensmith), mlaier (mentor)
2005-07-25 18:55:11 +00:00
gad
c002d193d2 MFC 1.3: Correct one regression test, and add a few more tests.
Approved by:	re(kensmith)
2005-07-25 18:52:07 +00:00
gad
4749223819 MFC 1.3->1.4: Fix minor bugs in -S processing:
1) An unquoted space is always a separator, even when not "in_arg".
 2) When a new destination buffer must be allocated during variable
    substitution, only copy data from the active buffer to the new
    one when we *are* "in_arg".
 3) Fix minor memory leak when expanding ${variable}s

Approved by:	re(kensmith)
2005-07-25 18:09:09 +00:00
emax
d1df494821 MFC to RELENG_6 ng_ubt.c v1.25
Add support for AVM BlueFRITZ! USB Bluetooth Adapter v2.0. It appears that
there are at least two versions of the adapter. Version 1 (product ID 0x2200)
of the adapter does not work with ng_ubt(4) and require special driver and
firmware. Version 2 (product ID 0x3800) seems to work just fine, except it
does not have bDeviceClass, bDeviceSubClass and bDeviceProtocol set to required
(by specification) values. This change forces ng_ubt(4) to attach to the
version 2 adapter.

Ignore AVM BlueFRITZ! USB Bluetooth Adapter v1.0 (product ID 0x2200).
It does not work with ng_ubt(4) and require special driver and firmware.

Submitted by:	Rainer Goellner < rainer at jabbe dot de >
Approved by:	re (kensmith)
Obtained from:	Marcel Holtmann < marcel at holtmann dot org >
2005-07-25 16:22:38 +00:00
emax
15d63eb12f MFC to RELENG_6
Fix kernel panic with vkbd(4). Initialize mutex properly (set name), or else
WITNESS gets upset.

Approved by:	re (kensmith)
2005-07-25 16:16:52 +00:00
kensmith
6c9b3447cc New __FreeBSD_version to mark the shared library version bump.
Approved by:	re (hrs)
2005-07-25 13:30:18 +00:00
hmp
9df21e2266 MFC revision 1.27, correct prototype for devstat_compute_etime(3) and
minor wordsmithing in nearby sentences.

PR:         	docs/82636
Approved by:	re (hrs)
2005-07-25 12:31:55 +00:00
rwatson
04d3fc6f5f Merge mac_stub.c:1.54 from HEAD to RELENG_6:
Remove duplicate initialization of mpo_create_stub pointer.

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

Approved by:	re (kensmith)
2005-07-25 09:45:24 +00:00
rwatson
5067032558 Merge kern_mbuf.c:1.10, uipc_mbuf.c:1.32, mbuf.h:1.171 from HEAD to
RELENG_6:

  Define four constants, MBUF_{,MEM,CLUSTER,PACKET,TAG}_MEM_NAME, which
  are string names for their respective UMA zones and malloc types, and
  are passed into uma_zcreate() and MALLOC_DEFINE().  Export them
  outside of _KERNEL in mbuf.h so that netstat can reference them.

  Change the names to improve consistency, with each zone/type
  associated with the mbuf allocator being prefixed mbuf_.

Approved by:	re (kensmith)
2005-07-25 00:08:12 +00:00
rwatson
3791b925d3 Merge bsd.libnames.mk:1.95 from HEAD to RELENG_6:
Add LIBMEMSTAT tp bsd.libnames.mk.

Approved by:	re (kensmith)
2005-07-24 16:17:25 +00:00
rwatson
a89d79844e Merge libmemstat(3) from HEAD to RELENG_6. Original commit description:
Add libmemstat(3), a library for use by debugging and monitoring
  applications in tracking kernel memory statistics.  It provides an
  abstracted interface to uma(9) and malloc(9) statistics, wrapped
  around the recently added binary stream sysctls for the allocators.

  Using this interface, it is easy to build monitoring tools, query
  specific memory types for usage information, etc.  Facilities are
  provided for binding caller-provided data to memory types,
  incremental updates of memory types, and queries that span multiple
  allocators.

  Support for additional allocators is (relatively) easy to add.

  The API for libmemstat(3) will probably change some over time as
  consumers are written, and requirements evolve.  It is written to
  avoid encoding ABIs for data structure layout into consuming
  applications for this reason.

This change merges all improvements, enhancements, bug fixes, etc, as
of this date.  Revisions merged are:

  Makefile:1.1-1.3
  libmemstat.3:1.1-1.6
  memstat.h:1.1-1.7
  memstat_all.c:1.1
  memstat_internal.h:1.5
  memstat_malloc.c:1.1-1.4
  memstat_uma.c:1.1-1.7

Approved by:	re (kensmith)
2005-07-24 14:49:49 +00:00
cvs2svn
35319bf6b8 This commit was manufactured by cvs2svn to create branch 'RELENG_6'. 2005-07-24 01:41:48 +00:00
rwatson
db6e7961b9 Merge kern_malloc.c:1.143,1.144 malloc.h:1.81 from HEAD to RELENG_6:
Introduce a new sysctl, kern.malloc_stats, which exports kernel malloc
  statistics via a binary structure stream:

  - Add structure 'malloc_type_stream_header', which defines a stream
    version, definition of MAXCPUS used in the stream, and a number of
    malloc_type records in the stream.

  - Add structure 'malloc_type_header', which defines the name of the
    malloc type being reported on.

  - When the sysctl is queried, return a stream header, followed by a
    series of type descriptions, each consisting of a type header
    followed by a series of MAXCPUS malloc_type_stats structures holding
    per-CPU allocation information.  Typical values of MAXCPUS will be 1
    (UP compiled kernel) and 16 (SMP compiled kernel).

  This query mechanism allows user space monitoring tools to extract
  memory allocation statistics in a machine-readable form, and to do so
  at a per-CPU granularity, allowing monitoring of allocation patterns
  across CPUs in order to better understand the distribution of work and
  memory flow over multiple CPUs.

  While here:

  - Bump statistics width to uint64_t, and hard code using fixed-width
    type in order to be more sure about structure layout in the stream.
    We allocate and free a lot of memory.

  - Add kmemcount, a counter of the number of registered malloc types,
    in order to avoid excessive manual counting of types.  Export via a
    new sysctl to allow user-space code to better size buffers.

  - De-XXX comment on no longer maintaining the high watermark in old
    sysctl monitoring code.

  A follow-up commit of libmemstat(3), a library to monitor kernel memory
  allocation, will occur in the next few days.  Likewise, similar changes
  to UMA.

kern_malloc.c:1.144:

  Correct build on 64-bit: cast u_int64_t to (unsigned long long) before
  printfing as (unsigned long long).  32-bit build on i386 didn't notice
  this.  Whoops.

  Reported by:    arved
  Tested by:      sledge

Approved by:	re (kensmith)
2005-07-23 17:11:33 +00:00
mlaier
6b5cea57ef MFC: -sp pfsync
Print newly exported pfsync statistics with netstat(8).

  Requested by:   glebius

Approved by:	re (kensmith)
2005-07-23 17:03:59 +00:00
mlaier
e678c5edd8 MFC: if_pfsync.c, 1.20 in_proto.c, 1.78
Export pfsyncstats via sysctl "net.inet.pfsync" in order to print them
  with netstat (seperate commit).

  Requested by:   glebius

Approved by:	re (kensmith)
2005-07-23 17:02:10 +00:00
imura
99200c85ff MFC 1.45: Fix looking up files having invalid short name.
PR:		77074
Approved by:	re (kensmith)
2005-07-23 17:02:04 +00:00
mlaier
54b3d10896 MFC: if.c, 1.236
Move eventhandler for 'ifnet_departure_event' at the end of the progress.
  Some of the (IPv6) cleanup functions send packets to inform peers of the
  departure.  These packets confused users of ifnet_departure_event (pf at
  the moment).

  PR:             kern/80627
  Tested by:      Divacky Roman

Approved by:	re (kensmith)
2005-07-23 17:00:07 +00:00
rwatson
45ebd5c0a6 Merge uma_core.c:1.128 from HEAD to RELENG_6:
Further UMA statistics related changes:

    - Add a new uma_zfree_internal() flag, ZFREE_STATFREE, which causes it to
      to update the zone's uz_frees statistic.  Previously, the statistic was
      updated unconditionally.

    - Use the flag in situations where a "real" free occurs: i.e., one where
      the caller is freeing an allocated item, to be differentiated from
      situations where uma_zfree_internal() is used to tear down the item
      during slab teardown in order to invoke its fini() method.  Also use
      the flag when UMA is freeing its internal objects.

    - When exchanging a bucket with the zone from the per-CPU cache when
      freeing an item, flush cache statistics back to the zone (since the
      zone lock and critical section are both held) to match the allocation
      case.

Approved by:	re (kensmith)
2005-07-23 15:11:13 +00:00
rwatson
5562de6958 Merge uma_core.c:1.127 from HEAD to RELENG_6:
Use mp_maxid in preference to MAXCPU when creating exports of UMA
  per-CPU cache statistics.  UMA sizes the cache array based on the
  number of CPUs at boot (mp_maxid + 1), and iterating based on MAXCPU
  could read off the end of the array (into the next zone).

  Reported by:    yongari

Approved by:	re (kensmith)
2005-07-23 15:10:29 +00:00
rwatson
3fddaeea0e Merge uma.h:1.26, uma_int.h:1.36, uma_core.c:1.126 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-07-23 15:10:00 +00:00
rwatson
834f5ace40 Merge uma_core.c:1.125 from HEAD to RELENG_5:
Move the unlocking of the zone mutex in sysctl_vm_zone_stats() so that
  it covers the following of the uc_alloc/freebucket cache pointers.
  Originally, I felt that the race wasn't helped by holding the mutex,
  hence a comment in the code and not holding it across the cache access.
  However, it does improve consistency, as while it doesn't prevent
  bucket exchange, it does prevent bucket pointer invalidation.  So a
  race in gathering cache free space statistics still can occur, but not
  one that follows an invalid bucket pointer, if the mutex is held.

  Submitted by:   yongari

Approved by:	re (kensmith)
2005-07-23 15:08:53 +00:00
rwatson
5123f5ca4b Merge uma.h:1.25, uma_int.h:1.35, uma_core.c:1.124 from HEAD to
RELENG_6:

  Increase the flags field for kegs from a 16 to a 32 bit value;
  we have exhausted all 16 flags.

Approved by:	re (kensmith)
2005-07-23 15:08:12 +00:00
rwatson
383e61944d Merge uma.h:1.24, uma_int.h:1.34, uma_core.c:1.123 from HEAD to
RELENG_6:

  Track UMA(9) allocation failures by zone, and export via sysctl.

  Requested by:   victor cruceru <victor dot cruceru at gmail dot com>

Approved by:	re (kensmith)
2005-07-23 15:06:54 +00:00
rwatson
adabb7b041 Merge uma.h:1.23, uma_int.h:1.33, uma_core.c:1.122 from HEAD to
RELENG_6:

  Introduce a new sysctl, vm.zone_stats, which exports UMA(9) allocator
  statistics via a binary structure stream:

  - Add structure 'uma_stream_header', which defines a stream version,
    definition of MAXCPUs used in the stream, and the number of zone
    records in the stream.

  - Add structure 'uma_type_header', which defines the name, alignment,
    size, resource allocation limits, current pages allocated, preferred
    bucket size, and central zone + keg statistics.

  - Add structure 'uma_percpu_stat', which, for each per-CPU cache,
    includes the number of allocations and frees, as well as the number
    of free items in the cache.

  - When the sysctl is queried, return a stream header, followed by a
    series of type descriptions, each consisting of a type header
    followed by a series of MAXCPUs uma_percpu_stat structures holding
    per-CPU allocation information.  Typical values of MAXCPU will be
    1 (UP compiled kernel) and 16 (SMP compiled kernel).

  This query mechanism allows user space monitoring tools to extract
  memory allocation statistics in a machine-readable form, and to do so
  at a per-CPU granularity, allowing monitoring of allocation patterns
  across CPUs in order to better understand the distribution of work and
  memory flow over multiple CPUs.

  While here, also export the number of UMA zones as a sysctl
  vm.uma_count, in order to assist in sizing user swpace buffers to
  receive the stream.

  A follow-up commit of libmemstat(3), a library to monitor kernel memory
  allocation, will occur in the next few days.  This change directly
  supports converting netstat(1)'s "-mb" mode to using UMA-sourced stats
  rather than separately maintained mbuf allocator statistics.

Approved by:	re (kensmith)
2005-07-23 15:05:24 +00:00
rwatson
0788375698 Merge uma_int.h:1.32, uma_core.c:1.121 from HEAD to RELENG_6:
In addition to tracking allocs in the zone, also track frees.  Add
  a zone free counter, as well as a cache free counter.

Approved by:	re (kensmith)
2005-07-23 15:03:49 +00:00
rwatson
8093747980 Merge uma_core.c:1.20 from HEAD to RELENG_6:
In an earlier world order, UMA would flush per-CPU statistics to the
  zone whenever it was moving buckets between the zone and the cache,
  or when coalescing statistics across the CPU.  Remove flushing of
  statistics to the zone when coalescing statistics as part of sysctl,
  as we won't be running on the right CPU to write to the cache
  statistics.

  Add a missed gathering of statistics: when uma_zalloc_internal()
  does a special case allocation of a single item, make sure to update
  the zone statistics to represent this.  Previously this case wasn't
  accounted for in user-visible statistics.

Approved by:	re (kensmith)
2005-07-23 15:01:48 +00:00
ume
c4a65195b2 MFC 1.418: mention getaddrinfo(3) ABI breakage on 64 bit arch.
Approved by:	re (kensmith)
2005-07-22 20:21:50 +00:00
ume
34d108ce3b MFC: Remove padding for ABI compatibility of ai_addrlen member
from struct addrinfo.  This change break ABI compatibility on
64 bit arch.

	include/netdb.h:		1.39
	lib/libc/net/getaddrinfo.c:	1.70

Approved by:	re (kensmith)
2005-07-22 20:17:30 +00:00
kensmith
1f1979ea2c Insta-MFC of the shared library version bump. All shared libraries
whose version has not already been bumped since RELENG_5 are being
bumped.

Revisions of files being MFC-ed:

> Path						Revision
> src/gnu/lib/libdialog/Makefile		1.43
> src/gnu/lib/libg2c/Makefile			1.16
> src/gnu/lib/libobjc/Makefile			1.27
> src/gnu/lib/libreadline/Makefile.inc		1.12
> src/gnu/lib/libregex/Makefile			1.32
> src/gnu/lib/libstdc++/Makefile		1.56
> src/kerberos5/lib/Makefile.inc		1.7
> src/lib/Makefile.inc				1.3
> src/lib/libalias/Makefile			1.31
> src/lib/libarchive/Makefile			1.37
> src/lib/libbegemot/Makefile			1.3
> src/lib/libbluetooth/Makefile			1.2
> src/lib/libbsnmp/Makefile.inc			1.6
> src/lib/libbz2/Makefile			1.6
> src/lib/libc_r/Makefile			1.42
> src/lib/libcrypt/Makefile			1.36
> src/lib/libdevstat/Makefile			1.15
> src/lib/libdevstat/devstat.h			1.11
> src/lib/libedit/Makefile			1.29
> src/lib/libexpat/Makefile			1.5
> src/lib/libfetch/Makefile			1.45
> src/lib/libftpio/Makefile			1.14
> src/lib/libgpib/Makefile			1.2
> src/lib/libipsec/Makefile			1.17
> src/lib/libkiconv/Makefile			1.3
> src/lib/libmagic/Makefile			1.7
> src/lib/libmp/Makefile			1.10
> src/lib/libncp/Makefile			1.6
> src/lib/libncurses/Makefile			1.79
> src/lib/libnetgraph/Makefile			1.11
> src/lib/libngatm/Makefile			1.6
> src/lib/libopie/Makefile			1.21
> src/lib/libpam/Makefile.inc			1.17
> src/lib/libpthread/Makefile			1.54
> src/lib/libradius/Makefile			1.12
> src/lib/libsdp/Makefile			1.4
> src/lib/libsmb/Makefile			1.8
> src/lib/libtacplus/Makefile			1.7
> src/lib/libthr/Makefile			1.14
> src/lib/libthread_db/Makefile			1.6
> src/lib/libugidfw/Makefile			1.7
> src/lib/libusbhid/Makefile			1.10
> src/lib/libutil/Makefile			1.57
> src/lib/libvgl/Makefile			1.11
> src/lib/libwrap/Makefile			1.17
> src/lib/libypclnt/Makefile			1.13
> src/lib/msun/Makefile				1.72
> src/secure/lib/libcrypto/Makefile		1.74
> src/secure/lib/libssh/Makefile		1.35
> src/secure/lib/libssl/Makefile		1.22
> src/usr.sbin/bsnmpd/modules/Makefile.inc	1.10

Reviewed by:	ru
Approved by:	re (scottl)
2005-07-22 17:29:10 +00:00
scottl
7ecd401320 MFC rev 1.55: Check the correct IDs for the Dell PERC3/S/Di filter driver.
Approved by: re
2005-07-22 16:29:51 +00:00
emax
4704967d22 MFC to RELENG_6
kbdmux(4) keyboard multiplexer integration

o Hook up kbdmux(4) to the build.

Approved by:	re (kensmith)
2005-07-21 17:47:27 +00:00
kensmith
ed85a2330d Forced commit to note the RELENG_6 branch tag was added to this file so
it can be part of the 6.0 release.

Requested by:	emax
Approved by:	re (implicit)
2005-07-21 17:09:24 +00:00