]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
14 years agoUpdate and remove CVS-specific items
des [Thu, 13 Aug 2009 06:07:38 +0000 (06:07 +0000)]
Update and remove CVS-specific items

Approved by: re (kib)

14 years agoHave at least *some* default WWN to fall back on,
mjacob [Thu, 13 Aug 2009 01:17:26 +0000 (01:17 +0000)]
Have at least *some* default WWN to fall back on,
otherwise Sun branded FC cards won't configure.

Reviewed by: Ken, Scott
Approved by: re

14 years agoDrain link state event changes posted during vap destroy. This is a
sam [Wed, 12 Aug 2009 21:19:19 +0000 (21:19 +0000)]
Drain link state event changes posted during vap destroy.  This is a
band-aid for the general problem that if_link_state_change can be
called between if_detach and if_free leaving a task queued that has
been free'd.

Spotted by: thompsa
Reviewed by: rwatson
Approved by: re (rwatson)

14 years agoFirst (early) draft of net80211 documentation. Note this is
sam [Wed, 12 Aug 2009 21:03:16 +0000 (21:03 +0000)]
First (early) draft of net80211 documentation.  Note this is
focused on driver writers (as opposed to folks adding to net80211).

Reviewed by: wkoszek
Approved by: re (rwatson)

14 years agoA piece of code was added to install a host route when an IPv6 interface
qingli [Wed, 12 Aug 2009 19:15:26 +0000 (19:15 +0000)]
A piece of code was added to install a host route when an IPv6 interface
address is configured with a /128 prefix. This is no longer necessary due
to r192011. In fact that code conflicts with r192011. This patch removes
the host route installation when detecting the /128 prefix, and instead
let the code added by r192011 to install the loopback route for that IPv6
interface address.

Reviewed by: bz
Approved by: re

14 years agoAlways embed pointer to BPF JIT function in BPF descriptor
jkim [Wed, 12 Aug 2009 17:28:53 +0000 (17:28 +0000)]
Always embed pointer to BPF JIT function in BPF descriptor
to avoid inconsistency when opt_bpf.h is not included.

Reviewed by: rwatson
Approved by: re (rwatson)

14 years agoAdd a check for a NULL mbuf ptr at the beginning of xdrmbuf_inline()
rmacklem [Wed, 12 Aug 2009 16:27:51 +0000 (16:27 +0000)]
Add a check for a NULL mbuf ptr at the beginning of xdrmbuf_inline()
so that it returns failure instead of crashing when "m->m_len" is
executed and m == NULL. The mbuf ptr can be NULL when a call to
xdrmbuf_getbytes() gets the bytes it needs, but they are at the end
of a short RPC reply. When this happens, xdrmbuf_getbytes() returns
success, but advances the mbuf ptr (xdrs->x_private) to m_next, which
is NULL. If this is followed by a call to xdrmbuf_getlong(), it calls
xdrmbuf_inline(), which would cause a crash by accessing "m->m_len".

Tested by: pho, serenity at exscape dot org
Approved by: re (rwatson), kib (mentor)

14 years agoFix references to the kernel distributions to use the correct names
jhb [Wed, 12 Aug 2009 14:37:57 +0000 (14:37 +0000)]
Fix references to the kernel distributions to use the correct names
(uppercase).

PR: docs/137415
Submitted by: Yuri Gorchakov
Approved by: re (rwatson, kib)
MFC after: 3 days

14 years agoAdd support for radeon RS880 IGP chips to drm.
rnoland [Wed, 12 Aug 2009 12:57:02 +0000 (12:57 +0000)]
Add support for radeon RS880 IGP chips to drm.

Approved by: re (kib)
MFC after: 0 days

14 years agoAdd some additional radeon pci ids to drm.
rnoland [Wed, 12 Aug 2009 12:50:15 +0000 (12:50 +0000)]
Add some additional radeon pci ids to drm.

Approved by: re (kib)
MFC after: 0 days

14 years agoDo not truncate IPv6 addresses when printing them in the
bz [Wed, 12 Aug 2009 12:29:07 +0000 (12:29 +0000)]
Do not truncate IPv6 addresses when printing them in the
jls -av 7.x multi-IP jail backward compat output.

Reported by: ed
Tested by: ed
Reviewed by: rwatson
Approved by: re

14 years agoMake the kernel compile without IP networking by moving
bz [Wed, 12 Aug 2009 12:12:23 +0000 (12:12 +0000)]
Make the kernel compile without IP networking by moving
a variable under a proper #ifdef.

Approved by: re (rwatson)

14 years agoRemove symlinks in OpenSSL's testing framework. These are not required
simon [Wed, 12 Aug 2009 12:10:00 +0000 (12:10 +0000)]
Remove symlinks in OpenSSL's testing framework.  These are not required
for normal build, and doesn't export well to CVS.

If they are needed later a script will be added to recreate the symlinks
when needed at build time.

Approved by: re (rwatson)

14 years agoAdd ddb show dpcpu_off command to ease dpcpu memory debugging.
bz [Wed, 12 Aug 2009 12:06:16 +0000 (12:06 +0000)]
Add ddb show dpcpu_off command to ease dpcpu memory debugging.
While show pcpu prints pc_dynamic this also prints the original
memory address as well as the maths.

Once dpcpu goes NUMA this is considered to help debugging as well.

Reviewed by: rwatson
Approved by: re

14 years agoUpdate DDB show vnet command to print all used and available information.
bz [Wed, 12 Aug 2009 12:00:21 +0000 (12:00 +0000)]
Update DDB show vnet command to print all used and available information.

