]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/log
FreeBSD/stable/8.git
13 years agoMFC r209962, r211970-r211972, r212050, r212605, r212611
mm [Wed, 15 Sep 2010 16:05:40 +0000 (16:05 +0000)]
MFC r209962, r211970-r211972, r212050, r212605, r212611

MFC r209962:

Merge ZFS version 15 and almost all OpenSolaris bugfixes referenced
in Solaris 10 updates 141445-09 and 142901-14.

Detailed information:
(OpenSolaris revisions and Bug IDs, Solaris 10 patch numbers)

7844:effed23820ae
6755435 zfs_open() and zfs_close() needs to use ZFS_ENTER/ZFS_VERIFY_ZP (141445-01)

7897:e520d8258820
6748436 inconsistent zpool.cache in boot_archive could panic a zfs root filesystem upon boot-up (141445-01)

7965:b795da521357
6740164 zpool attach can create an illegal root pool (141909-02)

8084:b811cc60d650
6769612 zpool_import() will continue to write to cachefile even if altroot is set (N/A)

8121:7fd09d4ebd9c
6757430 want an option for zdb to disable space map loading and leak tracking (141445-01)

8129:e4f45a0bfbb0
6542860 ASSERT: reason != VDEV_LABEL_REMOVE||vdev_inuse(vd, crtxg, reason, 0) (141445-01)

8188:fd00c0a81e80
6761100 want zdb option to select older uberblocks (141445-01)

8190:6eeea43ced42
6774886 zfs_setattr() won't allow ndmp to restore SUNWattr_rw (141445-01)

8225:59a9961c2aeb
6737463 panic while trying to write out config file if root pool import fails (141445-01)

8227:f7d7be9b1f56
6765294 Refactor replay (141445-01)

8228:51e9ca9ee3a5
6572357 libzfs should do more to avoid mnttab lookups (141909-01)
6572376 zfs_iter_filesystems and zfs_iter_snapshots get objset stats twice (141909-01)

8241:5a60f16123ba
6328632 zpool offline is a bit too conservative (141445-01)
6739487 ASSERT: txg <= spa_final_txg due to scrub/export race (141445-01)
6767129 ASSERT: cvd->vdev_isspare, in spa_vdev_detach() (141445-01)
6747698 checksum failures after offline -t / export / import / scrub (141445-01)
6745863 ZFS writes to disk after it has been offlined (141445-01)
6722540 50% slowdown on scrub/resilver with certain vdev configurations (141445-01)
6759999 resilver logic rewrites ditto blocks on both source and destination (141445-01)
6758107 I/O should never suspend during spa_load() (141445-01)
6776548 codereview(1) runs off the page when faced with multi-line comments (N/A)
6761406 AMD errata 91 workaround doesn't work on 64-bit systems (141445-01)

8242:e46e4b2f0a03
6770866 GRUB/ZFS should require physical path or devid, but not both (141445-01)

8269:03a7e9050cfd
6674216 "zfs share" doesn't work, but "zfs set sharenfs=on" does (141445-01)
6621164 $SRC/cmd/zfs/zfs_main.c seems to have a syntax error in the translation note (141445-01)
6635482 i18n problems in libzfs_dataset.c and zfs_main.c (141445-01)
6595194 "zfs get" VALUE column is as wide as NAME (141445-01)
6722991 vdev_disk.c: error checking for ddi_pathname_to_dev_t() must test for NODEV (141445-01)
6396518 ASSERT strings shouldn't be pre-processed (141445-01)

8274:846b39508aff
6713916 scrub/resilver needlessly decompress data (141445-01)

8343:655db2375fed
6739553 libzfs_status msgid table is out of sync (141445-01)
6784104 libzfs unfairly rejects numerical values greater than 2^63 (141445-01)
6784108 zfs_realloc() should not free original memory on failure (141445-01)

8525:e0e0e525d0f8
6788830 set large value to reservation cause core dump (141445-01)
6791064 want sysevents for ZFS scrub (141445-01)
6791066 need to be able to set cachefile on faulted pools (141445-01)
6791071 zpool_do_import() should not enable datasets on faulted pools (141445-01)
6792134 getting multiple properties on a faulted pool leads to confusion (141445-01)

8547:bcc7b46e5ff7
6792884 Vista clients cannot access .zfs (141445-01)

8632:36ef517870a3
6798384 It can take a village to raise a zio (141445-01)

8636:7e4ce9158df3
6551866 deadlock between zfs_write(), zfs_freesp(), and zfs_putapage() (141909-01)
6504953 zfs_getpage() misunderstands VOP_GETPAGE() interface (141909-01)
6702206 ZFS read/writer lock contention throttles sendfile() benchmark (141445-01)
6780491 Zone on a ZFS filesystem has poor fork/exec performance (141445-01)
6747596 assertion failed: DVA_EQUAL(BP_IDENTITY(&zio->io_bp_orig), BP_IDENTITY(zio->io_bp))); (141445-01)

8692:692d4668b40d
6801507 ZFS read aggregation should not mind the gap (141445-01)

8697:e62d2612c14d
6633095 creating a filesystem with many properties set is slow (141445-01)

8768:dfecfdbb27ed
6775697 oracle crashes when overwriting after hitting quota on zfs (141909-01)

8811:f8deccf701cf
6790687 libzfs mnttab caching ignores external changes (141445-01)
6791101 memory leak from libzfs_mnttab_init (141445-01)

8845:91af0d9c0790
6800942 smb_session_create() incorrectly stores IP addresses (N/A)
6582163 Access Control List (ACL) for shares (141445-01)
6804954 smb_search - shortname field should be space padded following the NULL terminator (N/A)
6800184 Panic at smb_oplock_conflict+0x35() (N/A)

8876:59d2e67b4b65
6803822 Reboot after replacement of system disk in a ZFS mirror drops to grub> prompt (141445-01)

8924:5af812f84759
6789318 coredump when issue zdb -uuuu poolname/ (141445-01)
6790345 zdb -dddd -e poolname coredump (141445-01)
6797109 zdb: 'zdb -dddddd pool_name/fs_name inode' coredump if the file with inode was deleted (141445-01)
6797118 zdb: 'zdb -dddddd poolname inum' coredump if I miss the fs name (141445-01)
6803343 shareiscsi=on failed, iscsitgtd failed request to share (141445-01)

9030:243fd360d81f
6815893 hang mounting a dataset after booting into a new boot environment (141445-01)

9056:826e1858a846
6809691 'zpool create -f' no longer overwrites ufs infomation (141445-01)

