]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/log
FreeBSD/stable/8.git
12 years agoMFC 223841:
jhb [Thu, 14 Jul 2011 19:09:48 +0000 (19:09 +0000)]
MFC 223841:
Always skip the kernel idle process if requested, it is not specific to
the 'CPU' mode.

git-svn-id: svn://svn.freebsd.org/base/stable/8@224035 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 223510:
jhb [Thu, 14 Jul 2011 19:05:48 +0000 (19:05 +0000)]
MFC 223510:
Don't die if either of INET or INET6 aren't in the running kernel.
Instead, report "protocol not supported" errors at runtime if a user
attempts to use a protocol that the kernel doesn't support.

git-svn-id: svn://svn.freebsd.org/base/stable/8@224034 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 223477,223597,223611:
jhb [Thu, 14 Jul 2011 18:58:18 +0000 (18:58 +0000)]
MFC 223477,223597,223611:
- The recent change to increase the zfsboot size to 64k made a few BIOSes
  unhappy (probably they don't handle crossing the 64k boundary, etc.).
  Fix this by changing zfsldr to use a loop reading from the disk one
  sector at a time.  To avoid trashing the saved copy of the MBR which is
  used for disk I/O, read zfsboot2 at address 0x9000.  This has the
  advantage that BTX no longer needs to be relocated as it is read into
  the correct location.  However, the loop to relocate zfsboot2.bin can
  now cross a 64k boundary, so change it to use relative segments instead.
  (This will need further work if zfsboot2.bin ever exceeds 64k.)

  While here, stop storing a relocated copy of zfsldr at 0x700.  This was
  only used by the xread hack which has recently been removed (and even
  that use was dubious).  Also, include the BIOS error code as hex when
  reporting read errors to aid in debugging.

- Remove the fake BPB from zfsldr.  zfsldr doesn't support booting from
  floppies, so it will not be used as the start of an emulated floppy
  image on a bootable CD which is what the fake BPB was used for.
- Only check that EDD packet mode is available once at the start of
  zfsldr rather than for each disk sector now that we read data in one
  sector at a time.  As a result, collapse the remaining bits of read
  up into nread and rename nread to read.

git-svn-id: svn://svn.freebsd.org/base/stable/8@224033 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 223091:
jhb [Thu, 14 Jul 2011 18:49:23 +0000 (18:49 +0000)]
MFC 223091:
Add location and pnpinfo strings for puc device ports.  The location is
announced during boot and contains the port number.  The pnpinfo string
lists the port type (PUC_TYPE_* constants).

git-svn-id: svn://svn.freebsd.org/base/stable/8@224032 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoBackport SSSE3 instruction set support to base binutils
mm [Thu, 14 Jul 2011 14:23:48 +0000 (14:23 +0000)]
Backport SSSE3 instruction set support to base binutils
and update VIA PadLock instruction set support.

This has turned out to be necessary for some cases to catch up
with gcc update in r221274 (MFC of r219639).

This is direct commit to stable/8

Obtained from: GNU binutils CVS (GPLv2)

git-svn-id: svn://svn.freebsd.org/base/stable/8@224017 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223840:
ae [Thu, 14 Jul 2011 04:21:27 +0000 (04:21 +0000)]
MFC r223840:
  Add again the checking for log_arp_permanent_modify that was by accident
  removed in the r186119.

  PR: kern/154831

git-svn-id: svn://svn.freebsd.org/base/stable/8@223995 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223913:
kib [Wed, 13 Jul 2011 12:53:52 +0000 (12:53 +0000)]
MFC r223913:
Style.

git-svn-id: svn://svn.freebsd.org/base/stable/8@223979 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223911:
kib [Wed, 13 Jul 2011 12:50:23 +0000 (12:50 +0000)]
MFC r223911:
Update locking annotations for the struct vnode.

git-svn-id: svn://svn.freebsd.org/base/stable/8@223978 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r222216:
jh [Wed, 13 Jul 2011 06:20:00 +0000 (06:20 +0000)]
MFC r222216:

In init_dynamic_kenv(), ignore environment strings exceeding the
KENV_MNAMELEN + 1 + KENV_MVALLEN + 1 length limit to avoid buffer
overflow in getenv(). Currenly loader(8) doesn't limit the length of
environment strings.

PR: kern/132104

git-svn-id: svn://svn.freebsd.org/base/stable/8@223977 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223654, r223655, r223780, 223974:
trociny [Wed, 13 Jul 2011 05:42:04 +0000 (05:42 +0000)]
MFC r223654, r223655, r223780, 223974:

r223654:

Make activemap_write_start/complete check the keepdirty list, when
stating if we need to update activemap on disk. This makes keepdirty
serve its purpose -- to reduce number of metadata updates.

Discussed with: pjd

r223655, 223974:

Check the returned value of activemap_write_complete() and update matadata on
disk if needed. This should fix a potential case when extents are cleared in
activemap but metadata is not updated on disk.

Suggested by: pjd

r223780:

Remove useless initialization.

Approved by: pjd (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@223975 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223661:
ae [Wed, 13 Jul 2011 04:27:47 +0000 (04:27 +0000)]
MFC r223661:
  Improve error reporting. Use corresponding error message when file to be
  preprocessed is missing. Also suggest to use absolute pathname if -p
  option is specified.

  PR:             bin/156653

git-svn-id: svn://svn.freebsd.org/base/stable/8@223972 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r223940: If one's message is longer than the buffer size, then we reset
obrien [Tue, 12 Jul 2011 23:39:56 +0000 (23:39 +0000)]
MFC: r223940: If one's message is longer than the buffer size, then we reset
'cnt' at the wrong point and the actual column # get out of sync across the
buffer size.

git-svn-id: svn://svn.freebsd.org/base/stable/8@223969 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r223657
rmacklem [Tue, 12 Jul 2011 21:01:09 +0000 (21:01 +0000)]
MFC: r223657
Fix the new NFSv4 client so that it doesn't fill the cached
mode attribute in as 0 when doing writes. The change adds
the Mode attribute plus the others except Owner and Owner_group
to the list requested by the NFSv4 Write Operation. This fixed
a problem where an executable file built by "cc" would get mode
0111 instead of 0755 for some NFSv4 servers.
Found at the recent NFSv4 interoperability Bakeathon.

git-svn-id: svn://svn.freebsd.org/base/stable/8@223968 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223623:
mm [Tue, 12 Jul 2011 13:16:46 +0000 (13:16 +0000)]
MFC r223623:
Add a new "REFCOMPRESSRATIO" property.

For snapshots, this is the same as COMPRESSRATIO, but for
filesystems/volumes, the COMPRESSRATIO is based on the data "USED" (ie,
includes blocks in children, but not blocks shared with the origin).

This is needed to figure out how much space a filesystem would use if it
were not compressed (ignoring snapshots).

Illumos-gate revision: 13387

Obtained from: Illumos (Feature #1092)

git-svn-id: svn://svn.freebsd.org/base/stable/8@223950 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223862:
zec [Tue, 12 Jul 2011 12:29:32 +0000 (12:29 +0000)]
MFC r223862:
  Permit ARP to proceed for IPv4 host routes for which the gateway is the
  same as the host address.  This already works fine for INET6 and ND6.

  While here, remove two function pointers from struct lltable which are
  only initialized but never used.

git-svn-id: svn://svn.freebsd.org/base/stable/8@223948 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223616:
delphij [Tue, 12 Jul 2011 01:16:43 +0000 (01:16 +0000)]
MFC r223616:

Incorporate vendor commit ecdc5c0a7f7591a7cd4a:

In userland, sign extend the offset for JA instructions.

We currently use that to implement "ip6 protochain", and "pc" might be
wider than "pc->k", in which case we need to arrange that "pc->k" be
sign-extended, by casting it to bpf_int32.

PR: kern/157188
Submitted by: plosher

git-svn-id: svn://svn.freebsd.org/base/stable/8@223941 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223902:
mckusick [Mon, 11 Jul 2011 05:16:12 +0000 (05:16 +0000)]
MFC r223902:
When first creating snapshots, we may free some blocks within it.
These blocks should not have TRIM applied to them.

Submitted by: Kostik Belousov

git-svn-id: svn://svn.freebsd.org/base/stable/8@223918 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223683:
yongari [Sun, 10 Jul 2011 22:09:34 +0000 (22:09 +0000)]
MFC r223683:
  Document two known hardware errata which requires manual link
  configuration.

  Submitted by: Aries Lee (arieslee <> jmicron com)

git-svn-id: svn://svn.freebsd.org/base/stable/8@223915 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r221363,221967,222263,222264,222630,222631,222819,223158,223355:
ae [Sat, 9 Jul 2011 12:02:40 +0000 (12:02 +0000)]
MFC r221363,221967,222263,222264,222630,222631,222819,223158,223355:

r221363:
  Add "-a alignment" option to gpart(8). When it specified gpart(8)
  tries to align partition start offset and size to be multiple of
  alignment value.

r221967:
  Some partitioning schemes want to have partitions that are aligned
  with geometry. And they do recalculation of user specified parameters.
  MBR, PC98, VTOC8, EBR schemes are doing that. For these schemes an
  auto alignment feature (ie. gpart add -a alignment) would not work.
  But it can work for GPT and BSD schemes. BSD scheme usualy is created
  inside MBR, so we can use knowledge about offset of MBR partition to
  calculate aligned values for BSD partitions.

  Use "offset" attribute of the parent provider for better alignment.

r222263:
  Fix calculation of alignment for odd values. Also do not change value
  when it is already aligned.

r222264:
  Simplify ALIGNDOWN macro.

r222630:
  Use stripesize and stripeoffset in the automatic calculation of
  partition offsets. If user requests specific alignment and
  provider's stripesize is not zero, then use a least common multiple
  from the stripesize and user specified value.
  Also fix "gpart resize" implementation: do not try to align the partition
  size, because the start offset may be not aligned. Instead align the
  end offset and then calculate size. Also use stripesize and stripeoffset
  for "gpart resize" command.

r222631:
  Always use LCM when stripesize > 0.

r222819:
  Do not use LCM from stripesize and user specified alignment value.
  When user wants have specific alignment - do what user wants.
  Use stripesize as alignment value in case, when some of gpart's
  arguments are ommitted for automatic calculation.

  Suggested by: mav

r223158:
  Add "alignment" param to the request before calling gpart_autofill().

r223355:
  The "size" param needs no adjusting to stripeoffset.

  Reported by: Kris Moore

git-svn-id: svn://svn.freebsd.org/base/stable/8@223880 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223727 and r223736:
hselasky [Sat, 9 Jul 2011 11:22:23 +0000 (11:22 +0000)]
MFC r223727 and r223736:
- Add quirk for non-compliant USB MIDI hardware.
- Reduce MIDI TX buffer size to 512 bytes.

git-svn-id: svn://svn.freebsd.org/base/stable/8@223879 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMerge from head/ 220800,220837,220914:
glebius [Fri, 8 Jul 2011 14:30:06 +0000 (14:30 +0000)]
Merge from head/ 220800,220837,220914:

Log:
  LibAliasInit() should allocate memory with M_WAITOK flag. Modify it
  and its callers.

Log:
  - Rewrite functions that copyin/out NAT configuration, so that they
    calculate required memory size dynamically.
  - Fix races on chain re-lock.
  - Introduce new field to ip_fw_chain - generation count. Now utilized
    only in the NAT configuration, but can be utilized wider in ipfw.
  - Get rid of NAT_BUF_LEN in ip_fw.h

  PR:           kern/143653

git-svn-id: svn://svn.freebsd.org/base/stable/8@223872 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMerge from head/ 220835,220914,223079,223185,223416,223499:
glebius [Fri, 8 Jul 2011 14:26:42 +0000 (14:26 +0000)]
Merge from head/ 220835,220914,223079,223185,223416,223499:

  Rewrite NAT configuration parser, so that memory allocation size is
  calculated dynamically.

  PR:           kern/143653

git-svn-id: svn://svn.freebsd.org/base/stable/8@223871 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMerge from head/ 220802, 220804:
glebius [Fri, 8 Jul 2011 13:04:47 +0000 (13:04 +0000)]
Merge from head/ 220802, 220804:
  Whitespace fixes.

  Checked with: md5, diff -w

git-svn-id: svn://svn.freebsd.org/base/stable/8@223869 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMerge from head/ 220796:
glebius [Fri, 8 Jul 2011 12:54:10 +0000 (12:54 +0000)]
Merge from head/ 220796:
  Pullup up to TCP header length before matching against 'tcpopts'.

  PR:           kern/156180
  Reviewed by:  luigi

git-svn-id: svn://svn.freebsd.org/base/stable/8@223868 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMerge from head/ 220787:
glebius [Fri, 8 Jul 2011 12:50:35 +0000 (12:50 +0000)]
Merge from head/ 220787:
  It is already seven years since mbuf allocator uses same
  M_WAITOK/M_NOWAIT flags as malloc(9). Update manual page.

  Submitted by: Vadim Goncharov <vadimnuclight tpu.ru>

git-svn-id: svn://svn.freebsd.org/base/stable/8@223867 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223622:
mm [Fri, 8 Jul 2011 09:20:32 +0000 (09:20 +0000)]
MFC r223622:
Disable vdev cache (readahead) by default.

The vdev cache is very underutilized (hit ratio 30%-70%) and may consume
excessive memory on systems with many vdevs.

Illumos-gate revision: 13346
Obtained from: Illumos (Bug #175)

git-svn-id: svn://svn.freebsd.org/base/stable/8@223861 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r222834:
zec [Fri, 8 Jul 2011 09:18:50 +0000 (09:18 +0000)]
MFC r222834:
  Set curvnet context in a callout-trigerred code path.

git-svn-id: svn://svn.freebsd.org/base/stable/8@223860 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223620:
mm [Fri, 8 Jul 2011 09:17:25 +0000 (09:17 +0000)]
MFC r223620:
Allow mountpoints as arguments for the 'zfs get' command.

Illumos-gate revision: 13295
Obtained from: Illumos (Feature #510)

git-svn-id: svn://svn.freebsd.org/base/stable/8@223859 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223506:
pluknet [Fri, 8 Jul 2011 07:38:45 +0000 (07:38 +0000)]
MFC r223506:

 Add support for string values with white spaces for ifconfig(8)
 parameters accepting them (such as description, group).

PR: conf/156675

git-svn-id: svn://svn.freebsd.org/base/stable/8@223858 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r222755: Pass correct size to write(2).
jh [Fri, 8 Jul 2011 06:28:35 +0000 (06:28 +0000)]
MFC r222755: Pass correct size to write(2).

PR: bin/155915

git-svn-id: svn://svn.freebsd.org/base/stable/8@223857 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r223849: note the PF version.
obrien [Thu, 7 Jul 2011 23:32:44 +0000 (23:32 +0000)]
MFC: r223849: note the PF version.

git-svn-id: svn://svn.freebsd.org/base/stable/8@223851 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r222832:
delphij [Thu, 7 Jul 2011 23:26:28 +0000 (23:26 +0000)]
MFC r222832:

Add a special mount option "failok" to indicate that the administrator wants
the system to proceed to boot without bailing out into single user mode,
even when the file system can not be successfully mounted.

This option is implemented in mount(8) and not passed into kernel.

git-svn-id: svn://svn.freebsd.org/base/stable/8@223850 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r221333
rmacklem [Thu, 7 Jul 2011 22:30:12 +0000 (22:30 +0000)]
MFC: r221333
Remove usr/include/nfs/krpc.h and usr/include/nfs/nfsdiskless.h from
ObsoleteFiles.inc, since these files have been reincarnated in the new
NFS implementation.
Discussed with dim@.

git-svn-id: svn://svn.freebsd.org/base/stable/8@223848 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r222808:
ae [Thu, 7 Jul 2011 09:32:43 +0000 (09:32 +0000)]
MFC r222808:
  Sync ng_nat with recent (r222806) ipfw_nat changes:

    Make a behaviour of the libalias based in-kernel NAT a bit closer to
    how natd(8) does work. natd(8) drops packets only when libalias returns
    PKT_ALIAS_IGNORED and "deny_incoming" option is set, but ipfw_nat
    always did drop packets that were not aliased, even if they should
    not be aliased and just are going through.

  Also add SCTP support: mark response packets to skip firewall processing.

git-svn-id: svn://svn.freebsd.org/base/stable/8@223836 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r222806:
ae [Thu, 7 Jul 2011 09:29:11 +0000 (09:29 +0000)]
MFC r222806:
  Make a behaviour of the libalias based in-kernel NAT a bit closer to
  how natd(8) does work. natd(8) drops packets only when libalias returns
  PKT_ALIAS_IGNORED and "deny_incoming" option is set, but ipfw_nat
  always did drop packets that were not aliased, even if they should
  not be aliased and just are going through.

  PR: kern/122109, kern/129093, kern/157379
  Submitted by: Alexander V. Chernikov (previous version)

git-svn-id: svn://svn.freebsd.org/base/stable/8@223835 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223699:
mav [Thu, 7 Jul 2011 08:33:58 +0000 (08:33 +0000)]
MFC r223699:
Add ID for Marvell 88SE9125 SATA controller.

PR: kern/157843

git-svn-id: svn://svn.freebsd.org/base/stable/8@223834 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r223441
rmacklem [Thu, 7 Jul 2011 00:30:34 +0000 (00:30 +0000)]
MFC: r223441
Plug an mbuf leak in the new NFS client that occurred when a
server replied NFS3ERR_JUKEBOX/NFS4ERR_DELAY to an rpc.
This affected both NFSv3 and NFSv4. Found during testing
at the recent NFSv4 interoperability Bakeathon.

git-svn-id: svn://svn.freebsd.org/base/stable/8@223830 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r223436
rmacklem [Thu, 7 Jul 2011 00:14:20 +0000 (00:14 +0000)]
MFC: r223436
Fix the new NFSv4 client so that it uses the same uid as
was used for doing a mount when performing system operations
on AUTH_SYS mounts.  This resolved an issue when mounting
a Linux server. Found during testing at the recent
NFSv4 interoperability Bakeathon.

git-svn-id: svn://svn.freebsd.org/base/stable/8@223829 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223672:
hselasky [Wed, 6 Jul 2011 07:13:28 +0000 (07:13 +0000)]
MFC r223672:
Add support for new UART PCI device.

git-svn-id: svn://svn.freebsd.org/base/stable/8@223821 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r222582:
ae [Wed, 6 Jul 2011 06:56:31 +0000 (06:56 +0000)]
MFC r222582:
  O_FORWARD_IP is only action which depends from the result of lookup of
  dynamic rules. We are doing forwarding in the following cases:
   o For the simple ipfw fwd rule, e.g.

   fwd 10.0.0.1 ip from any to any out xmit em0
   fwd 127.0.0.1,3128 tcp from any to any 80 in recv em1

   o For the dynamic fwd rule, e.g.

    fwd 192.168.0.1 tcp from any to 10.0.0.3 3333 setup keep-state

          When this rule triggers it creates a dynamic rule, but this
   dynamic rule should forward packets only in forward direction.

   o And the last case that does not work before - simple fwd rule which
   triggers when some dynamic rule is already executed.

  PR: kern/136695, kern/147720, kern/150798

git-svn-id: svn://svn.freebsd.org/base/stable/8@223819 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223358:
ae [Wed, 6 Jul 2011 05:42:52 +0000 (05:42 +0000)]
MFC r223358:
  Do not use SET_HOST_IPLEN() macro for IPv6 packets.

  PR: kern/157239

git-svn-id: svn://svn.freebsd.org/base/stable/8@223817 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223660:
ae [Wed, 6 Jul 2011 05:40:22 +0000 (05:40 +0000)]
MFC r223660:
  Initialize elements of state array when creating the GPT table.
  This fixes the problem, when the secondary GPT header is not erased when
  partition table destroyed. Move equal operations from g_part_gpt_create
  and g_part_gpt_recover to the separate function g_gpt_set_defaults.

git-svn-id: svn://svn.freebsd.org/base/stable/8@223816 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoUpdate to version 9.6-ESV-R4-P3
dougb [Wed, 6 Jul 2011 00:50:54 +0000 (00:50 +0000)]
Update to version 9.6-ESV-R4-P3

ALL BIND USERS ARE ENCOURAGED TO UPGRADE IMMEDIATELY

This update addresses the following vulnerability:

CVE-2011-2464
=============
Severity: High
Exploitable: Remotely

Description:

A defect in the affected BIND 9 versions allows an attacker to remotely
cause the "named" process to exit using a specially crafted packet. This
defect affects both recursive and authoritative servers. The code location
of the defect makes it impossible to protect BIND using ACLs configured
within named.conf or by disabling any features at compile-time or run-time.

https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-2464
https://www.isc.org/software/bind/advisories/cve-2011-2464

git-svn-id: svn://svn.freebsd.org/base/stable/8@223815 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoUpdate relevant to the 9.6-ESV-R4-P3 release
dougb [Wed, 6 Jul 2011 00:50:27 +0000 (00:50 +0000)]
Update relevant to the 9.6-ESV-R4-P3 release

git-svn-id: svn://svn.freebsd.org/base/stable/8@223814 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoApply bug fixes
dougb [Wed, 6 Jul 2011 00:49:35 +0000 (00:49 +0000)]
Apply bug fixes

Submitted by: marius

git-svn-id: svn://svn.freebsd.org/base/stable/8@223813 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223610:
yongari [Tue, 5 Jul 2011 23:30:14 +0000 (23:30 +0000)]
MFC r223610:
  Enable CPUSaver D102 E-step microcode loading for 82551 revision
  0x10.

git-svn-id: svn://svn.freebsd.org/base/stable/8@223809 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223608:
yongari [Tue, 5 Jul 2011 23:17:27 +0000 (23:17 +0000)]
MFC r223608:
  Disable microcode loading for 82550 and 82550C controllers. Loading
  the microcode caused SCB timeouts. Linux driver does not allow
  microcode loading for these controllers and jfv also confirmed that
  there is no need to do and it shouldn't.

  PR: kern/103332
  Additional confirmation from: jfv

git-svn-id: svn://svn.freebsd.org/base/stable/8@223807 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMerge r223505 from HEAD to stable/8:
jonathan [Tue, 5 Jul 2011 14:54:33 +0000 (14:54 +0000)]
Merge r223505 from HEAD to stable/8:
--
Tidy up a capabilities-related comment.

This commit refers to an #ifdef that hasn't been merged [yet?]; remove it.

Approved by: rwatson
--

git-svn-id: svn://svn.freebsd.org/base/stable/8@223789 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223644:
pluknet [Tue, 5 Jul 2011 10:21:06 +0000 (10:21 +0000)]
MFC r223644:

Run load_rc_config early to fix quota knobs expansion.

PR: conf/157687

git-svn-id: svn://svn.freebsd.org/base/stable/8@223783 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223625:
pluknet [Tue, 5 Jul 2011 10:03:21 +0000 (10:03 +0000)]
MFC r223625:

 Update ifc_len field of struct ifconf passed for the ioctl SIOCGIFCONF32.

PR: kern/158369

git-svn-id: svn://svn.freebsd.org/base/stable/8@223782 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223728.
hselasky [Tue, 5 Jul 2011 07:05:18 +0000 (07:05 +0000)]
MFC r223728.
Fix for missing nomatch event.

git-svn-id: svn://svn.freebsd.org/base/stable/8@223781 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223375:
delphij [Tue, 5 Jul 2011 02:51:27 +0000 (02:51 +0000)]
MFC r223375:

Remove unneeded headers.

git-svn-id: svn://svn.freebsd.org/base/stable/8@223779 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223374:
delphij [Tue, 5 Jul 2011 02:50:27 +0000 (02:50 +0000)]
MFC r223374:

Staticify cleanup() which is not referenced in other places.

git-svn-id: svn://svn.freebsd.org/base/stable/8@223778 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r217140:
delphij [Tue, 5 Jul 2011 02:49:29 +0000 (02:49 +0000)]
MFC r217140:

Use ether_ntoa instead of home-grown version.

Noticed by: Boris Kochergin <spawk acm poly edu>

git-svn-id: svn://svn.freebsd.org/base/stable/8@223777 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r223382
rmacklem [Tue, 5 Jul 2011 02:15:42 +0000 (02:15 +0000)]
MFC: r223382
Change the NFSv4 nfsuserd daemon so that it doesn't preload the
uid<->username mapping cache with an entry when another entry
for that uid is already loaded. This fixes a case where the
mapping of "toor" would replace "root" when the daemon was started,
resulting in no mapping for "root" until the cache entry for "toor"
timed out.
The algorithm is inefficient, but since it is only done once when
the daemon is started up, I don't think that's an issue.

git-svn-id: svn://svn.freebsd.org/base/stable/8@223776 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r223373
rmacklem [Tue, 5 Jul 2011 01:58:09 +0000 (01:58 +0000)]
MFC: r223373
Fix the new NFSv4 server so that it checks for VREAD_ACL when
a client does a Getattr for an ACL and not VREAD_ATTRIBUTES.
This was found during the recent NFSv4 interoperability Bakeathon.

git-svn-id: svn://svn.freebsd.org/base/stable/8@223775 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r223349
rmacklem [Mon, 4 Jul 2011 01:27:41 +0000 (01:27 +0000)]
MFC: r223349
Fix the new NFSv4 server so that it only allows Lookup of
directories and symbolic links when traversing non-exported
file systems. Found during the recent NFSv4 interoperability
Bakeathon.

git-svn-id: svn://svn.freebsd.org/base/stable/8@223751 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r223348
rmacklem [Mon, 4 Jul 2011 01:06:19 +0000 (01:06 +0000)]
MFC: r223348
Fix the new NFSv4 server so that it allows Access and Readlink
operations while traversing non-exported file systems. This is
required for some non-FreeBSD clients to do NFSv4 mounts. Found during
the recent NFSv4 interoperability Bakeathon.

git-svn-id: svn://svn.freebsd.org/base/stable/8@223750 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r223312
rmacklem [Mon, 4 Jul 2011 00:45:21 +0000 (00:45 +0000)]
MFC: r223312
Fix a number of places where the new NFS server did not
lock the mutex when manipulating rc_flag in the DRC cache.
This is believed to fix a hung server that was reported
to the freebsd-fs@ list on June 9 under the subject heading
"New NFS server stress test hang", where all the threads
were waiting for the RC_LOCKED flag to clear.

git-svn-id: svn://svn.freebsd.org/base/stable/8@223749 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r223309
rmacklem [Mon, 4 Jul 2011 00:24:59 +0000 (00:24 +0000)]
MFC: r223309
Fix the kgssapi so that it can be loaded as a module. Currently
the NFS subsystems use five of the rpcsec_gss/kgssapi entry points,
but since it was not obvious which others might be useful, all
nineteen were included. Basically the nineteen entry points are
set in a structure called rpc_gss_entries and inline functions
defined in sys/rpc/rpcsec_gss.h check for the entry points being
non-NULL and then call them. A default value is returned otherwise.

git-svn-id: svn://svn.freebsd.org/base/stable/8@223748 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMerge r222778 from head:
gavin [Sun, 3 Jul 2011 21:07:21 +0000 (21:07 +0000)]
Merge r222778 from head:

  Rework parts of this man page to improve grammar.

PR: docs/157467 (partially)
Submitted by: Ben Kaduk <kaduk mit.edu> (partially)

git-svn-id: svn://svn.freebsd.org/base/stable/8@223746 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMerge r223446 from head:
gavin [Sun, 3 Jul 2011 21:05:10 +0000 (21:05 +0000)]
Merge r223446 from head:

  Use USB_VENDOR_OVISLINK define rather than the vendor ID.

PR: usb/158142
Submitted by: Robert Millan <rmh debian.org>

git-svn-id: svn://svn.freebsd.org/base/stable/8@223745 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r219847, r221898, r221899, r222224, r223584, r223585:
trociny [Sun, 3 Jul 2011 16:54:27 +0000 (16:54 +0000)]
MFC r219847, r221898, r221899, r222224, r223584, r223585:

r219847 (pjd):

When dropping privileges prefer capsicum over chroot+setgid+setuid.
We can use capsicum for secondary worker processes and hastctl.
When working as primary we drop privileges using chroot+setgid+setuid
still as we need to send ioctl(2)s to ggate device, for which capsicum
doesn't allow (yet).

r221898 (pjd):

When using capsicum to sanbox, still use other methods first, just in case
one of them have some problems.

r221899 (pjd):

Currently we are unable to use capsicum for the primary worker process,
because we need to do ioctl(2)s, which are not permitted in the capability
mode. What we do now is to chroot(2) to /var/empty, which restricts access
to file system name space and we drop privileges to hast user and hast
group.

This still allows to access to other name spaces, like list of processes,
network and sysvipc.

To address that, use jail(2) instead of chroot(2). Using jail(2) will restrict
access to process table, network (we use ip-less jails) and sysvipc (if
security.jail.sysvipc_allowed is turned off). This provides much better
separation.

r222224 (pjd):

To handle BIO_FLUSH and BIO_DELETE requests in secondary worker we need
to use ioctl(2). This is why we can't use capsicum for now to sandbox
secondary. Capsicum is still used to sandbox hastctl.

r223584 (pjd):

Log a warning if we cannot sandbox using capsicum, but only under debug level 1.
It would be too noisy to log it as a proper warning as CAPABILITIES are not
compiled into GENERIC by default.

r223585 (pjd):

Compile capsicum support only if HAVE_CAPSICUM is defined.

Approved by: pjd (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@223743 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223227: rc.subr: Eliminate about 100 forks from the boot sequence.
jilles [Sun, 3 Jul 2011 16:32:03 +0000 (16:32 +0000)]
MFC r223227: rc.subr: Eliminate about 100 forks from the boot sequence.

With the current sh, placing eval in a command substitution always results
in a fork(), even if it is the only command and only executes a single
simple command. Therefore, avoid it where it can be avoided easily.

Side effect: values starting with a hyphen and all whitespace are preserved.
The values are defaults and names for rc.conf variables and messages to be
given about obsolete ones.

The change in the _echoonce function is not included in this MFC because
stable/8 does not have this function.

git-svn-id: svn://svn.freebsd.org/base/stable/8@223742 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r222825: Remove a gratuitous newline.
jh [Sun, 3 Jul 2011 07:14:48 +0000 (07:14 +0000)]
MFC r222825: Remove a gratuitous newline.

PR: bin/153667

git-svn-id: svn://svn.freebsd.org/base/stable/8@223733 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoSince head/ and stable/8 have different handling for geom control request
ae [Sat, 2 Jul 2011 18:43:35 +0000 (18:43 +0000)]
Since head/ and stable/8 have different handling for geom control request
parameters, r215941 should be modified to allow use -F option in the
"gpart restore" command - "force" parameter should be ascii string.

This is direct commit to stable/8.

Reported by: Maxim Ignatenko

git-svn-id: svn://svn.freebsd.org/base/stable/8@223725 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFH r218940: Teach tools/install.sh the -d directory mode.
uqs [Sat, 2 Jul 2011 16:20:58 +0000 (16:20 +0000)]
MFH r218940:     Teach tools/install.sh the -d directory mode.

Sync up with flags understood by install(1) [1], and make install(1)'s
usage output not hide the clearly documented -M flag.

git-svn-id: svn://svn.freebsd.org/base/stable/8@223724 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223216:
delphij [Sat, 2 Jul 2011 00:38:10 +0000 (00:38 +0000)]
MFC r223216:

Sync with OpenBSD (zap rcsid).

git-svn-id: svn://svn.freebsd.org/base/stable/8@223717 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223214:
delphij [Sat, 2 Jul 2011 00:34:02 +0000 (00:34 +0000)]
MFC r223214:

The flags argument of mpool_get() is meaningful, document it.

git-svn-id: svn://svn.freebsd.org/base/stable/8@223716 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223522: sh(1): Improve documentation of shell patterns:
jilles [Fri, 1 Jul 2011 12:30:34 +0000 (12:30 +0000)]
MFC r223522: sh(1): Improve documentation of shell patterns:

* Shell patterns are also for ${var#pat} and the like.
* An '!' by itself will not trigger pathname generation so do not call it a
  meta-character, even though it has a special meaning directly after an
  '['.
* Character ranges are locale-dependent.
* A '^' will complement a character class like '!' but is non-standard.

git-svn-id: svn://svn.freebsd.org/base/stable/8@223711 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223182:
pluknet [Fri, 1 Jul 2011 10:25:48 +0000 (10:25 +0000)]
MFC r223182:

 Return empty cmdline/environ string for processes with kernel address
 space. This is consistent with the behavior in linux.

PR: kern/157871

git-svn-id: svn://svn.freebsd.org/base/stable/8@223707 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223405:
yongari [Wed, 29 Jun 2011 17:18:33 +0000 (17:18 +0000)]
MFC r223405:
  Remove link state change callback handler.  There is no need to
  register both status change and link state change callbacks.
  Implement checking valid link in state change callback and poll
  active link state in vr_tick().  This allows immediate detection of
  lost link as well as protecting driver from frequent link flips during
  link renegotiation.  taskq implementation was removed because driver
  now needs to poll link state in vr_tick().
  While I'm here do not report current link state if interface is not
  running.

  Tested by: n_hibma

git-svn-id: svn://svn.freebsd.org/base/stable/8@223681 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223579:
dim [Wed, 29 Jun 2011 16:43:44 +0000 (16:43 +0000)]
MFC r223579:

For some reason, contrib/traceroute/traceroute.c ensures MAXHOSTNAMELEN
is defined, but then proceeds to use a hardcoded maximum hostname length
of 64 anyway.  Fix this by checking against MAXHOSTNAMELEN instead.

PR: bin/157732

git-svn-id: svn://svn.freebsd.org/base/stable/8@223678 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 223198:
jhb [Wed, 29 Jun 2011 16:16:59 +0000 (16:16 +0000)]
MFC 223198:
- Use a dedicated task to handle deferred transmits from the if_transmit
  method instead of reusing the existing per-queue interrupt task.
  Reusing the per-queue interrupt task could result in both an interrupt
  thread and the taskqueue thread trying to handle received packets on a
  single queue resulting in out-of-order packet processing.
- Don't define igb_start() at all on 8.0 and where if_transmit is used.
  Replace last remaining call to igb_start() with a loop to kick off
  transmit on each queue instead.
- Call ether_ifdetach() earlier in igb_detach().
- Drain tasks and free taskqueues during igb_detach().

git-svn-id: svn://svn.freebsd.org/base/stable/8@223675 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 221393,222930:
jhb [Wed, 29 Jun 2011 15:58:26 +0000 (15:58 +0000)]
MFC 221393,222930:
Reimplement how PCI-PCI bridges manage their I/O windows.  Previously the
driver would verify that requests for child devices were confined to any
existing I/O windows, but the driver relied on the firmware to initialize
the windows and would never grow the windows for new requests.  Now the
driver actively manages the I/O windows.

This is implemented by allocating a bus resource for each I/O window from
the parent PCI bus and suballocating that resource to child devices.  The
suballocations are managed by creating an rman for each I/O window.  The
suballocated resources are mapped by passing the bus_activate_resource()
call up to the parent PCI bus.  Windows are grown when needed by using
bus_adjust_resource() to adjust the resource allocated from the parent PCI
bus.  If the adjust request succeeds, the window is adjusted and the
suballocation request for the child device is retried.

When growing a window, the rman_first_free_region() and
rman_last_free_region() routines are used to determine if the front or
end of the existing I/O window is free.  From using that, the smallest
ranges that need to be added to either the front or back of the window
are computed.  The driver will first try to grow the window in whichever
direction requires the smallest growth first followed by the other
direction if that fails.

Subtractive bridges will first attempt to satisfy requests for child
resources from I/O windows (including attempts to grow the windows).  If
that fails, the request is passed up to the parent PCI bus directly
however.

The PCI-PCI bridge driver will try to use firmware-assigned ranges for
child BARs first and only allocate a "fresh" range if that specific range
cannot be accommodated in the I/O window.  This allows systems where the
firmware assigns resources during boot but later wipes the I/O windows
(some ACPI BIOSen are known to do this) to "rediscover" the original I/O
window ranges.

The ACPI Host-PCI bridge driver has been adjusted to correctly honor
hw.acpi.host_mem_start and the I/O port equivalent when a PCI-PCI bridge
makes a wildcard request for an I/O window range.

The new PCI-PCI bridge driver is only enabled if the NEW_PCIB kernel option
is enabled.

git-svn-id: svn://svn.freebsd.org/base/stable/8@223674 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r222164, r222228, r222467, r223181:
trociny [Tue, 28 Jun 2011 19:27:34 +0000 (19:27 +0000)]
MFC r222164, r222228, r222467, r223181:

r222164 (pjd):

Recognize HIO_FLUSH requests.

r222228 (pjd):

Keep statistics on number of BIO_READ, BIO_WRITE, BIO_DELETE and BIO_FLUSH
requests as well as number of activemap updates.

Number of BIO_WRITEs and activemap updates are especially interesting, because
if those two are too close to each other, it means that your workload needs
bigger number of dirty extents. Activemap should be updated as rarely as
possible.

r222467:

If READ from the local node failed we send the request to the remote
node. There is no use in doing this for synchronization requests.

r223181:

In HAST we use two sockets - one for only sending the data and one for
only receiving the data. In r220271 the unused directions were
disabled using shutdown(2).

Unfortunately, this broke automatic receive buffer sizing, which
currently works only for connections in ETASBLISHED state. It was a
root cause of the issue reported by users, when connection between
primary and secondary could get stuck.

Disable the code introduced in r220271 until the issue with automatic
buffer sizing is not resolved.

Reported by: Daniel Kalchev <daniel@digsys.bg>, danger, sobomax
Tested by: Daniel Kalchev <daniel@digsys.bg>, danger

Approved by: pjd (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@223651 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223642.
hselasky [Tue, 28 Jun 2011 14:10:39 +0000 (14:10 +0000)]
MFC r223642.
LibUSB v1.0 clear stall bugfix.

git-svn-id: svn://svn.freebsd.org/base/stable/8@223643 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoBring iso3166 file in sync with HEAD
edwin [Tue, 28 Jun 2011 10:46:02 +0000 (10:46 +0000)]
Bring iso3166 file in sync with HEAD

MFC of recent updates on the ISO3166 file:

r223633
- Remove AN again now that tzdata2011h has been imported.

r222094
- Put AN back after finding out that tzsetup(1) will complain that
  it doesn't exist. It will be removed again once the tzdata distribution
  files have been updated with the replacements for AN.

r222014
- Revert change to "MF" I made in r189767.  I bet that at the time of r189767
  I checked with http://www.iso.org/iso/country_codes/iso_3166_code_lists.htm
  and "MF" was officially spelled in English as "Saint Martin" there, but now
  that "SX" exists (for "Sint Maarten (Dutch part)") (nice official "English"
  spelling!) they seem to have added a "(French part)" suffix to "MF".  Since
  this is also in line with Newsletter VI-1 (2007-09-21), catch up.

r222011
- ISO3166: Update for newsletters VI-7 and VI-8 from 2010
  - Name change for SH
  - BQ, CW, and SX replace AN

  Reviewed by: ru

r222010
- Whitespace and typo fixes.

  Found by: codespell
  Reviewed by: ru

git-svn-id: svn://svn.freebsd.org/base/stable/8@223634 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC of tzdata2011h, r223629
edwin [Tue, 28 Jun 2011 10:27:49 +0000 (10:27 +0000)]
MFC of tzdata2011h, r223629

- Russia scraps DST in 2011
- Remove Netherlands Antilles, add Bonaire, Curacao, Sint Maarten

git-svn-id: svn://svn.freebsd.org/base/stable/8@223630 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223364:
ae [Tue, 28 Jun 2011 04:57:53 +0000 (04:57 +0000)]
MFC r223364:
  When user specifies the bootcode with size smaller than VTOC_BOOTSIZE,
  gpart_write_partcode_vtoc8 does access out of range of allocated memory.
  Check size of bootcode before writing it.

  Pointed out by: ru

git-svn-id: svn://svn.freebsd.org/base/stable/8@223618 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223495:
hselasky [Mon, 27 Jun 2011 21:45:35 +0000 (21:45 +0000)]
MFC r223495:
  - Add two new API's to libusb20 which can be used to retrive information
  about the parent USB device (which is usually an USB HUB):
  - libusb20_dev_get_parent_address
  - libusb20_dev_get_parent_port

  - Rename libusb20_compat01.c into libusb01.c

git-svn-id: svn://svn.freebsd.org/base/stable/8@223612 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r219257:
hselasky [Mon, 27 Jun 2011 21:30:04 +0000 (21:30 +0000)]
MFC r219257:
Add new USB ID.

PR: usb/155229

git-svn-id: svn://svn.freebsd.org/base/stable/8@223609 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoAdd missing chunk in MFC of r215095.
hselasky [Mon, 27 Jun 2011 21:14:25 +0000 (21:14 +0000)]
Add missing chunk in MFC of r215095.

git-svn-id: svn://svn.freebsd.org/base/stable/8@223607 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223467 and r223472:
hselasky [Mon, 27 Jun 2011 21:04:35 +0000 (21:04 +0000)]
MFC r223467 and r223472:

- Add more USB templates for various USB device classes
- Add basic template support for USB 3.0
- Export definition of template sysctl numbers through usb_ioctl.h

git-svn-id: svn://svn.freebsd.org/base/stable/8@223606 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223486, r223489, r223490, r223511, r223512, r223513,
hselasky [Mon, 27 Jun 2011 20:59:43 +0000 (20:59 +0000)]
MFC r223486, r223489, r223490, r223511, r223512, r223513,
  r223515, r223518, r223519, r223521, r223534, r223535,
  r223536, r223537, r223538, r223543, r223288, r223604 and r223566:

- Export all USB device ID's in so-called sections.
- Fix duplicate occurence of a USB ID in if_urtw and if_zyd.
- Add new tool to autogenerate nomatch entries for devd.
- Add new usb.conf file to auto-load USB drivers.
- Fix some issues related to the nomatch notifications.

PR: misc/157903

git-svn-id: svn://svn.freebsd.org/base/stable/8@223605 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r222087, r222108, r222115, r222116, r222117, r222118, r222119,
trociny [Mon, 27 Jun 2011 20:04:13 +0000 (20:04 +0000)]
MFC r222087, r222108, r222115, r222116, r222117, r222118, r222119,
  r222120, r222121:

r222087 (pjd):

- Add support for AF_INET6 sockets for %S format character.
- Use inet_ntop(3) instead of reimplementing it.
- Use %hhu for unsigned char instead of casting it to unsigned int and
  using %u.

r222108 (pjd):

In preparation for IPv6 support allow to specify multiple addresses to
listen on.

r222115 (pjd):

Rename proto_tcp4.c to proto_tcp.c in preparation for IPv6 support.

r222116 (pjd):

Rename tcp4 to tcp in preparation for IPv6 support.

r222117 (pjd):

Allow [ ] characters in strings. They might be used in IPv6 addresses.

r222118 (pjd):

Now that hell is fully frozen it is good time to add IPv6 support to HAST.

r222119 (pjd):

Rename ipv4/ipv6 to tcp4/tcp6.

r222120 (pjd):

If no listen address is specified, bind by default to:

        tcp4://0.0.0.0:8457
        tcp6://[::]:8457

r222121 (pjd):

Document IPv6 support.

Approved by: pjd (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@223603 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r222225 (pjd):
trociny [Mon, 27 Jun 2011 18:56:43 +0000 (18:56 +0000)]
MFC r222225 (pjd):

Recognize BIO_FLUSH requests and pass them to userland.

Approved by: pjd (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@223602 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoAdd missing support to generate well-formed CTF data in dynamic modules.
kan [Mon, 27 Jun 2011 18:19:54 +0000 (18:19 +0000)]
Add missing support to generate well-formed CTF data in dynamic modules.

git-svn-id: svn://svn.freebsd.org/base/stable/8@223601 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223173:
netchild [Mon, 27 Jun 2011 11:49:58 +0000 (11:49 +0000)]
MFC r223173:
  Add 2-clause BSD license.

  Approved by:        David Kirchner <dpk@dpk.net> (initial author)
  Requested by:       Otto Moerbeek <otto@drijf.net>

git-svn-id: svn://svn.freebsd.org/base/stable/8@223592 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223267:
bz [Mon, 27 Jun 2011 11:13:26 +0000 (11:13 +0000)]
MFC r223267:

  Add 'show logstate' to usage().

MFC r223345:

 Add global -d and -e options to either print device numbers
 (usually default) or enclosure:slot information as (Exx:Sxx)
 or both.

 Discussed with: jhb
 Reviewed by: jhb
Sponsored by: Sandvine Incorporated

git-svn-id: svn://svn.freebsd.org/base/stable/8@223590 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223223:
bz [Mon, 27 Jun 2011 11:10:15 +0000 (11:10 +0000)]
MFC r223223:

 gre(4) was using a field in the softc to detect possible recursion.
 On MP systems this is not a usable solution anymore and could easily
 lead to false positives triggering enough logging that even  using
 the console was no longer usable (multiple parallel ping -f can do).

 Switch to the suggested solution of using mbuf tags to carry per
 packet state between gre_output() invocations.  Contrary to the
 proposed solution modelled after gif(4) only allocate one mbuf tag
 per packet rather than per packet and per gre_output() pass through.

 As the sysctl to control the possible valid (gre in gre) nestings does
 no sanity checks, make sure to always allocate space in the mbuf tag
 for at least one, and at most 255 possible gre interfaces to detect
 loops in addition to the counter.

 Submitted by: Cristian KLEIN (cristi net.utcluj.ro) (original version)
PR: kern/114714
 Reviewed by: Cristian KLEIN (cristi net.utcluj.ro)
 Reviewed bu: Wooseog Choi (ben_choi hotmail.com)
Sponsored by: Sandvine Incorporated

git-svn-id: svn://svn.freebsd.org/base/stable/8@223588 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r222511,r223206: posix_spawn(): Do not fail when trying to close an fd
jilles [Sun, 26 Jun 2011 10:50:11 +0000 (10:50 +0000)]
MFC r222511,r223206: posix_spawn(): Do not fail when trying to close an fd
that is not open.

As noted in Austin Group issue #370 (an interpretation has been issued),
failing posix_spawn() because an fd specified with
posix_spawn_file_actions_addclose() is not open is unnecessarily harsh, and
there are existing implementations that do not fail posix_spawn() for this
reason.

git-svn-id: svn://svn.freebsd.org/base/stable/8@223565 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoUse swap32() right.
delphij [Sun, 26 Jun 2011 07:12:48 +0000 (07:12 +0000)]
Use swap32() right.

Submitted by: gcopper

git-svn-id: svn://svn.freebsd.org/base/stable/8@223560 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223310:
dougb [Sat, 25 Jun 2011 23:13:05 +0000 (23:13 +0000)]
MFC r223310:

Add the netwait rc.d script. It waits for the specified period for the
network to become active.

MFC r223311, r2233408:

The script itself, and a minor fix to it.

git-svn-id: svn://svn.freebsd.org/base/stable/8@223552 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223264:
dougb [Sat, 25 Jun 2011 23:05:56 +0000 (23:05 +0000)]
MFC r223264:

Add rc.d/kld to load kernel modules after local disks are up.

git-svn-id: svn://svn.freebsd.org/base/stable/8@223550 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoPull mergeinfo from r221430 up to etc/ where it belongs
dougb [Sat, 25 Jun 2011 22:57:19 +0000 (22:57 +0000)]
Pull mergeinfo from r221430 up to etc/ where it belongs

git-svn-id: svn://svn.freebsd.org/base/stable/8@223549 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r211094:
dougb [Sat, 25 Jun 2011 22:22:25 +0000 (22:22 +0000)]
MFC r211094:
  "whereis netscape" gives empty output for quite a long time already.
  Suggest to use "whereis firefox" instead.

MFC r212168:
  fix the move so that it matches what the rest of the internet
  says about this game...  This move also makes more sense...

MFC r213287
  Add advice to new fathers from Thomas Ptacek.

MFC r221908
  fortune(6): fix typos and misspellings.

  While here, drop words in the spelling files that are no longer used
  anywhere.

  Speling errors found via: codespell from Lucas De Marchi

MFC r221909
  Convert a file to UTF-8. This only changes a character in the
  copyright section and will not require UTF-8 for fortune(6).

MFC r222890
  Minor typo, fix 2 attributions

git-svn-id: svn://svn.freebsd.org/base/stable/8@223547 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r216587, r222623
rmacklem [Fri, 24 Jun 2011 20:15:44 +0000 (20:15 +0000)]
MFC: r216587, r222623
Fix the nfs related daemons so that they don't intermittently
fail with "bind: address already in use". This problem was reported
to the freebsd-stable@ mailing list on Feb. 19 under the subject
heading "statd/lockd startup failure" by george+freebsd at m5p dot com.
The problem is that the first combination of {udp,tcp X ipv4,ipv6}
would select a port# dynamically, but one of the other three combinations
would have that port# already in use. The patch is somewhat involved
because it was requested by dougb@ that the four combinations use the
same port# wherever possible. The patch splits the create_service()
function into two functions. The first goes as far as bind(2) in a
loop for up to GETPORT_MAXTRY - 1 times, attempting to use the same port#
for all four cases. If these attempts fail, the last attempt allows
the 4 cases to use different port #s. After this function has succeeded,
the second function, called complete_service(), does the rest of what
create_service() did.
The three daemons mountd, rpc.lockd and rpc.statd all have a
create_service() function that is patched in a similar way. However,
create_service() has non-trivial differences for the three daemons
that made it impractical to share the same functions between them.
Also MFC'd r216587 so that r222623 would merge cleanly and mountd.c
would be up to date.

git-svn-id: svn://svn.freebsd.org/base/stable/8@223516 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoOpen the floppy disk device with O_RDONLY rather than O_RDWR. After
joerg [Fri, 24 Jun 2011 19:24:56 +0000 (19:24 +0000)]
Open the floppy disk device with O_RDONLY rather than O_RDWR.  After
all, this is the fd*read* command, and thus should be able to read
even write-protected disks.

git-svn-id: svn://svn.freebsd.org/base/stable/8@223514 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 221324,221324:
jhb [Fri, 24 Jun 2011 17:29:41 +0000 (17:29 +0000)]
MFC 221324,221324:
Add implementations of BUS_ADJUST_RESOURCE() to the PCI bus driver,
generic PCI-PCI bridge driver, x86 nexus driver, x86 Host to PCI bridge
drivers, and the drivers that sit between the x86 Host-PCI bridge drivers
and nexus.

git-svn-id: svn://svn.freebsd.org/base/stable/8@223509 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f