Reviewed by: rwatson, zec
Approved by: re

14 years agoApply the ntp-related part of r195626 to the correct part of the tree --
cperciva [Wed, 12 Aug 2009 11:55:26 +0000 (11:55 +0000)]
Apply the ntp-related part of r195626 to the correct part of the tree --
the mkver which is used in builds is the one in usr.sbin/ntp/scripts,
not the one in contrib/ntp/scripts.

Pointy hat to: cperciva
Approved by: re (rwatson)

14 years agoUpdate posix1e-related man pages, especially as relates to MAC, to more
rwatson [Wed, 12 Aug 2009 10:46:48 +0000 (10:46 +0000)]
Update posix1e-related man pages, especially as relates to MAC, to more
accurately reflect the last ten years of work.

Approved by: re (kib)

14 years agoCorrectly audit real gids following changes to the audit record argument
rwatson [Wed, 12 Aug 2009 10:45:45 +0000 (10:45 +0000)]
Correctly audit real gids following changes to the audit record argument
interface.

Approved by: re (kib)

14 years agoReverse misordered unlock and lock in at_control for netatalk phase I
rwatson [Wed, 12 Aug 2009 10:44:13 +0000 (10:44 +0000)]
Reverse misordered unlock and lock in at_control for netatalk phase I
addresses.

Submitted by: Russell Cattelan <cattelan at thebarn.com>
Approved by: re (kib)

14 years agoUpdate procstat(1) for the fact that devfs paths are no longer unsupported.
rwatson [Wed, 12 Aug 2009 10:41:37 +0000 (10:41 +0000)]
Update procstat(1) for the fact that devfs paths are no longer unsupported.

Approved by: re (kib)

14 years agoPut minimum alignment on the dpcpu and vnet section so that ld
bz [Wed, 12 Aug 2009 10:26:03 +0000 (10:26 +0000)]
Put minimum alignment on the dpcpu and vnet section so that ld
when adding the __start_ symbol knows the expected section alignment
and can place the __start_ symbol correctly.

These sections will not support symbols with super-cache line alignment
requirements.

For full details, see posting to freebsd-current, 2009-08-10,
Message-ID: <20090810133111.C93661@maildrop.int.zabbadoz.net>.

Debugging and testing patches by:
Kamigishi Rei (spambox haruhiism.net),
np, lstewart, jhb, kib, rwatson
Tested by: Kamigishi Rei, lstewart
Reviewed by: kib
Approved by: re

15 years agoAdd padding to struct inpcb, missed during our padding sweep earlier in
rwatson [Sun, 2 Aug 2009 22:47:08 +0000 (22:47 +0000)]
Add padding to struct inpcb, missed during our padding sweep earlier in
the release cycle.

Approved by: re (kensmith)

15 years agoMany network stack subsystems use a single global data structure to hold
rwatson [Sun, 2 Aug 2009 19:43:32 +0000 (19:43 +0000)]
Many network stack subsystems use a single global data structure to hold
all pertinent statatistics for the subsystem.  These structures are
sometimes "borrowed" by kernel modules that require a place to store
statistics for similar events.

Add KPI accessor functions for statistics structures referenced by kernel
modules so that they no longer encode certain specifics of how the data
structures are named and stored.  This change is intended to make it
easier to move to per-CPU network stats following 8.0-RELEASE.

The following modules are affected by this change:

      if_bridge
      if_cxgb
      if_gif
      ip_mroute
      ipdivert
      pf

In practice, most of these statistics consumers should, in fact, maintain
their own statistics data structures rather than borrowing structures
from the base network stack.  However, that change is too agressive for
this point in the release cycle.

Reviewed by: bz
Approved by: re (kib)

15 years agoStop uuidgen(2) from crashing in vimage kerenels.
julian [Sun, 2 Aug 2009 16:59:02 +0000 (16:59 +0000)]
Stop uuidgen(2) from crashing in vimage kerenels.
make curvnet valid when needed.

Reviewed by: bz@
Approved by: re (kib)

15 years agoMake the newbus subsystem Giant free by adding the new newbus sxlock.
attilio [Sun, 2 Aug 2009 14:28:40 +0000 (14:28 +0000)]
Make the newbus subsystem Giant free by adding the new newbus sxlock.
The newbus lock is responsible for protecting newbus internIal structures,
device states and devclass flags. It is necessary to hold it when all
such datas are accessed. For the other operations, softc locking should
ensure enough protection to avoid races.

Newbus lock is automatically held when virtual operations on the device
and bus are invoked when loading the driver or when the suspend/resume
take place. For other 'spourious' operations trying to access/modify
the newbus topology, newbus lock needs to be automatically acquired and
dropped.

For the moment Giant is also acquired in some key point (modules subsystem)
in order to avoid problems before the 8.0 release as module handlers could
make assumptions about it. This Giant locking should go just after
the release happens.

Please keep in mind that the public interface can be expanded in order
to provide more support, if there are really necessities at some point
and also some bugs could arise as long as the patch needs a bit of
further testing.

Bump __FreeBSD_version in order to reflect the newbus lock introduction.

Reviewed by:    ed, hps, jhb, imp, mav, scottl
No answer by:   ariff, thompsa, yongari
Tested by:      pho,
                G. Trematerra <giovanni dot trematerra at gmail dot com>,
                Brandon Gooch <jamesbrandongooch at gmail dot com>
Sponsored by:   Yahoo! Incorporated
Approved by: re (ksmith)