9179:d8fbd96b79b3
6790064 zfs needs to determine uid and gid earlier in create process (141445-01)

9214:8d350e5d04aa
6604992 forced unmount + being in .zfs/snapshot/<snap1> = not happy (141909-01)
6810367 assertion failed: dvp->v_flag & VROOT, file: ../../common/fs/gfs.c, line: 426 (141909-01)

9229:e3f8b41e5db4
6807765 ztest_dsl_dataset_promote_busy needs to clean up after ENOSPC (141445-01)

9230:e4561e3eb1ef
6821169 offlining a device results in checksum errors (141445-01)
6821170 ZFS should not increment error stats for unavailable devices (141445-01)
6824006 need to increase issue and interrupt taskqs threads in zfs (141445-01)

9234:bffdc4fc05c4
6792139 recovering from a suspended pool needs some work (141445-01)
6794830 reboot command hangs on a failed zfs pool (141445-01)

9246:67c03c93c071
6824062 System panicked in zfs_mount due to NULL pointer dereference when running btts and svvs tests (141909-01)

9276:a8a7fc849933
6816124 System crash running zpool destroy on broken zpool (141445-03)

9355:09928982c591
6818183 zfs snapshot -r is slow due to set_snap_props() doing txg_wait_synced() for each new snapshot (141445-03)

9391:413d0661ef33
6710376 log device can show incorrect status when other parts of pool are degraded (141445-03)

9396:f41cf682d0d3 (part already merged)
6501037 want user/group quotas on ZFS (141445-03)
6827260 assertion failed in arc_read(): hdr == pbuf->b_hdr (141445-03)
6815592 panic: No such hold X on refcount Y from zfs_znode_move (141445-03)
6759986 zfs list shows temporary %clone when doing online zfs recv (141445-03)

9404:319573cd93f8
6774713 zfs ignores canmount=noauto when sharenfs property != off (141445-03)

9412:4aefd8704ce0
6717022 ZFS DMU needs zero-copy support (141445-03)

9425:e7ffacaec3a8
6799895 spa_add_spares() needs to be protected by config lock (141445-03)
6826466 want to post sysevents on hot spare activation (141445-03)
6826468 spa 'allowfaulted' needs some work (141445-03)
6826469 kernel support for storing vdev FRU information (141445-03)
6826470 skip posting checksum errors from DTL regions of leaf vdevs (141445-03)
6826471 I/O errors after device remove probe can confuse FMA (141445-03)
6826472 spares should enjoy some of the benefits of cache devices (141445-03)

9443:2a96d8478e95
6833711 gang leaders shouldn't have to be logical (141445-03)

9463:d0bd231c7518
6764124 want zdb to be able to checksum metadata blocks only (141445-03)

9465:8372081b8019
6830237 zfs panic in zfs_groupmember() (141445-03)

9466:1fdfd1fed9c4
6833162 phantom log device in zpool status (141445-03)

9469:4f68f041ddcd
6824968 add ZFS userquota support to rquotad (141445-03)

9470:6d827468d7b5
6834217 godfather I/O should reexecute (141445-03)

9480:fcff33da767f
6596237 Stop looking and start ganging (141909-02)

9493:9933d599bc93
6623978 lwb->lwb_buf != NULL, file ../../../uts/common/fs/zfs/zil.c, line 787, function zil_lwb_commit (141445-06)

9512:64cafcbcc337
6801810 Commit of aligned streaming rewrites to ZIL device causes unwanted disk reads (N/A)

9515:d3b739d9d043
6586537 async zio taskqs can block out userland commands (142901-09)

9554:787363635b6a
6836768 zfs_userspace() callback has no way to indicate failure (N/A)

9574:1eb6a6ab2c57
6838062 zfs panics when an error is encountered in space_map_load() (141909-02)

9583:b0696cd037cc
6794136 Panic BAD TRAP: type=e when importing degraded zraid pool. (141909-03)

9630:e25a03f552e0
6776104 "zfs import" deadlock between spa_unload() and spa_async_thread() (141445-06)

9653:a70048a304d1
6664765 Unable to remove files when using fat-zap and quota exceeded on ZFS filesystem (141445-06)

9688:127be1845343
6841321 zfs userspace / zfs get userused@ doesn't work on mounted snapshot (N/A)
6843069 zfs get userused@S-1-... doesn't work (N/A)

9873:8ddc892eca6e
6847229 assertion failed: refcount_count(&tx->tx_space_written) + delta <= tx->tx_space_towrite in dmu_tx.c (141445-06)

9904:d260bd3fd47c
6838344 kernel heap corruption detected on zil while stress testing (141445-06)

9951:a4895b3dd543
6844900 zfs_ioc_userspace_upgrade leaks (N/A)

10040:38b25aeeaf7a
6857012 zfs panics on zpool import (141445-06)

10000:241a51d8720c
6848242 zdb -e no longer works as expected (N/A)

10100:4a6965f6bef8
6856634 snv_117 not booting: zfs_parse_bootfs: error2 (141445-07)

10160:a45b03783d44
6861983 zfs should use new name <-> SID interfaces (N/A)
6862984 userquota commands can hang (141445-06)

10299:80845694147f
6696858 zfs receive of incremental replication stream can dereference NULL pointer and crash (N/A)

10302:a9e3d1987706
6696858 zfs receive of incremental replication stream can dereference NULL pointer and crash (fix lint) (N/A)

10575:2a8816c5173b (partial merge)
6882227 spa_async_remove() shouldn't do a full clear (142901-14)

10800:469478b180d9
6880764 fsync on zfs is broken if writes are greater than 32kb on a hard crash and no log attached (142901-09)
6793430 zdb -ivvvv assertion failure: bp->blk_cksum.zc_word[2] == dmu_objset_id(zilog->zl_os) (N/A)

10801:e0bf032e8673 (partial merge)
6822816 assertion failed: zap_remove_int(ds_next_clones_obj) returns ENOENT (142901-09)

10810:b6b161a6ae4a
6892298 buf->b_hdr->b_state != arc_anon, file: ../../common/fs/zfs/arc.c, line: 2849 (142901-09)

10890:499786962772
6807339 spurious checksum errors when replacing a vdev (142901-13)

11249:6c30f7dfc97b
6906110 bad trap panic in zil_replay_log_record (142901-13)
6906946 zfs replay isn't handling uid/gid correctly (142901-13)

11454:6e69bacc1a5a
6898245 suspended zpool should not cause rest of the zfs/zpool commands to hang (142901-10)

11546:42ea6be8961b (partial merge)
6833999 3-way deadlock in dsl_dataset_hold_ref() and dsl_sync_task_group_sync() (142901-09)