15 years agoFix two bugs related to TTY input:
ed [Sun, 2 Aug 2009 14:25:26 +0000 (14:25 +0000)]
Fix two bugs related to TTY input:

- fix write() on pseudo-terminal masters to return the amount of bytes
  passed to the TTY, not the amount of bytes read from user.

- fix ttydisc_rint_bypass() to set the high watermark when it cannot
  write all input, just like ttydisc_rint() itself.

Approved by: re (kib)

15 years agoMake the MacBook3,1 boot again.
ed [Sun, 2 Aug 2009 11:26:23 +0000 (11:26 +0000)]
Make the MacBook3,1 boot again.

Approved by: re (kib)

15 years agoImport OpenBSM 1.1p2 from vendor branch to 8-CURRENT. This patch release
rwatson [Sun, 2 Aug 2009 10:27:54 +0000 (10:27 +0000)]
Import OpenBSM 1.1p2 from vendor branch to 8-CURRENT.  This patch release
addresses several minor issues:

- Fix audit_event definitions of AUE_OPENAT_RWT and AUE_OPENAT_RWTC.
- Fix build on Linux.
- Fix printing of class masks in the audump tool.

MFC after: 3 weeks
Obtained from: TrustedBSD Project
Approved by: re (kib)

15 years agoThe colour was red as shall be the letters of this warning to people upon
rwatson [Sat, 1 Aug 2009 22:22:45 +0000 (22:22 +0000)]
The colour was red as shall be the letters of this warning to people upon
boot if the experimental VIMAGE feature was compiled into the kernel.

Submitted by: bz
Reviewed by: zec
Approved by: re (vimage blanket)

15 years agoMinor style tweaks.
rwatson [Sat, 1 Aug 2009 21:58:32 +0000 (21:58 +0000)]
Minor style tweaks.

Approved by: re (vimage blanket)

15 years agoMake the vnet alloc/destroy paths a bit easier to followg by merging
rwatson [Sat, 1 Aug 2009 21:54:15 +0000 (21:54 +0000)]
Make the vnet alloc/destroy paths a bit easier to followg by merging
vnet_data_init/vnet_data_destroy into vnet_alloc/vnet_destroy.

Reviewed by: bz, zec
Approved by: re (vimage blanket)

15 years agoRemove vnet_foreach() utility function, which previously allowed
rwatson [Sat, 1 Aug 2009 20:24:45 +0000 (20:24 +0000)]
Remove vnet_foreach() utility function, which previously allowed
vnet.c to iterate virtual network stacks without being aware of
the implementation details previously hidden in kern_vimage.c.
Now they are in the same file, so remove this added complexity.

Reviewed by: bz
Approved by: re (vimage blanket)

15 years agoMerge the remainder of kern_vimage.c and vimage.h into vnet.c and
rwatson [Sat, 1 Aug 2009 19:26:27 +0000 (19:26 +0000)]
Merge the remainder of kern_vimage.c and vimage.h into vnet.c and
vnet.h, we now use jails (rather than vimages) as the abstraction
for virtualization management, and what remained was specific to
virtual network stacks.  Minor cleanups are done in the process,
and comments updated to reflect these changes.

Reviewed by: bz
Approved by: re (vimage blanket)

15 years agoAdd 8Gb support (isp_2500). Fix a fair number of configuration and
mjacob [Sat, 1 Aug 2009 01:04:26 +0000 (01:04 +0000)]
Add 8Gb support (isp_2500). Fix a fair number of configuration and
firmware loading bugs.

Target mode support has received some serious attention to make it
more usable and stable.

Some backward compatible additions to CAM have been made that make
target mode async events easier to deal with have also been put
into place.

Further refinement and better support for NP-IV (N-port Virtualization)
is now in place.

Code for release prior to RELENG_7 has been stripped away for code clarity.

Sponsored by: Copan Systems

Reviewed by:    scottl, ken, jung-uk kim
Approved by:    re

15 years agoAdd 8Gb card firmware. Update some 2Gb and 4Gb f/w sets.
mjacob [Sat, 1 Aug 2009 00:57:34 +0000 (00:57 +0000)]
Add 8Gb card firmware. Update some 2Gb and 4Gb f/w sets.
Split 4Gb and 8Gb into pieces that can be either multi_id
capable or not.

Reviewed by: scottl, ken
Approved by: re

15 years agofix misplaced #endif that caused tdma handling to be merged with ESS handling
sam [Fri, 31 Jul 2009 19:13:16 +0000 (19:13 +0000)]
fix misplaced #endif that caused tdma handling to be merged with ESS handling
(causing tdma scanning to break)

Approved by: re (kib)

15 years agoFilter setting IFF_PROMISC on tdma vaps; we don't want the underyling device
sam [Fri, 31 Jul 2009 19:12:19 +0000 (19:12 +0000)]
Filter setting IFF_PROMISC on tdma vaps; we don't want the underyling device
to be in promiscuous mode as we have a h/w bssid.

Approved by: re (kib)

15 years agoadd upgt
weongyo [Fri, 31 Jul 2009 17:57:16 +0000 (17:57 +0000)]
add upgt

Approved by: re (kib)

15 years agoMake the "enforce_statfs" default 2 (most restrictive) in jail_set(2),
jamie [Fri, 31 Jul 2009 16:00:41 +0000 (16:00 +0000)]
Make the "enforce_statfs" default 2 (most restrictive) in jail_set(2),
instead of whatever the parent/system has (which is generally 0).  This
mirrors the old-style default used for jail(2) in conjunction with the
security.jail.enforce_statfs sysctl.

Approved by: re (kib), bz (mentor)

15 years agoHandle kernels that don't have IPv6 by not sending an "ip6.addr"
jamie [Fri, 31 Jul 2009 14:30:06 +0000 (14:30 +0000)]
Handle kernels that don't have IPv6 by not sending an "ip6.addr"
parameter unless a (numeric) IPv6 address is given.  Even the default
binaries built with -DINET6 will work with IPv6-less kernels.  With an
eye to the future, similarly handle the possibility of an IPv4-less kernel.

Approved by: re (kib), bz (mentor)

15 years agoFix some LORs between vnode locks and filedescriptor table locks.
jhb [Fri, 31 Jul 2009 13:40:06 +0000 (13:40 +0000)]
Fix some LORs between vnode locks and filedescriptor table locks.
- Don't grab the filedesc lock just to read fd_cmask.
- Drop vnode locks earlier when mounting the root filesystem and before
  sanitizing stdin/out/err file descriptors during execve().

Submitted by: kib
Approved by: re (rwatson)
MFC after: 1 week

15 years agoFree allocated Rx ring dma memory/tags.
kevlo [Fri, 31 Jul 2009 09:57:42 +0000 (09:57 +0000)]
Free allocated Rx ring dma memory/tags.

Reviewed by: yongari@
Approved by: re (kib)

15 years agoCorrect a stack underflow in gzip:
delphij [Fri, 31 Jul 2009 08:37:27 +0000 (08:37 +0000)]
Correct a stack underflow in gzip:

 - Limit suffix to be no more than 30 bytes long.  This matches GNU
   behavior.
 - Correct usage of memcpy().

Note that this commit only corrects the stack underflow issue, we
still need some other fixes to cover other edges. [1]

Reported by: Ron Jude <ronj wytheville org>
Discussed with: Matthew Green (original NetBSD gzip author),
Eygene Ryabinkin <rea-fbsd codelabs ru> [1]
Approved by: re (kib)

15 years agofixes a typo for DWA120 device ID.
weongyo [Thu, 30 Jul 2009 18:53:06 +0000 (18:53 +0000)]
fixes a typo for DWA120 device ID.

Reported by: Alexander Kuznetsov <skritku at gmail.com>
Approved by: re (kib)

15 years agoShow interface name which received short CARP packet (e.g. a VRRP packet),
delphij [Thu, 30 Jul 2009 17:40:47 +0000 (17:40 +0000)]
Show interface name which received short CARP packet (e.g. a VRRP packet),
in order to match other codepaths nearby.  This makes troubleshooting
easier.

Approved by: re (kib)
MFC after: 1 month

15 years agoRemove a LOR, where the the sleepable allprison_lock was being obtained
jamie [Thu, 30 Jul 2009 14:28:56 +0000 (14:28 +0000)]
Remove a LOR, where the the sleepable allprison_lock was being obtained
in prison_equal_ip4/6 while an inp mutex was held.  Locking allprison_lock
can be avoided by making a restriction on the IP addresses associated with
jails:

Don't allow the "ip4" and "ip6" parameters to be changed after a jail is
created.  Setting the "ip4.addr" and "ip6.addr" parameters is allowed,
but only if the jail was already created with either ip4/6=new or
ip4/6=disable.  With this restriction, the prison flags in question
(PR_IP4_USER and PR_IP6_USER) become read-only and can be checked
without locking.

This also allows the simplification of a messy code path that was needed
to handle an existing prison gaining an IP address list.

PR: kern/136899
Reported by: Dirk Meyer
Approved by: re (kib), bz (mentor)

15 years agoReorder and recomment vnet.c and vnet.h on the basis that they are no longer
rwatson [Thu, 30 Jul 2009 12:41:19 +0000 (12:41 +0000)]
Reorder and recomment vnet.c and vnet.h on the basis that they are no longer
solely about the virtual network stack memory allocator.

Approved by: re (vimage blanket)

15 years agoStyle tweak.
rwatson [Thu, 30 Jul 2009 09:51:04 +0000 (09:51 +0000)]
Style tweak.

Approved by: re (kib)
MFC after: 3 days

15 years agoAdd two new privileges for use by OpenAFS, which will be supported for
rwatson [Thu, 30 Jul 2009 08:41:06 +0000 (08:41 +0000)]
Add two new privileges for use by OpenAFS, which will be supported for
FreeBSD 8.x.

MFC after: 3 days
Submitted by: Benjamin Kaduk <kaduk at MIT.EDU>
Approved by: re (kib)

15 years agoMissed this file for r195963:
alfred [Thu, 30 Jul 2009 00:57:54 +0000 (00:57 +0000)]
Missed this file for r195963:
    USB core:
  - add support for defragging of written device data.
  - improve handling of alternate settings in device side mode.
  - correct return value from usbd_get_no_alts() function.
  - reported by: HPS
  - P4 ID: 166156, 166168

  - report USB device release information to devd and pnpinfo.
  - reported by: MIHIRA Sanpei Yoshiro
  - P4 ID: 166221

Submitted by: hps
Approved by: re

15 years agoUSB CORE - Improve HID parsing
alfred [Thu, 30 Jul 2009 00:17:08 +0000 (00:17 +0000)]
USB CORE - Improve HID parsing

See PR description for more info. Patch is
implemented differently than suggested, but
having the same result.

PR:     usb/137188

Submitted by: hps
Approved by: re