MFC r211970:

Fix 'zfs allow' (maybe not only) returning:

        cannot access dataset system/usr/home: Operation not supported

by including libzfs_impl.h. What libzfs_impl.h does is to redefine ioctl() to
be compatible with OpenSolaris. More specifically OpenSolaris returns ENOMEM
when buffer is too small and sets field zc_nvlist_dst_size to the size that
will be big enough for the data. In FreeBSD case ioctl() doesn't copy data
structure back in case of a failure. We work-around it in kernel and libzfs by
returning 0 from ioctl() and always checking if zc_nvlist_dst_size hasn't
changed. For this work-around to work in pyzfs we need this compatible ioctl()
which is implemented in libzfs_impl.h.

MFC r211971:

Print errors on stderr.

MFC r211972:

Give user a hint what to do when /usr/lib/zfs/pyzfs.py is missing.

MFC r212050:

When upgrading a pool which contain root file system, give user a hint that
he should update boot code.

MFC r212605:

Add missing vop_vector zfsctl_ops_shares
Add missing locks around VOP_READDIR and VOP_GETATTR with z_shares_dir

MFC r212611:

Remove duplicated VFS_HOLD due to a mismerge.

Approved by: delphij (mentor)
Obtained from: OpenSolaris (multiple Bug IDs), Perforce (pjd)

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

13 years agoMFC r212115:
mdf [Wed, 15 Sep 2010 15:53:05 +0000 (15:53 +0000)]
MFC r212115:

Fix a bug with sched_affinity() where it checks td_pinned of another
thread in a racy manner, which can lead to attempting to migrate a
thread that is pinned to a CPU.  Instead, have sched_switch() determine
which CPU a thread should run on if the current one is not allowed.

KASSERT in sched_bind() that the thread is not yet pinned to a CPU.

KASSERT in sched_switch() that only migratable threads or those moving
due to a sched_bind() are changing CPUs.

Note that this is direct commit as ipi_cpu() only exists in CURRENT.

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

13 years agoMFC r212363:
nwhitehorn [Wed, 15 Sep 2010 13:45:06 +0000 (13:45 +0000)]
MFC r212363:

Reorder statistics tracking and table lock acquisitions already in place
to avoid race conditions updating the PVO statistics.

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

13 years agoMFC r211967,212044,212278,212322,212331:
nwhitehorn [Wed, 15 Sep 2010 13:43:43 +0000 (13:43 +0000)]
MFC r211967,212044,212278,212322,212331:

Fix a variety of race conditions and errors in VSID allocation in both
the 32 and 64-bit PMAP modules, some dating back to the original PMAP
import from NetBSD. This fixes a variety of potential crashes and memory
corruption bugs, especially on SMP systems under heavy load.

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

13 years agoMFC r212317 & r212412
sanpei [Wed, 15 Sep 2010 11:04:02 +0000 (11:04 +0000)]
MFC r212317 & r212412
Add Buffalo (Melco Inc.) LUA3-U2-ATX
Add Planex UE-200TX-G

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

13 years agoMFC r211874:
andre [Wed, 15 Sep 2010 09:38:01 +0000 (09:38 +0000)]
MFC r211874:

  Use timestamp modulo comparison macro for automatic receive buffer
  scaling to correctly handle wrapping of ticks value.

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

13 years agoMFC r209064: Remove unused assignment.
avg [Wed, 15 Sep 2010 08:24:19 +0000 (08:24 +0000)]
MFC r209064: Remove unused assignment.

Original commit by jkim.

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

13 years agoMFC r209055: Fix a possible dereference of null pointer.
avg [Wed, 15 Sep 2010 08:18:20 +0000 (08:18 +0000)]
MFC r209055: Fix a possible dereference of null pointer.

Original commit by jkim.

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

13 years agoMFC r211762: zfs arc_reclaim_thread: no need to call arc_reclaim_needed
avg [Wed, 15 Sep 2010 08:03:23 +0000 (08:03 +0000)]
MFC r211762: zfs arc_reclaim_thread: no need to call arc_reclaim_needed
when resetting needfree

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

13 years agoMFC r212501:
kib [Wed, 15 Sep 2010 07:30:27 +0000 (07:30 +0000)]
MFC r212501:
Add DF_1_LOADFLTR.

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

13 years agoMFC r212499:
kib [Wed, 15 Sep 2010 07:28:31 +0000 (07:28 +0000)]
MFC r212499:
Fix typo.

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

13 years agoMFC: r212043
rmacklem [Tue, 14 Sep 2010 01:28:05 +0000 (01:28 +0000)]
MFC: r212043
Add a null_remove() function to nullfs, so that the v_usecount
of the lower level vnode is incremented to greater than 1 when
the upper level vnode's v_usecount is greater than one. This
is necessary for the NFS clients, so that they will do a silly
rename of the file instead of actually removing it when the
file is still in use. It is "racy", since the v_usecount is
incremented in many places in the kernel with
minimal synchronization, but an extraneous silly rename is
preferred to not doing a silly rename when it is required.
The only other file systems that currently check the value
of v_usecount in their VOP_REMOVE() functions are nwfs and
smbfs. These file systems choose to fail a remove when the
v_usecount is greater than 1 and I believe will function
more correctly with this patch, as well.

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

13 years agoMFC r212296
emax [Tue, 14 Sep 2010 00:32:29 +0000 (00:32 +0000)]
MFC r212296

Do not request SDP attributes using ranges.
Apparently some devices do not like it.

Tested by: Buganini < buganini at gmail dot com >

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

13 years agoMFC r211213:
kib [Mon, 13 Sep 2010 20:29:09 +0000 (20:29 +0000)]
MFC r211213:
The buffers b_vflags field is not always properly protected by
bufobj lock. If b_bufobj is not NULL, then bufobj lock should be
held when manipulating the flags. Not doing this sometimes leaves
BV_BKGRDINPROG to be erronously set, causing softdep' getdirtybuf() to
stuck indefinitely in "getbuf" sleep, waiting for background write to
finish which is not actually performed.

Add BO_LOCK() in the cases where it was missed.

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

13 years agoMFC 212263.
gjb [Mon, 13 Sep 2010 17:30:29 +0000 (17:30 +0000)]
MFC 212263.

Fix typo in bsdcpio(1).

Approved by: keramida (mentor)

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

13 years agoMFC 212269.
gjb [Mon, 13 Sep 2010 17:27:43 +0000 (17:27 +0000)]
MFC 212269.

Add ECONNRESET to connect(2).