15 years agoUSB CORE - compat Linux:
alfred [Thu, 30 Jul 2009 00:16:50 +0000 (00:16 +0000)]
USB CORE - compat Linux:
- Patch request from Tim Borgeaud:
- add automatic locking
- add refcount for killing URB's

Submitted by: hps
Approved by: re

15 years agoUSB controller:
alfred [Thu, 30 Jul 2009 00:16:32 +0000 (00:16 +0000)]
USB controller:
- allow disabling "root_mount_hold()" by setting "hw.usb.no_boot_wait" sysctl

Submitted by: hps
Approved by: re

15 years agoULPT:
alfred [Thu, 30 Jul 2009 00:16:06 +0000 (00:16 +0000)]
ULPT:
- add conditional printer status checking
- P4 ID: 166176

Submitted by: hps
Approved by: re

15 years agoUSB core:
alfred [Thu, 30 Jul 2009 00:15:50 +0000 (00:15 +0000)]
USB core:
- add support for defragging of written device data.
- improve handling of alternate settings in device side mode.
- correct return value from usbd_get_no_alts() function.
- reported by: HPS
- P4 ID: 166156, 166168

- report USB device release information to devd and pnpinfo.
- reported by: MIHIRA Sanpei Yoshiro
- P4 ID: 166221

Submitted by: hps
Approved by: re

15 years agoUSB serial:
alfred [Thu, 30 Jul 2009 00:15:17 +0000 (00:15 +0000)]
USB serial:
- add new ID for Huawei
- P4 ID: 166150

PR:             usb/136761

Submitted by: hps
Approved by: re

15 years agoUSB audio:
alfred [Thu, 30 Jul 2009 00:14:56 +0000 (00:14 +0000)]
USB audio:
- code factoring patch from "Eygene Ryabinkin"
- P4 ID: 166149

Submitted by: hps
Approved by: re

15 years agoUSB CORE:
alfred [Thu, 30 Jul 2009 00:14:34 +0000 (00:14 +0000)]
USB CORE:
- Add minimum polling support to drive UMASS
  and UKBD in case of panic.
- Add extra check to ukbd probe to fix problem about
  mouse devices attaching like keyboards.
- P4 ID: 166148

Submitted by: hps
Approved by: re

15 years ago USB input
alfred [Thu, 30 Jul 2009 00:13:09 +0000 (00:13 +0000)]
    USB input
         - add support for setting the UMS polling rate through -F option
           passed to moused.
         - requested by Alexander Best
         - P4 ID: 166075

PR:             usb/125264

Submitted by: hps
Approved by: re

15 years ago USB controller:
alfred [Thu, 30 Jul 2009 00:12:47 +0000 (00:12 +0000)]
    USB controller:
          - patch from Alexander Motin <mav@freebsd.org>
          - add more ID's
          - P4 ID: 165805

Submitted by: hps
Approved by: re

15 years ago LibUSB v1.0:
alfred [Thu, 30 Jul 2009 00:11:41 +0000 (00:11 +0000)]
    LibUSB v1.0:

        - Significantly improve libusb10 support.
        - Many minor issues fixed.
        - P4 ID: 166189, 165853, 165991, 166052, 166069

Submitted by: hps
Approved by: re

15 years agoFix XEN build breakage, by implementing pmap_invalidate_cache_range()
kib [Wed, 29 Jul 2009 19:38:33 +0000 (19:38 +0000)]
Fix XEN build breakage, by implementing pmap_invalidate_cache_range()
and using it when appropriate. Merge analogue of the r195836
optimization to XEN.

Approved by: re (kensmith)

15 years agoParse the System Resource Affinity Table ('SRAT') used to describe affinity
jhb [Wed, 29 Jul 2009 19:07:24 +0000 (19:07 +0000)]
Parse the System Resource Affinity Table ('SRAT') used to describe affinity
relationships between CPUs and memory.

Reviewed by: jkim
Approved by: re (kib)
MFC after: 1 week

15 years agoDon't allow mixing the "vnet" and "ip4/6" jail parameters, since vnet
jamie [Wed, 29 Jul 2009 16:46:59 +0000 (16:46 +0000)]
Don't allow mixing the "vnet" and "ip4/6" jail parameters, since vnet
jails have their own IP stack and don't have access to the parent IP
addresses anyway.  Note that a virtual network stack forms a break
between prisons with regard to the list of allowed IP addresses.

Approved by: re (kib), bz (mentor)

15 years agoChange the default value of the "ip4" and "ip6" jail parameters to
jamie [Wed, 29 Jul 2009 16:41:02 +0000 (16:41 +0000)]
Change the default value of the "ip4" and "ip6" jail parameters to
"disable", which only allows access to the parent/physical system's
IP addresses when specifically directed.  Change the default value of
"host" to "new", and don't copy the parent host values, to insulate
jails from the parent hostname et al.

Approved by: re (kib), bz (mentor)

15 years agoFix the experimental nfs client so that it only calls ncl_vinvalbuf()
rmacklem [Wed, 29 Jul 2009 14:50:31 +0000 (14:50 +0000)]
Fix the experimental nfs client so that it only calls ncl_vinvalbuf()
for NFSv2 and not NFSv4 when nfscl_mustflush() returns 0. Since
nfscl_mustflush() only returns 0 when there is a valid write delegation
issued to the client, it only affects the case of an NFSv4 mount with
callbacks/delegations enabled.

Approved by:  re (kensmith), kib (mentor)

15 years agoDelete the descriptions of the gssname and allgssname optionss from
rmacklem [Wed, 29 Jul 2009 14:44:09 +0000 (14:44 +0000)]
Delete the descriptions of the gssname and allgssname optionss from
mount_nfs.8 since these options are not implemented in FreeBSD8.
This is content change for the man page.

Approved by: re (kensmith), kib (mentor)

15 years agoUpdate less to v436. This is considered as a bugfix release from vendor.
delphij [Wed, 29 Jul 2009 09:20:32 +0000 (09:20 +0000)]
Update less to v436.  This is considered as a bugfix release from vendor.

Major changes from v429:
 * Don't pass "-" to non-pipe LESSOPEN unless it starts with "-".
 * Allow a fraction as the argument to the -# (--shift) option.
 * Fix highlight bug when underlined/overstruck text matches at end of line.
 * Fix non-regex searches with ctrl-R.

Approved by: re (kensmith, kib)

15 years agoAs was done in r195820 for amd64, use clflush for flushing cache lines
kib [Wed, 29 Jul 2009 08:49:58 +0000 (08:49 +0000)]
As was done in r195820 for amd64, use clflush for flushing cache lines
when memory page caching attributes changed, and CPU does not support
self-snoop, but implemented clflush, for i386.

Take care of possible mappings of the page by sf buffer by utilizing
the mapping for clflush, otherwise map the page transiently. Amd64
used direct map.

Proposed and reviewed by:  alc
Approved by:   re (kensmith)

15 years agoEliminate ARG_UPATH[12] arguments to AUDIT_ARG_UPATH() and instead
rwatson [Wed, 29 Jul 2009 07:44:43 +0000 (07:44 +0000)]
Eliminate ARG_UPATH[12] arguments to AUDIT_ARG_UPATH() and instead
provide specific macros, AUDIT_ARG_UPATH1() and AUDIT_ARG_UPATH2()
to capture path information for audit records.  This allows us to
move the definitions of ARG_* out of the public audit header file,
as they are an implementation detail of our current kernel-internal
audit record, which may change.

Approved by: re (kensmith)
Obtained from: TrustedBSD Project
MFC after: 1 month

15 years agoCurrently there is a problem with fscking UFS file systems created on
pjd [Wed, 29 Jul 2009 05:23:52 +0000 (05:23 +0000)]
Currently there is a problem with fscking UFS file systems created on
top of ZVOLs. The problem is that rc.d/fsck runs before rc.d/zfs. The
latter makes ZVOLs to appear in /dev/. In such case rc.d/fsck cannot
find devfs entry and aborts. We cannot simply move rc.d/zfs before
rc.d/fsck, because we first want kern.hostid to be configured (by
rc.d/hostid). If we won't wait (hostid will be 0) we can reuse disks
which are in use by different systems (eg. in SAN/NAS environment).
We also cannot move rc.d/hostid before rc.d/fsck, because rc.d/hostid on
first system start stores generated kern.hostuuid in /etc/hostid file,
so it needs root file system to be mounted read-write.

The fix is to split rc.d/hostid so that rc.d/hostid (which will now run
before rc.d/fsck) only generates hostid and sets up sysctls, but doesn't
touch root file system and rc.d/hostid_save (which is run after
rc.d/root) and only creates /etc/hostid file.

With that in place, we can move ZVOL initialization to dedicated
rc.d/zvol script which runs before rc.d/fsck.

PR: conf/120194
Reported by: James Snow <snow@teardrop.org>
Reviewed by: brooks
Approved by: re (kib)
MFC after: 2 weeks

15 years agoUpdate to version 9.6.1-P1 which addresses a remote DoS vulnerability:
dougb [Wed, 29 Jul 2009 00:15:39 +0000 (00:15 +0000)]
Update to version 9.6.1-P1 which addresses a remote DoS vulnerability:

Receipt of a specially-crafted dynamic update message may
cause BIND 9 servers to exit. This vulnerability affects all
servers -- it is not limited to those that are configured to
allow dynamic updates. Access controls will not provide an
effective workaround.

More details can be found here: https://www.isc.org/node/474

All BIND users are encouraged to update to a patched version ASAP.

Approved by: re (re -> SO -> dougb)

15 years agoRevise header comments for vnet.h as we now implement VNET_SYSINIT, not
rwatson [Tue, 28 Jul 2009 22:17:34 +0000 (22:17 +0000)]
Revise header comments for vnet.h as we now implement VNET_SYSINIT, not
just VNET_DEFINE in vnet.h.

Approved by: re (vimage blanket)

15 years agoRework vnode argument auditing to follow the same structure, in order
rwatson [Tue, 28 Jul 2009 21:52:24 +0000 (21:52 +0000)]
Rework vnode argument auditing to follow the same structure, in order
to avoid exposing ARG_ macros/flag values outside of the audit code in
order to name which one of two possible vnodes will be audited for a
system call.

Approved by: re (kib)
Obtained from: TrustedBSD Project
MFC after: 1 month

15 years agoAudit file descriptors passed to fooat(2) system calls, which are used
rwatson [Tue, 28 Jul 2009 21:39:58 +0000 (21:39 +0000)]
Audit file descriptors passed to fooat(2) system calls, which are used
instead of the root/current working directory as the starting point for
lookups.  Up to two such descriptors can be audited.  Add audit record
BSM encoding for fooat(2).

Note: due to an error in the OpenBSM 1.1p1 configuration file, a
further change is required to that file in order to fix openat(2)
auditing.