Approved by: keramida (mentor)

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

13 years agoMFC r209053:
mdf [Mon, 13 Sep 2010 17:18:49 +0000 (17:18 +0000)]
MFC r209053:

Add INVARIANTS checking that numfreebufs values are sane.  Also add a
per-buf flag to catch if a buf is double-counted in the free count.
This code was useful to debug an instance where a local patch at Isilon
was incorrectly managing numfreebufs for a new buf state.

Requested by: Kostic Belousov

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

13 years agoRegen
kib [Mon, 13 Sep 2010 08:49:51 +0000 (08:49 +0000)]
Regen

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

13 years agoMFC r211998:
kib [Mon, 13 Sep 2010 08:49:08 +0000 (08:49 +0000)]
MFC r211998:
Make the syscalls reserved for AFS usable by OpenAFS port.

The 'NOTSTATIC' flag is removed on merge, since corresponding functionality
is not implemented in the RELENG_8.

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

13 years agoMFC r212436:
jamie [Mon, 13 Sep 2010 00:42:07 +0000 (00:42 +0000)]
MFC r212436:

  Don't exit kern_jail_set without freeing options when enforce_statfs
  has an illegal value.

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

13 years agoMFC 212241.
gjb [Sun, 12 Sep 2010 18:37:34 +0000 (18:37 +0000)]
MFC 212241.

Note that jail_list should contain alphanumeric characters only.

PR: 150098
Approved by: keramida (mentor)

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

13 years agoMFC r212008, 212028, 212210: Vendor update to version 3.80.06.003 to
delphij [Sun, 12 Sep 2010 06:19:35 +0000 (06:19 +0000)]
MFC r212008, 212028, 212210: Vendor update to version 3.80.06.003 to
fix panic with ZFS under heavy I/O load.

PR:             kern/149968
Submitted by:   LSI (Tom Couch)
Reported by:    Kai Kockro <kkockro web de>
Tested by:      Kai Kockro, jpaetzel

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

13 years agoMFC r211157, r211193, r212265, r212266: make it possible to load carp(4) as
will [Sat, 11 Sep 2010 22:02:36 +0000 (22:02 +0000)]
MFC r211157, r211193, r212265, r212266: make it possible to load carp(4) as
a kld using function pointer hooks and {pf_,ip,ip6}proto_{un,}register().

Reviewed by: bz
Approved by: ken (mentor)

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

13 years agoRemove unused variable 'idle' which mistakenly got merged in r212472.
brucec [Sat, 11 Sep 2010 21:52:40 +0000 (21:52 +0000)]
Remove unused variable 'idle' which mistakenly got merged in r212472.

Approved by: rrs (mentor)

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

13 years agoMerge r212162 from head:
gavin [Sat, 11 Sep 2010 18:50:33 +0000 (18:50 +0000)]
Merge r212162 from head:

  Correct spelling mistake, int -> into

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

13 years agoMFC r211415:
brucec [Sat, 11 Sep 2010 14:34:16 +0000 (14:34 +0000)]
MFC r211415:

Add -m and -M options to control the minimum and maximum frequency.

PR: bin/145063
Submitted by: Boris Kochergin <spawk at acm.poly.edu>
Approved by: rrs (mentor)

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

13 years agoMFC r211419:
brucec [Sat, 11 Sep 2010 14:26:18 +0000 (14:26 +0000)]
MFC r211419:

Since top displays the uptime including seconds, there is no need to add 30
onto it, which may have been used for rounding purposes in other utilities.

PR: bin/147934
Submitted by: Janne Snabb <snabb at epipe.com>
Approved by: rrs (mentor)

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

13 years agoMFC r206909:
brucec [Sat, 11 Sep 2010 14:18:30 +0000 (14:18 +0000)]
MFC r206909:

It's not necessary to reset the chip every time an input overflow event
occurs. In addition, the delay when programming the short cable fix
should be 100us, not 100ms.

PR: kern/64556
Approved by: rrs (mentor)

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

13 years agoMFC r212214: sh: Get rid of some magic numbers.
jilles [Sat, 11 Sep 2010 12:51:01 +0000 (12:51 +0000)]
MFC r212214: sh: Get rid of some magic numbers.

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

13 years agoMFC r211940:
kib [Sat, 11 Sep 2010 06:38:34 +0000 (06:38 +0000)]
MFC r211940:
Test the poll(2) return value.

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

13 years agoMFC: r211953
rmacklem [Sat, 11 Sep 2010 02:00:27 +0000 (02:00 +0000)]
MFC: r211953
Add acquisition of a reference count on nfsv4root_lock in the
nfsd_recalldelegation() function, since this function is called
by nfsd threads when they are handling NFSv2 or NFSv3 RPCs, where
no reference count would have been acquired.

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

13 years agoMFC: r211951
rmacklem [Sat, 11 Sep 2010 01:08:16 +0000 (01:08 +0000)]
MFC: r211951
The timer routine in the experimental NFS server did not acquire
the correct mutex when checking nfsv4root_lock. Although this
could be fixed by adding mutex lock/unlock calls, zack.kirsch at
isilon.com suggested a better fix that uses a non-blocking
acquisition of a reference count on nfsv4root_lock. This fix
allows the weird NFSLOCKSTATE(); NFSUNLOCKSTATE(); synchronization
to be deleted. This patch applies this fix.

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

13 years agoMFC r211194, r211229, r212058, r212063: memguard(9) rewrite
mdf [Fri, 10 Sep 2010 17:26:41 +0000 (17:26 +0000)]
MFC r211194, r211229, r212058, r212063: memguard(9) rewrite

r211194:

Rework memguard(9) to reserve significantly more KVA to detect
use-after-free over a longer time.  Also release the backing pages of
a guarded allocation at free(9) time to reduce the overhead of using
memguard(9).  Allow setting and varying the malloc type at run-time.
Add knobs to allow:

 - randomly guarding memory
 - adding un-backed KVA guard pages to detect underflow and overflow
 - a lower limit on the size of allocations that are guarded

r211229:

Fix compile.  It seemed better to have memguard.c include opt_vm.h in
case future compile-time knobs were added that it wants to use.
Also add include guards and forward declarations to vm/memguard.h.

r212058:

The realloc case for memguard(9) will copy too many bytes when
reallocating to a smaller-sized allocation.  Fix this issue.

r212063:

Have memguard(9) crash with an easier-to-debug message on double-free.

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

13 years agoMFC r211861:
nwhitehorn [Fri, 10 Sep 2010 15:33:26 +0000 (15:33 +0000)]
MFC r211861:

pmap_mapdev() does not appear to actually need GIANT to be held here,
and asserting that is held breaks drm.

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

13 years agoMFC r211941:
kib [Fri, 10 Sep 2010 12:55:36 +0000 (12:55 +0000)]
MFC r211941:
Recalcule the return value in pollout().

PR: kern/143029
Tested by: John Plevyak <jplevyak apache org>

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

13 years agoMFC:
imp [Fri, 10 Sep 2010 03:52:05 +0000 (03:52 +0000)]
MFC:
    r212169: Allow / in the NANO_DEVICE
    r209225: Allow boot.config to have different values than just -h.
    r209210: Allow population of /cfg and /data.  Begin the move to
making all slice creation overrideable too, but there's a few
problems doing that for the duplicated partitions (s1 and s2), so
just comment that it needs work.
    r209209: Create a make.conf.  not needed for runtime, but some ports
want to spam it at compile or install time.
    r209207: make these convenience functions more convenient by accepting
all args, not just the first.  makes mechanical conversion of old
style more forgiving.
    r207436: Fix typo in usage message.  Add -n to the list of valid arguments.
    r206276: Fix comment about NANO_ARCH.  It can be set now.  Also add
a warning about how it confuses TARGET and TARGET_ARCH and the need
to separate the two out into independent variables.

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

13 years agoMFC: r207979
brueffer [Thu, 9 Sep 2010 21:26:55 +0000 (21:26 +0000)]
MFC: r207979

Build the ixgbe(4) and mwlfw(4) modules by default.

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

13 years agoMFC r212155:
bz [Thu, 9 Sep 2010 06:43:18 +0000 (06:43 +0000)]
MFC r212155:
  MFp4 CH=183052 183053 183258:

    In protosw we define pr_protocol as short, while on the wire
    it is an uint8_t.  That way we can have "internal" protocols
    like DIVERT, SEND or gaps for modules (PROTO_SPACER).
    Switch ipproto_{un,}register to accept a short protocol number(*)
    and do an upfront check for valid boundries. With this we
    also consistently report EPROTONOSUPPORT for out of bounds
    protocols, as we did for proto == 0.  This allows a caller
    to not error for this case, which is especially important
    if we want to automatically call these from domain handling.

    (*) the functions have been without any in-tree consumer
    since the initial introducation, so this is considered save.

    Implement ip6proto_{un,}register() similarly to their legacy IP
    counter parts to allow modules to hook up dynamically.

  Reviewed by: philip, will

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

13 years agoMFC r211283:
zec [Wed, 8 Sep 2010 14:22:35 +0000 (14:22 +0000)]
MFC r211283:

  When moving an ethernet ifnet from one vnet to another, destroy the
  associated ng_ether netgraph node in the current vnet, and create a
  new one in the target vnet.

  Reviewed by:  julian

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

13 years agoMFC r208744:
zec [Wed, 8 Sep 2010 14:21:12 +0000 (14:21 +0000)]
MFC r208744:

  Virtualize the IPv4 multicast routing code.

  Submitted by: iprebeg
  Reviewed by:  bms, bz, Pavlin Radoslavov

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

13 years agoMFC r208743:
zec [Wed, 8 Sep 2010 14:19:33 +0000 (14:19 +0000)]
MFC r208743:

  Provide a macro for registering a virtualized sysctl handler for
  VNET opaque data.

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

13 years agoMFC r212234:
kib [Wed, 8 Sep 2010 09:53:50 +0000 (09:53 +0000)]
MFC r212234:
Document "show cdev" command.

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

13 years agoMFC r212233:
kib [Wed, 8 Sep 2010 09:51:03 +0000 (09:51 +0000)]
MFC r212233:
Document MAKEDEV_ETERNAL.

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

13 years agoMFC r212087:
ed [Wed, 8 Sep 2010 08:03:08 +0000 (08:03 +0000)]
MFC r212087:

  Remove reference to device minor numbers in psm(4) man page.

  The number returned by stat(2) is generated automatically, so it is not
  possible to deduce whether the device is blocking or not.

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

13 years agoMFC: r212047
davidxu [Wed, 8 Sep 2010 01:55:03 +0000 (01:55 +0000)]
MFC: r212047
  If a process is being debugged, skips job control caused by SIGSTOP/SIGCONT
  signals, because it is managed by debugger, however a normal signal sent to
  a interruptibly sleeping thread wakes up the thread so it will handle the
  signal when the process leaves the stopped state.

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

13 years agoMFC: r211830
rmacklem [Wed, 8 Sep 2010 01:41:22 +0000 (01:41 +0000)]
MFC: r211830
Add mutex locking for the call to replay_prune() in
replay_setsize(), since replay_prune() expects the
rc_lock to be held when it is called.

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

13 years agoMFC: r211789
rmacklem [Wed, 8 Sep 2010 01:18:09 +0000 (01:18 +0000)]
MFC: r211789
If the first iteration of the do loop in replay_prune()
succeeded and a subsequent interation failed to find an
entry to prune, it could loop infinitely, since the
"freed" variable wasn't reset to FALSE. This patch moves
setting freed FALSE to inside the loop to fix the problem.

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

13 years agoMFC r205662 + r212066 (except efi part):
delphij [Tue, 7 Sep 2010 18:14:59 +0000 (18:14 +0000)]
MFC r205662 + r212066 (except efi part):

Our boot loader is capable of booting both i386 and amd64 kernels so
call it "x86" instead of "i386".

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

13 years agoMFC r212209:
bz [Tue, 7 Sep 2010 13:10:46 +0000 (13:10 +0000)]
MFC r212209:

  In case of RADIX_MPATH do not leak the IN_IFADDR read lock on
  early return.

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

13 years agoMFC r211748:
kib [Tue, 7 Sep 2010 12:06:41 +0000 (12:06 +0000)]
MFC r211748:
Move the __stack_chk_fail_local@FBSD_1.0 compat symbol definition into
the separate .o for libc_pic.a. This prevents rtld from making the
symbol global.

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

13 years agoMFC r211743:
kib [Tue, 7 Sep 2010 12:04:07 +0000 (12:04 +0000)]
MFC r211743:
Remove unused source.

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

13 years agoMFC r211742:
kib [Tue, 7 Sep 2010 12:02:34 +0000 (12:02 +0000)]
MFC r211742:
The __hidden definition is provided by sys/cdefs.h.

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

13 years agoMFC r212152:
bz [Tue, 7 Sep 2010 11:46:09 +0000 (11:46 +0000)]
MFC r212152:

  MFp4 CH=183259:

    No reason to use if_free_type() as we don't change our type.
    Just if_free() is fine.

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