Approved by: re (kib)
Reviewed by: rdivacky (fooat(2) portions)
Obtained from: TrustedBSD Project
MFC after: 1 month

15 years agoStartup the vnet part of initialization a bit after the global part.
julian [Tue, 28 Jul 2009 19:58:07 +0000 (19:58 +0000)]
Startup the vnet part of initialization a bit after the global part.
Fixes crash on boot if ipfw compiled in.

Submitted by: tegge@
Reviewed by: tegge@
Approved by: re (kib)

15 years agoSomewhere along the line accept sockets stopped honoring the
julian [Tue, 28 Jul 2009 19:43:27 +0000 (19:43 +0000)]
Somewhere along the line accept sockets stopped honoring the
FIB selected for them. Fix this.

Reviewed by: ambrisko
Approved by: re (kib)
MFC after: 3 days

15 years agoThe new flow table caches both the routing table entry as well as the
qingli [Tue, 28 Jul 2009 17:16:54 +0000 (17:16 +0000)]
The new flow table caches both the routing table entry as well as the
L2 information. For an indirect route the cached L2 entry contains the
MAC address of the gateway. Typically the default route is used to
transmit multicast packets when explicit multicast routes are not
available. The ether_output() function bypasses L2 resolution function
if it verifies the L2 cache is valid, because the cached L2 address
(a unicast MAC address) is copied into the packets as the destination
MAC address. This validation, however, does not apply to broadcast and
multicast packets because the destination MAC address is mapped
according to a standard method instead.

Submitted by: Xin Li
Reviewed by: bz
Approved by: re

15 years agoFix a bug where wrong initialization value
tuexen [Tue, 28 Jul 2009 15:07:41 +0000 (15:07 +0000)]
Fix a bug where wrong initialization value
in used for an SCTP specific sysctl variable.

Approved by: re, rrs(mentor).
MFC after: 2 weeks.

15 years agoTurns out that when a receiver forwards through its TNS's the
rrs [Tue, 28 Jul 2009 14:09:06 +0000 (14:09 +0000)]
Turns out that when a receiver forwards through its TNS's the
processing code holds the read lock (when processing a
FWD-TSN for pr-sctp). If it finds stranded data that
can be given to the application, it calls sctp_add_to_readq().
The readq function also grabs this lock. So if INVAR is on
we get a double recurse on a non-recursive lock and panic.

This fix will change it so that readq() function gets a
flag to tell if the lock is held, if so then it does not
get the lock.

Approved by: re@freebsd.org (Kostik Belousov)
MFC after: 1 week

15 years agoAdd INDEX-8 to the default portsnap configuration file, and remove INDEX-5.
cperciva [Mon, 27 Jul 2009 20:24:00 +0000 (20:24 +0000)]
Add INDEX-8 to the default portsnap configuration file, and remove INDEX-5.
The Portsnap buildbox now generates teh bits needed for portsnap to produce
INDEX-8; and it hasn't built INDEX-5 for a long time, although the bits are
still distributed for an INDEX-5 from when FreeBSD 5.x reached its EoL.

Approved by: re (kib)
MFC after: 3 days (INDEX-8 addition only)

15 years agoadds DLINK2 DWA120 device.
weongyo [Mon, 27 Jul 2009 20:17:20 +0000 (20:17 +0000)]
adds DLINK2 DWA120 device.

PR: usb/136950
Reported by: Alexander Kuznetsov <skritku at gmail.com>
Approved by: re (kib)

15 years agourtw(4) supports RTL8187B chipset now.
weongyo [Mon, 27 Jul 2009 18:07:44 +0000 (18:07 +0000)]
urtw(4) supports RTL8187B chipset now.

Approved by: re (kib)

15 years agoThis patch does the following:
qingli [Mon, 27 Jul 2009 17:08:06 +0000 (17:08 +0000)]
This patch does the following:

    - Allow loopback route to be installed for address assigned to
      interface of IFF_POINTOPOINT type.
    - Install loopback route for an IPv4 interface addreess when the
      "useloopback" sysctl variable is enabled. Similarly, install
      loopback route for an IPv6 interface address when the sysctl variable
      "nd6_useloopback" is enabled. Deleting loopback routes for interface
      addresses is unconditional in case these sysctl variables were
      disabled after an interface address has been assigned.

Reviewed by: bz
Approved by: re

15 years agoFix the freebsd32 versions of semsys(), shmsys(), and msgsys() to use the
jhb [Mon, 27 Jul 2009 16:03:04 +0000 (16:03 +0000)]
Fix the freebsd32 versions of semsys(), shmsys(), and msgsys() to use the
old ABI versions of the relevant control system call (e.g.
freebsd7_freebsd32_msgctl() instead of freebsd32_msgctl() for msgsys()).

Approved by: re (kib)

15 years agoWe don't support ephemeral IDs in FreeBSD and without this fix ZFS can
pjd [Mon, 27 Jul 2009 14:52:34 +0000 (14:52 +0000)]
We don't support ephemeral IDs in FreeBSD and without this fix ZFS can
panic when in zfs_fuid_create_cred() when userid is negative. It is
converted to unsigned value which makes IS_EPHEMERAL() macro to
incorrectly report that this is ephemeral ID. The most reasonable
solution for now is to always report that the given ID is not ephemeral.

PR: kern/132337
Submitted by: Matthew West <freebsd@r.zeeb.org>
Tested by: Thomas Backman <serenity@exscape.org>, Michael Reifenberger <mike@reifenberger.com>
Approved by: re (kib)
MFC after: 2 weeks