13 years agoMFC r196636:
weongyo [Mon, 6 Sep 2010 22:47:52 +0000 (22:47 +0000)]
MFC r196636:
  Connect bwi up to the build.  While there are some problems with this
  driver still, it generally works well for most people most of the
  time.  It is still too green for GENERIC, however.

  Submitted by: many (latest being kwm@)
Approved by: imp
Requested by: Warren Block <wblock at wonkity dot com>

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

13 years agoMFC r209888:
weongyo [Mon, 6 Sep 2010 22:31:24 +0000 (22:31 +0000)]
MFC r209888:
  Fixes a bug for LP PHY that some frames have 2 padding bytes at the
  start so we should adjust the mbuf if the driver is running in PIO
  mode.  Now it should work well with WPA authentication and association
  for LP PHY devices.

  Tested by:    Warren Block <wblock at wonkity.com>

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

13 years agoMFC r210393:
weongyo [Mon, 6 Sep 2010 22:28:46 +0000 (22:28 +0000)]
MFC r210393:
  Fixes a mistake to calculate CALC_COEFF2() value that tmp[3] is
  used even if it's unreachable.

  PR: kern/144505
  Submitted by: Henning Petersen <henning.petersen at t-online dot de>

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

13 years agoMFC r212172: acpi: update stale comments about order of cpu devices
avg [Mon, 6 Sep 2010 07:24:43 +0000 (07:24 +0000)]
MFC r212172: acpi: update stale comments about order of cpu devices
probing

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

13 years agoMFC r210926:
kib [Sun, 5 Sep 2010 14:37:29 +0000 (14:37 +0000)]
MFC r210926:
Mark /dev/zero and /dev/null as eternal.

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

13 years agoMFC r210925:
kib [Sun, 5 Sep 2010 14:35:26 +0000 (14:35 +0000)]
MFC r210925:
Enable shared lookups and externed shared ops for devfs.

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

13 years agoMFC r210924:
kib [Sun, 5 Sep 2010 14:31:58 +0000 (14:31 +0000)]
MFC r210924:
Add "show cdev" ddb command.

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

13 years agoMFC r210923:
kib [Sun, 5 Sep 2010 14:27:55 +0000 (14:27 +0000)]
MFC r210923:
Add new make_dev_p(9) flag MAKEDEV_ETERNAL to inform devfs that created
cdev will never be destroyed. Propagate the flag to devfs vnodes as
VV_ETERNVALDEV. Use the flags to avoid acquiring devmtx and taking a
thread reference on such nodes.

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

13 years agoMFC r210921:
kib [Sun, 5 Sep 2010 14:20:34 +0000 (14:20 +0000)]
MFC r210921:
Enable shared locks for the devfs vnodes. Honor the locking mode
requested by lookup().

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

13 years agoMFC r210918:
kib [Sun, 5 Sep 2010 14:16:35 +0000 (14:16 +0000)]
MFC r210918:
Initialize VV_ISTTY vnode flag on the devfs vnode creation instead of
doing it on each open.

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

13 years agoMFC r196885 (by ed):
kib [Sun, 5 Sep 2010 14:02:34 +0000 (14:02 +0000)]
MFC r196885 (by ed):
Remove unneeded minor numbers from /dev/null and /dev/zero.

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

13 years agoMFC r210331-r210333,r210335,r210336,r210338,r210340,r210341,r210559.
kaiw [Sat, 4 Sep 2010 13:13:00 +0000 (13:13 +0000)]
MFC r210331-r210333,r210335,r210336,r210338,r210340,r210341,r210559.

r210331:
  Add a new ELF type denoting GNU style hash tables.

r210332:
  Changes for supporting GNU Hash sections.

r210333:
  Note that the *_fsize() functions are only defined for ELF types that
  have a fixed size.

r210335:
  - Return zero for file sizes of ELF types that have a variable size.
  - Neaten a few comments.

r210336:
  Reduce verbosity.

r210338:
  Perform additional checks when translating between file and memory
  representations of ELF types.

  The ELF(3) API allows applications to request a conversion that is
  `in-place', i.e., with source and destinations data buffers being
  the same.  However, the file and memory sizes of ELF sections that
  have additional internal structure, such as those of type `Elf_Note',
  or `Elf_GNU_Hash_Header', can be determined only known after the
  type-specific headers that comprise the first few words in these
  sections are read and translated.

  Pass in the size of destination buffer to type translation routines
  in "libelf_convert.m4" and have these routines return an error code
  if the translated data would not fit inside the destination buffer.

r210340:
  - Document that the *fsize() functions return a size of 1 for Elf
    types that don't have a fixed size.
  - The *fsize() functions should return a size of 1, for variable length
    types.
  - Redefine symbol ELF_T_LAST to match the current end of the list.

r210341:
  Add support for translating sections of type ELF_T_GNUHASH.

r210559:
  Protect GNUHASH translation functions with #ifdef; unbreak cross
  toolchain build.

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

13 years agoMFC r210351-r210353,r211192.
kaiw [Sat, 4 Sep 2010 13:00:22 +0000 (13:00 +0000)]
MFC r210351-r210353,r211192.

r210351:
  * Note that ar(1) archives may also be opened using `elf_memory(3)`.
  * Ignore the passed in value of the `fd` argument for ar(1) archives
    opened with elf_memory(3).

r210352:
  Add a cross-reference to `elf_rawfile(3)`.

r210353:
  * Remove a superfluous error description.
  * Document an additional error that may be returned: `ELF_E_ARCHIVE`.

r211192:
  Add translation support for section type SHT_SUNW_dof.

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

13 years agoMFC r210344,r210345,r210348.
kaiw [Sat, 4 Sep 2010 12:52:44 +0000 (12:52 +0000)]
MFC r210344,r210345,r210348.

r210344:
  Avoid switching between "unsigned char" and "char" in the C code
  generated from "libelf_convert.m4".

r210345:
  * Deprecate `elf_getshnum()`, `elf_getphnum()` and `elf_getshstrndx()` in
    favour of `elf_getshdrnum()`, `elf_getphdrnum()` and `elf_getshdrstrndx()`
    respectively.
  * Add new manual pages for `elf_getshdrstrndx()`, `elf_getphdrnum()` and
    `elf_getshdrnum()`.
  * Add a deprecation warning for `elf_getshstrndx()`, `elf_getphnum()` and
    `elf_getshnum()`.

r210348:
  Move helper functions `_libelf_ar_get_{name,number,string}()` and
  `_libelf_ar_open()` to a new compilation unit "libelf_ar_util.c"
  to break the circular dependency between "elf_memory.o" and
  "libelf_ar.o".

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

13 years agoMFC r210329,r210330,r210347.
kaiw [Sat, 4 Sep 2010 12:40:06 +0000 (12:40 +0000)]
MFC r210329,r210330,r210347.

r210329:
  Use <unistd.h> to declare the prototype for ftruncate().

r210330:
  Allow an application that updates only the ELF Ehdr to work.

r210347:
  Fix a memory leak.

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

13 years agoMFC r210325,r210326,r210328,r210349
kaiw [Sat, 4 Sep 2010 12:19:19 +0000 (12:19 +0000)]
MFC r210325,r210326,r210328,r210349

r210325:
  Bug fix: when updating headers using the gelf_update_*() functions,
  the appropriate `dirty' bit needs to be set for both the Elf32 and
  Elf64 case.

r210326:
  Improve compatibility with other implementations of the ELF(3) API:
  when an output file has no program headers, set the 'e_phentsize'
  field of the ELF executable header to zero.

r210328:
  Bug fix: permit the creation of zero-sized sections.

r210349:
  Remove a redundant word.

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

13 years agoMFC r210324, r210438.
kaiw [Sat, 4 Sep 2010 12:06:02 +0000 (12:06 +0000)]
MFC r210324, r210438.

r210324:
  - Correctly handle sections of type SHT_NOBITS.  For these sections:
    - elf_getdata() and elf_rawdata() should return an "Elf_Data" structure
      that has its "d_buf" member set to NULL and "d_size" member set to
      the nominal 'size' of the section.
    - Update the manual page for these functions.
  - Fix a memory leak in an error handling path inside elf_getdata().
  - Use _libelf_allocate_data() in elf_newdata() for consistency.

r210438: (np)
  Catch up with r210324.  d_buf will be NULL for SHT_NOBITS sections, do not
  attempt to copy from it in that case.

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

13 years agoMFC r210321:
kaiw [Sat, 4 Sep 2010 11:50:17 +0000 (11:50 +0000)]
MFC r210321:
  Remove a superfluous comment.

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

13 years agoMFC r211513: Call dev_rel() in error paths.
jh [Sat, 4 Sep 2010 06:36:12 +0000 (06:36 +0000)]
MFC r211513: Call dev_rel() in error paths.

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

13 years agoMFC r211922:
mav [Sat, 4 Sep 2010 06:09:08 +0000 (06:09 +0000)]
MFC r211922:
Add Intel Cougar Point PCH SATA Controller DeviceIDs. Correct some existing
entries for Intel Ibex Peak (5 Series/3400 Series) PCH SATA controllers.

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

13 years agoMFC r211920:
mav [Sat, 4 Sep 2010 06:05:57 +0000 (06:05 +0000)]
MFC r211920:
Add Intel Cougar Point PCH SATA Controller DeviceIDs. Correct some existing
entries for Intel Ibex Peak (5 Series/3400 Series) PCH SATA controllers.

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

13 years agoMFC r209652: sh: Remove comment that the comma operator is missing
jilles [Fri, 3 Sep 2010 21:59:12 +0000 (21:59 +0000)]
MFC r209652: sh: Remove comment that the comma operator is missing
in arithmetic expansion.

The comma operator is not listed in POSIX.1-2008 XCU 1.1.2.1 Arithmetic
Precision and Operations (referenced by XCU 2.6.4 Arithmetic Expansion) and
is therefore not required.

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

13 years agoMFC r208476,208629,210738,211080,211341,211467: New tests
jilles [Fri, 3 Sep 2010 21:51:38 +0000 (21:51 +0000)]
MFC r208476,208629,210738,211080,211341,211467: New tests
that also work with stable/8 sh.

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

13 years agoMFC 212073:
jamie [Fri, 3 Sep 2010 15:34:28 +0000 (15:34 +0000)]
MFC 212073:

  Don't over-allocate array values in jailparam_export.

MFC 212074:

  Whitespace and comment fixes.

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

13 years agoMFC r212072:
jamie [Fri, 3 Sep 2010 15:33:15 +0000 (15:33 +0000)]
MFC r212072:

  Make it clear in the example that jailparam_export's return value
  should be freed.

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

13 years agoMFC r211962: gsched(8): fix example usage, mdoc nits
uqs [Fri, 3 Sep 2010 11:58:50 +0000 (11:58 +0000)]
MFC r211962: gsched(8): fix example usage, mdoc nits

- ad0 was referred to as da0
- wrong parameter -s instead of -a in example
- use double quotes consistently

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

13 years agoMFC r209256, r209549, r209816, r209844:
jh [Fri, 3 Sep 2010 06:30:11 +0000 (06:30 +0000)]
MFC r209256, r209549, r209816, r209844:

- Fix compilation of the subr_unit.c user space test program.
- Use %zu for size_t in a few format strings.
- Correct a comment typo.
- Assert that low and high are >= 0 in new_unrhdr().

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

13 years agoAdd nameday for Monique
edwin [Thu, 2 Sep 2010 21:52:43 +0000 (21:52 +0000)]
Add nameday for Monique

PR: conf/150049
Submitted by: Thierry Thomas <thierry@pompo.net>

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

13 years agoMFC r211904:
bz [Thu, 2 Sep 2010 16:09:09 +0000 (16:09 +0000)]
MFC r211904:

  MFp4 CH=182972:

  Add explicit linkstate UP/DOWN for the epair.  This is needed by carp(4)
  and other things to work.

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

13 years agoMFC r199972:
emaste [Thu, 2 Sep 2010 13:34:54 +0000 (13:34 +0000)]
MFC r199972:

  Use switch out (SWO) instead of switch in (SWI) debug log mask in
  csw_out.

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

13 years agoMFC r211633:
ed [Thu, 2 Sep 2010 07:49:45 +0000 (07:49 +0000)]
MFC r211633:

  Add missing mlink for insmntque1().

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

13 years agoWe don't have etc/rc.d/ip6fw anymore.
ume [Thu, 2 Sep 2010 06:49:27 +0000 (06:49 +0000)]
We don't have etc/rc.d/ip6fw anymore.
Since HEAD doesn't have etc/rc.d/network_ipv6,
this commit is directly into RELENG_8.

Spotted by: takachan__at__running-dog.net

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

13 years agoMFC r209970,209971,211990: add -q flag to usage() and
maxim [Thu, 2 Sep 2010 06:07:03 +0000 (06:07 +0000)]
MFC r209970,209971,211990: add -q flag to usage() and
man page synopsys.

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