15 years agoMesh fixes, namely:
rpaulo [Mon, 27 Jul 2009 14:22:09 +0000 (14:22 +0000)]
Mesh fixes, namely:
* don't clobber proxy entries
* HWMP seq number processing, including discard of old frames
* flush routing table entries based on nexthop
* print route flags in ifconfig
* more debugging messages and comments

Proxy changes submitted by sam.

Approved by: re (kib)

15 years agoRefine the MacBook hack to only match early models that have Intel ICH.
rpaulo [Mon, 27 Jul 2009 13:51:55 +0000 (13:51 +0000)]
Refine the MacBook hack to only match early models that have Intel ICH.

Discussed with: kjim
Approved by: re (kib)

15 years agoFix the handling of unordered messages when using
tuexen [Mon, 27 Jul 2009 13:41:45 +0000 (13:41 +0000)]
Fix the handling of unordered messages when using
PR-SCTP.

Approved by: re, rrs (mentor)
MFC after: 3 weeks.

15 years ago* Document the dev.asmc.N.light.control sysctl. [1]
rpaulo [Mon, 27 Jul 2009 13:36:35 +0000 (13:36 +0000)]
* Document the dev.asmc.N.light.control sysctl. [1]
* Add more models that have the SMC.

PR: 137168 [1]
Submitted by: Patrick Lamaiziere <patfbsd at davenulle.org>
Approved by: re (kib)

15 years agoGet rid of unused field. This will also be deleted
tuexen [Mon, 27 Jul 2009 12:09:32 +0000 (12:09 +0000)]
Get rid of unused field. This will also be deleted
in the official speciication of the SCTP socket API.

Approved by:re, rrs (mentor)

15 years agoVendor import of less v436.
delphij [Mon, 27 Jul 2009 07:05:08 +0000 (07:05 +0000)]
Vendor import of less v436.

15 years agoNote that COMPAT_43 requires COMPAT_FREEBSD7 too.
kib [Sun, 26 Jul 2009 20:12:06 +0000 (20:12 +0000)]
Note that COMPAT_43 requires COMPAT_FREEBSD7 too.

Submitted by: Steve Kargl
Approved by: re (kensmith)

15 years agoThe parser for Rockridge symlinks tended to insert
kientzle [Sun, 26 Jul 2009 18:11:44 +0000 (18:11 +0000)]
The parser for Rockridge symlinks tended to insert
extra slashes at the beginning of absolute targets.

Thanks to Jung-uk Kim for pointing this out to me.

Approved by: re (kib)

15 years agoAdd a missing unlock for the inp lock when
tuexen [Sun, 26 Jul 2009 15:06:59 +0000 (15:06 +0000)]
Add a missing unlock for the inp lock when
returning early from sctp_add_to_readq().

Approved by: re, rrs (mentor)
MFC after: 2 weeks.

15 years agoRestore PATA device probe order, broken by PMP support implementation,
mav [Sun, 26 Jul 2009 14:04:48 +0000 (14:04 +0000)]
Restore PATA device probe order, broken by PMP support implementation,
requesting IDENTIFY from slave device first. This order is important
for proper cable type detection by master device.

PR: kern/136438
Approved by: re (kib)

15 years agoUpdate epair(4) to the new netisr implementation and polish
bz [Sun, 26 Jul 2009 12:20:07 +0000 (12:20 +0000)]
Update epair(4) to the new netisr implementation and polish
things a bit:
- use dpcpu data to track the ifps with packets queued up,
- per-cpu locking and driver flags
- along with .nh_drainedcpu and NETISR_POLICY_CPU.
- Put the mbufs in flight reference count, preventing interfaces
  from going away, under INVARIANTS as this is a general problem
  of the stack and should be solved in if.c/netisr but still good
  to verify the internal queuing logic.
- Permit changing the MTU to virtually everythinkg like we do for loopback.

Hook epair(4) up to the build.

Approved by: re (kib)

15 years agoMake the in-kernel logic for the SIOCSIFVNET, SIOCSIFRVNET ioctls
bz [Sun, 26 Jul 2009 11:29:26 +0000 (11:29 +0000)]
Make the in-kernel logic for the SIOCSIFVNET, SIOCSIFRVNET ioctls
(ifconfig ifN (-)vnet <jname|jid>) work correctly.

Move vi_if_move to if.c and split it up into two functions(*),
one for each ioctl.

In the reclaim case, correctly set the vnet before calling if_vmove.

Instead of silently allowing a move of an interface from the current
vnet to the current vnet, return an error. (*)

There is some duplicate interface name checking before actually moving
the interface between network stacks without locking and thus race
prone. Ideally if_vmove will correctly and automagically handle these
in the future.

Suggested by: rwatson (*)
Approved by: re (kib)

15 years agoMake ifconfig ifN -vnet <jname|jid> actually work:
bz [Sun, 26 Jul 2009 11:25:57 +0000 (11:25 +0000)]
Make ifconfig ifN -vnet <jname|jid> actually work:

- fix ifconfig to ignore the non-existent interface in the current
  network stack in case of '-vnet'.
- in ifconfig: actually use the local variables defined for the
  vnet functions rather than modifying the global.

Reviewed by: rwatson
Approved by: re (kib)

15 years agoEliminate a stale paragraph from the BUGS section. This "bug" was
alc [Sun, 26 Jul 2009 06:38:56 +0000 (06:38 +0000)]
Eliminate a stale paragraph from the BUGS section.  This "bug" was
eliminated in r195693.

Approved by: re (kensmith)