13 years agoMFC r211684 & r211818; return ENOENT if we fall off the end of the directory.
brian [Thu, 2 Sep 2010 04:56:01 +0000 (04:56 +0000)]
MFC r211684 & r211818; return ENOENT if we fall off the end of the directory.

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

13 years agoMFC r202289:
emaste [Wed, 1 Sep 2010 20:25:36 +0000 (20:25 +0000)]
MFC r202289:

  Reject invalid CIDR widths rather than silently stopping at the first
  non-digit character.

  Due to an issue with rc(8) in a test configuration, ifconfig was being
  invoked with the address used again as the width - for example,

    ifconfig vlan0 10.0.0.1/10.0.0.1

  Prior to this change, that address/width would be interpreted as
  10.0.0.1/10.

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

13 years agoMFC r210736: sh: Do not enter consecutive duplicates into the history.
jilles [Wed, 1 Sep 2010 19:49:24 +0000 (19:49 +0000)]
MFC r210736: sh: Do not enter consecutive duplicates into the history.

This simply sets a flag in libedit. It has a shortcoming in that it does not
apply to multi-line commands.

Note that a configuration option for this is not going to happen, but always
having this seems better than not having it. NetBSD has done the same.

PR: bin/54683
Obtained from: NetBSD

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

13 years agoMFC r202988, r203022
emaste [Wed, 1 Sep 2010 19:36:06 +0000 (19:36 +0000)]
MFC r202988, r203022

  Remove vestigial NetBSD compatibility shim.

  Convert to 2-clause license, from NetBSD rc.subr r1.70.

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

13 years agoMFC r211800:
netchild [Wed, 1 Sep 2010 11:11:20 +0000 (11:11 +0000)]
MFC r211800:
  - Change the threshold from 'running next scrub the <value+1>th day after the
    last one' to 'running next scrub the <value>th day after the last one'.
  - Improve wording.

  Requested by: jhell <jhell@DataIX.net>

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

13 years agoMFC r211966:
kib [Wed, 1 Sep 2010 06:51:42 +0000 (06:51 +0000)]
MFC r211966:
Use NULL instead of 0 for pointer in example.

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

13 years agoMFC r211801: fix typo.
maxim [Wed, 1 Sep 2010 05:39:56 +0000 (05:39 +0000)]
MFC r211801: fix typo.

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

13 years agoMFC r211435, r211530: Make `ping6 -I' work with
ume [Tue, 31 Aug 2010 15:52:12 +0000 (15:52 +0000)]
MFC r211435, r211530: Make `ping6 -I' work with
net.inet6.ip6.use_defaultzone=1.

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

13 years agoMFC r211650,211667:
yongari [Tue, 31 Aug 2010 00:19:03 +0000 (00:19 +0000)]
MFC r211650,211667:
r211650:
  Document tunable dev.rl.%unit.prefer_iomap

r211667:
  Better wording and fix wrong explanation.

  Submitted by: Ben Kaduk ( minimarmot <> gmail dot com )

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

13 years agoMFC r211648:
yongari [Tue, 31 Aug 2010 00:15:20 +0000 (00:15 +0000)]
MFC r211648:
  It seems some newer RTL8139 controllers provides only memory space
  register mapping. I'm not sure whether it comes from the fact that
  controllers live behind certain PCI brdge(PLX PCI 6152 33BC) and
  the bridge has some issues in handling I/O space register mapping.
  Unfortunately it's not possible to narrow down to an exact
  controller that shows this issue because RealTek used the same PCI
  device/revision id again. In theory, it's possible to check parent
  PCI bridge device and change rl(4) to use memory space register
  mapping if the parent PCI bridge is PLX PCI 6152. But I didn't try
  to do that and we wouldn't get much benefit with added complexity.

  Blindly switching to use memory space register mapping for rl(4)
  may make most old controllers not to work. At least, I don't want
  to take potential risk from such change. So use I/O space register
  mapping by default but give users chance to override it via a
  tunable. The tunable to use memory space register mapping would be
  given by adding the following line to /boot/loader.conf file.

  dev.rl.%d.prefer_iomap="0"

  This change makes P811B quad-port work with this tunable.

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

13 years agoMFC r211106:
yongari [Mon, 30 Aug 2010 21:18:27 +0000 (21:18 +0000)]
MFC r211106:
  Document newly added controller AR8151 and AR8152.

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

13 years agoMFC r211105:
yongari [Mon, 30 Aug 2010 21:15:40 +0000 (21:15 +0000)]
MFC r211105:
  Add support for Atheros AR8151/AR8152 PCIe gigabit/fast ethernet
  controller. These controllers are known as L1D(AR8151) and
  L2CB/B2(AR8152). This change adds supports for the following
  controllers.
   o AR8151 v1.0(L1D) gigabit ethernet controller
   o AR8151 v2.0(L1D) gigabit ethernet controller
   o AR8152 v1.1(L2CB) fast ethernet controller
   o AR8152 v2.0(L2CB2) fast ethernet controller
  These controllers have the same feature of AR8131/AR8132 and
  support improved power saving control. The user visible change at
  this moment is reduced jumbo frame size from 9KB to 6KB. Many
  thanks to Atheros for continuing to support FreeBSD.

  HW donated by: Atheros Communications, Inc.

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

13 years agoMFC r211103:
yongari [Mon, 30 Aug 2010 21:11:45 +0000 (21:11 +0000)]
MFC r211103:
  Add F1 PHY found on Atheros AR8151 v2.0 PCIe gigabit ethernet
  controller.

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

13 years agoMFC r211047-211048,211051-211053,211285:
yongari [Mon, 30 Aug 2010 21:07:26 +0000 (21:07 +0000)]
MFC r211047-211048,211051-211053,211285:
r211047:
  Controller does not seem to support more than 1024 bytes DMA burst.
  Limit DMA burst size to be less than or equal to 1024 bytes.

r211048:
  Do not touch CMB TX threshold register when CMB is not used.
  Note, alc(4) does not use CMB at all due to silicon bug.

r211051:
  Always disable ASPM L0s and enable L1 before entering into WOL
  suspend state.  Also disable master clock after PHY power down,
  this is supposed to save more power. The master clock should be
  enabled if WOL is active.

r211052:
  Remove unnecessary assignment.

r211053:
  Cache PCIY_PMG and PCIY_EXPRESS capability pointer to softc and use
  it instead of calling pci_find_extcap().

r211285:
  Make sure to disable RX MAC in alc_stop_mac(). Previously there
  was a logic error which it always enabled RX MAC.

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