]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/log
FreeBSD/stable/9.git
11 years agoMerge r243798 from head to stable/9:
rwatson [Tue, 18 Dec 2012 10:29:28 +0000 (10:29 +0000)]
Merge r243798 from head to stable/9:

  Add auditdistd to the pre-install required uid check list.

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

11 years agoMerge r243751 from head to stable/9:
rwatson [Tue, 18 Dec 2012 10:23:58 +0000 (10:23 +0000)]
Merge r243751 from head to stable/9:

  Merge OpenBSM 1.2-alpha2 changes from contrib/openbsm to
  src/sys/{bsm,security/audit}.  There are a few tweaks to help with the
  FreeBSD build environment that will be merged back to OpenBSM.  No
  significant functional changes appear on the kernel side.

  Obtained from:  TrustedBSD Project
  Sponsored by:   The FreeBSD Foundation (auditdistd)

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

11 years agoMerge OpenBSM 1.2-alpha3 from head to stable/9, upgrading from the previous
rwatson [Tue, 18 Dec 2012 09:32:44 +0000 (09:32 +0000)]
Merge OpenBSM 1.2-alpha3 from head to stable/9, upgrading from the previous
OpenBSM 1.1p2:

OpenBSM 1.2 alpha 3

- Various minor tweaks to the auditdistd build to make it fit the FreeBSD
  build environment better.
- AUE_WAIT6 merged from FreeBSD 9.

OpenBSM 1.2 alpha 2

- auditdistd, a distributed audit trail management daemon, has now been
  merged.  This allows trail files to be securely and reliably synced from
  audited hosts to an audit server, and employs TLS encryption.  Where
  available, it uses Capsicum to sandbox the service.  This work was
  contributed by Pawel Jakub Dawidek under sponsorship from the FreeBSD
  Foundation.

OpenBSM 1.2 alpha 1

- Add Capsicum-related error numbers for FreeBSD: ENOTCAPABLE, ECAPMODE.
- Add Capsicum, process descriptor audit events for FreeBSD.
- Allow 0% minspace.
- Fixes from the clang static analyser.
- Fix expiration of trail files when the host parameter is used.
- Various typo fixes.
- Support for Solaris privilege and privilege set tokens.
- Documentation for getachost(), improvements for getacfilesz().
- Fix a directory descriptor leak that happened when audit trail partitions
  filled.
- Support for more Linux distributions with a partial contemporary endian.h.
- Improved escaping of XML-encapsulated BSM.
- A variety of minor documentation, style, and functional.

A separate commit will merge build changes to enable auditdistd, etc.

Obtained from: TrustedBSD Project
Sponsored by: The FreeBSD Foundation (auditdistd)

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

11 years ago- Trim old entries.
hrs [Tue, 18 Dec 2012 06:55:13 +0000 (06:55 +0000)]
- Trim old entries.
- Update errata items.
- Bump &release.*;

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

11 years agoMFC r243835:
kib [Tue, 18 Dec 2012 04:38:34 +0000 (04:38 +0000)]
MFC r243835:
The vnode_free_list_mtx is required unconditionally when iterating
over the active list.

MFC r244095:
Do not yield while owning a mutex, by stopping acquiring mount interlock.

MFC r244240:
Use user priority for the yield, do not spin on UP. Restructure the
iteration initializer and the iterator to remove code duplication.

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

11 years agoMFC r244239:
kib [Tue, 18 Dec 2012 04:27:33 +0000 (04:27 +0000)]
MFC r244239:
Fix a typo, resulting in the NULL pointer dereference.

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

11 years agoMFC r244238:
kib [Tue, 18 Dec 2012 04:23:44 +0000 (04:23 +0000)]
MFC r244238:
Line up the continuation backslashes.

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

11 years agoMFC r243869:
kib [Tue, 18 Dec 2012 04:18:42 +0000 (04:18 +0000)]
MFC r243869:
Fix a race between kern_setitimer() and realitexpire(),
by using the process mutex to interlock the callout start.

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

11 years agoMFC r239151: ftw(): Do not check the maxfds argument against OPEN_MAX.
jilles [Mon, 17 Dec 2012 13:03:13 +0000 (13:03 +0000)]
MFC r239151: ftw(): Do not check the maxfds argument against OPEN_MAX.

Apart from the fact that nothing should have OPEN_MAX as a limit (as opposed
to RLIMIT_NOFILE from getrlimit() or _SC_OPEN_MAX from sysconf()), POSIX
does not require us to check this. POSIX does have a requirement on the
application that maxfds not exceed {OPEN_MAX}, but does not require the
implementation to check it ("may fail").

PR: 95239

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

11 years agoMFC r241864:
eadler [Mon, 17 Dec 2012 12:55:01 +0000 (12:55 +0000)]
MFC r241864:
Remove MLINK for if_idt.

Approved by: cperciva (implicit)

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

11 years agoMFC r239150: nftw(): Do not check the maxfds argument against OPEN_MAX.
jilles [Mon, 17 Dec 2012 12:26:10 +0000 (12:26 +0000)]
MFC r239150: nftw(): Do not check the maxfds argument against OPEN_MAX.

Apart from the fact that nothing should have OPEN_MAX as a limit (as opposed
to RLIMIT_NOFILE from getrlimit() or _SC_OPEN_MAX from sysconf()), POSIX
does not require us to check this.

PR: 95239
Submitted by: Todd Miller

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

11 years agoMFC r243807:
delphij [Mon, 17 Dec 2012 06:43:08 +0000 (06:43 +0000)]
MFC r243807:

Use SA_ZPL_CRTIME instead of SA_ZPL_CTIME for creation time.

Submitted by: phil.stone at gmx.com

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

11 years agoNote that the manual page of less(1) says:
delphij [Mon, 17 Dec 2012 06:35:15 +0000 (06:35 +0000)]
Note that the manual page of less(1) says:

  Note  that  a preprocessor cannot output an empty file, since that
  is interpreted as meaning there is no replacement, and the  origi-
  nal file is used.  To avoid this, if LESSOPEN starts with two ver-
  tical bars, the exit status of the script becomes meaningful.   If
  the  exit  status is zero, the output is considered to be replace-
  ment text, even if it empty.  If the exit status is  nonzero,  any
  output  is ignored and the original file is used.  For compatibil-
  ity with previous versions of less, if LESSOPEN starts  with  only
  one vertical bar, the exit status of the preprocessor is ignored.

Use two pipe symbols for zless, so that zless'ing a compressed empty
file will give output rather than being interpreted as its compressed
form, which is typically a binary.

Thanks Mark Nudelman for pointing out this difference and the
suggested solution.

Reported by:  Matthias Meyser <meyser xenet.de>
PR:           bin/168839

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

11 years agoMFC r241836:
eadler [Mon, 17 Dec 2012 05:31:42 +0000 (05:31 +0000)]
MFC r241836:
Remove {harp,hfa,idt} man pages as they were removed in r179308.

PR: docs/171234
Approved by: cperciva (implicit)

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

11 years agoMFC r244077:
kib [Mon, 17 Dec 2012 05:18:16 +0000 (05:18 +0000)]
MFC r244077:
Add amd64-specific ddb command "show pte".  The command displays the
hierarchy of the page table entries which map the specified address.

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

11 years agoMFC r244076:
kib [Mon, 17 Dec 2012 05:15:51 +0000 (05:15 +0000)]
MFC r244076:
Do not ignore zero address, possibly returned by the vm_map_find() call.

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

11 years agoMFC r243836:
kib [Mon, 17 Dec 2012 05:13:15 +0000 (05:13 +0000)]
MFC r243836:
Print the frame addresses for the backtraces on i386 and amd64.

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

11 years agoMFC r243719,r243720,r243722,r243723,r243726,r243727,r243746:
pjd [Sun, 16 Dec 2012 23:41:34 +0000 (23:41 +0000)]
MFC r243719,r243720,r243722,r243723,r243726,r243727,r243746:

r243719:

IFp4 @208450:

Remove redundant call to AUDIT_ARG_UPATH1().
Path will be remembered by the following NDINIT(AUDITVNODE1) call.

Sponsored by: The FreeBSD Foundation (auditdistd)

r243720:

IFp4 @208381:

For VOP_GETATTR() we just need vnode to be shared-locked.

Sponsored by: The FreeBSD Foundation (auditdistd)

r243722:

IFp4 @208382:

Currently on each record write we call VFS_STATFS() to get available space
on the file system as well as VOP_GETATTR() to get trail file size.

We can assume that trail file is only updated by the audit worker, so instead
of asking for file size on every write, get file size on trail switch only
(it should be zero, but it's not expensive) and use global variable audit_size
protected by the audit worker lock to keep track of trail file's size.

This eliminates VOP_GETATTR() call for every write. VFS_STATFS() is satisfied
from in-memory data (mount->mnt_stat), so shouldn't be expensive.

Sponsored by: The FreeBSD Foundation (auditdistd)

r243723:

IFp4 @208383:

Currently when we discover that trail file is greater than configured
limit we send AUDIT_TRIGGER_ROTATE_KERNEL trigger to the auditd daemon
once. If for some reason auditd didn't rotate trail file it will never
be rotated.

Change it by sending the trigger when trail file size grows by the
configured limit. For example if the limit is 1MB, we will send trigger
on 1MB, 2MB, 3MB, etc.

This is also needed for the auditd change that will be committed soon
where auditd may ignore the trigger - it might be ignored if kernel
requests the trail file to be rotated too quickly (often than once a second)
which would result in overwriting previous trail file.

Sponsored by: The FreeBSD Foundation (auditdistd)

r243726:

IFp4 @208451:

Fix path handling for *at() syscalls.

Before the change directory descriptor was totally ignored,
so the relative path argument was appended to current working
directory path and not to the path provided by descriptor, thus
wrong paths were stored in audit logs.

Now that we use directory descriptor in vfs_lookup, move
AUDIT_ARG_UPATH1() and AUDIT_ARG_UPATH2() calls to the place where
we hold file descriptors table lock, so we are sure paths will
be resolved according to the same directory in audit record and
in actual operation.

Sponsored by: The FreeBSD Foundation (auditdistd)
Reviewed by: rwatson

r243727:

IFp4 @208452:

Audit handling for missing events:
- AUE_READLINKAT
- AUE_FACCESSAT
- AUE_MKDIRAT
- AUE_MKFIFOAT
- AUE_MKNODAT
- AUE_SYMLINKAT

Sponsored by: FreeBSD Foundation (auditdistd)

r243746:

Fix one more compilation issue.

Sponsored by: FreeBSD Foundation (auditdistd)

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

11 years agoMFC r243320,r243474:
eadler [Sun, 16 Dec 2012 17:01:23 +0000 (17:01 +0000)]
MFC r243320,r243474:

Add 'w' flag to:

Use whitespace (spaces and tabs) as the delimiter.
Consecutive spaces and tabs count as one single field
separator.
Approved by: cperciva (implicit)

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

11 years agoMFC r227162:
eadler [Sun, 16 Dec 2012 16:59:42 +0000 (16:59 +0000)]
MFC r227162:
Add missing static keywords to cut(1)

Approved by: ed
Approved by: cperciva (implicit)

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

11 years agoMFC r236866,r236867:
eadler [Sun, 16 Dec 2012 16:55:11 +0000 (16:55 +0000)]
MFC r236866,r236867:
- Consistenly mention columns and fields
- Add -b to short error messages

Approved by: kevlo
Approved by: cperciva (implicit)

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

11 years agoMFC: r243784
rmacklem [Sun, 16 Dec 2012 14:13:10 +0000 (14:13 +0000)]
MFC: r243784
Document the "-m" option added by r243783.
This is a content change.

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

11 years agoMFC: r243783
rmacklem [Sun, 16 Dec 2012 14:10:12 +0000 (14:10 +0000)]
MFC: r243783
Add a "-m" option to nfsstat, which dumps out the
actual options used by all NFS mounts. Works for
the new/default NFS client only.

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

11 years agoMFC: r243782
rmacklem [Sun, 16 Dec 2012 14:01:56 +0000 (14:01 +0000)]
MFC: r243782
Add an nfssvc() option to the kernel for the new NFS client
which dumps out the actual options being used by an NFS mount.
This will be used to add a "-m" option to nfsstat(1).

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

11 years agoMFC r243079:
eadler [Sat, 15 Dec 2012 21:57:34 +0000 (21:57 +0000)]
MFC r243079:
Add option to suppress just the plot in ministat while still retaining
the relative comparison (i.e., useful part).

Approved by: cperciva (implicit)

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

11 years agoMFC r244017:
eadler [Sat, 15 Dec 2012 14:36:41 +0000 (14:36 +0000)]
MFC r244017:
Sync with Library of Congress list.

Approved by: cperciva (implicit)

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

11 years agoMFC r243899:
eadler [Sat, 15 Dec 2012 14:34:33 +0000 (14:34 +0000)]
MFC r243899:
Use Bernard Baruch's full name.

The words "old than" seem to be quoted as "older than" by some sources,
so use the more likely and grammatically correct text.

PR: docs/173868
Approved by: cperciva (implicit)

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

11 years agoMFC r244027:
hselasky [Sat, 15 Dec 2012 10:27:07 +0000 (10:27 +0000)]
MFC r244027:
Add support for various Yamaha keyboards.

MFC after: 1 week
PR: usb/174254

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

11 years agoMerge from head r244157:
glebius [Sat, 15 Dec 2012 08:29:22 +0000 (08:29 +0000)]
Merge from head r244157:
    Fix a crash in tcp_input(), that happens when mbuf has a fwd_tag on it,
  but later after processing and freeing the tag, we need to jump back again
  to the findpcb label. Since the fwd_tag pointer wasn't NULL we tried to
  process and free the tag for second time.

  Reported & tested by: Pawel Tyll <ptyll nitronet.pl>

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

11 years agoMFC r242130:
jh [Fri, 14 Dec 2012 11:38:15 +0000 (11:38 +0000)]
MFC r242130:

Improve libgeom XML parsing error handling.

- Abort parsing and return an error if we run out of memory.
- Return EILSEQ from geom_xml2tree() for XML syntax errors.

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

11 years agoAdd pci id for the xeon hd4000 (IvyBridge server GT2)
bapt [Fri, 14 Dec 2012 09:00:18 +0000 (09:00 +0000)]
Add pci id for the xeon hd4000 (IvyBridge server GT2)

Submitted by: François Tigeot <ftigeot@wolfpond.org>
Obtained from: dragonfly

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

11 years agoMFC r243021:
bapt [Fri, 14 Dec 2012 08:52:08 +0000 (08:52 +0000)]
MFC r243021:
return ERANGE if the buffer is too small to contain the login as documented in
the manpage

Reviewed by: cognet, kib

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

11 years agoMFC r242961:
kib [Thu, 13 Dec 2012 06:27:58 +0000 (06:27 +0000)]
MFC r242961:
Document wait6() and waitid().

PR: standards/170346

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

11 years agoMFC r242960:
kib [Thu, 13 Dec 2012 06:24:54 +0000 (06:24 +0000)]
MFC r242960:
Implement the waitid() SUSv4 function using wait6() system call.

PR: standards/170346

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

11 years agoRegenerate.
kib [Thu, 13 Dec 2012 06:20:01 +0000 (06:20 +0000)]
Regenerate.

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

11 years agoMFC r242958:
kib [Thu, 13 Dec 2012 06:17:05 +0000 (06:17 +0000)]
MFC r242958:
Add the wait6(2) system call. It takes POSIX waitid()-like process
designator to select a process which is waited for. The system call
optionally returns siginfo_t which would be otherwise provided to
SIGCHLD handler, as well as extended structure accounting for child
and cumulative grandchild resource usage.

Allow to get the current rusage information for non-exited processes
as well, similar to Solaris.

The explicit WEXITED flag is required to wait for exited processes,
allowing for more fine-grained control of the events the waiter is
interested in.

Fix the handling of siginfo for WNOWAIT option for all wait*(2)
family, by not removing the queued signal state.

PR: standards/170346

MFC r243133:
Style fixes for r242958.

MFC r243134:
Alphabetically reorder the forward-declarations of the structures.
Add the declaration for enum idtype, to be used later.

MFC r243135:
Move the definition of the idtype_t from sys/types.h to sys/wait.h.
Fix the bug, use #if __BSD_VISIBLE instead of #if defined(__BSD_VISIBLE),
since __BSD_VISIBLE is always defined.
Reformat the comments from the Solaris style to KNF.

MFC r243136:
Restore the proper handling of the pid 0 for waitpid(2).
Fix the style around.

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

11 years agoMerge r232639
remko [Wed, 12 Dec 2012 07:19:14 +0000 (07:19 +0000)]
Merge r232639

Original commit:

Add support for the MosChip MCS9904 four serial ports
controller.

PR:  165804
Submitted by: Eugene Grosbein
MFC after: 1 week

Modified:
head/sys/dev/uart/uart_bus_pci.c

Modified: head/sys/dev/uart/uart_bus_pci.c
==============================================================================
--- head/sys/dev/uart/uart_bus_pci.c Wed Mar 7 06:25:17 2012 (r232638)
+++ head/sys/dev/uart/uart_bus_pci.c Wed Mar 7 06:42:21 2012 (r232639)
@@ -126,6 +126,8 @@ static struct pci_id pci_ns8250_ids[] =
"MosChip MCS9900 PCIe to Peripheral Controller", 0x10 },
{ 0x9710, 0x9901, 0xa000, 0x1000,
"MosChip MCS9901 PCIe to Peripheral Controller", 0x10 },
+{ 0x9710, 0x9904, 0xa000, 0x1000,
+ "MosChip MCS9904 PCIe to Peripheral Controller", 0x10 },
{ 0xdeaf, 0x9051, 0xffff, 0, "Middle Digital PC Weasel Serial Port", 0x10 },
{ 0xffff, 0, 0xffff, 0, NULL, 0, 0}
};

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

11 years agoMFC r244054:
kib [Wed, 12 Dec 2012 05:02:56 +0000 (05:02 +0000)]
MFC r244054:
Remove useless comment.

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

11 years agoMFC r244053:
kib [Wed, 12 Dec 2012 05:00:26 +0000 (05:00 +0000)]
MFC r244053:
Fix typo.

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

11 years agoMFC r244057, r244059:
gjb [Wed, 12 Dec 2012 01:05:19 +0000 (01:05 +0000)]
MFC r244057, r244059:

r244057:
 Get 'uname -r' earlier, so it can be used to determine what branch is
 being run to set BSDINSTALL_DISTSITE accordingly.  This change allows
 non-RELEASE branches to use the FTP snapshots directory for bootonly.iso
 installations.

r244059:
 Add missed BETA* to list.

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

11 years agoMFC r243904:
jimharris [Wed, 12 Dec 2012 00:39:04 +0000 (00:39 +0000)]
MFC r243904:

Don't call bus_dmamap_load in CAM_DIR_NONE case, since there is nothing
to map, and technically this isn't allowed.

Functionally, it works OK (at least on x86) to call bus_dmamap_load with
a NULL data pointer and zero length, so this is primarily for correctness
and consistency with other drivers.

While here, remove check in isci_io_request_construct for nseg==0.
Previously, bus_dmamap_load would pass nseg==1, even for case where
buffer is NULL and length = 0, which allowed CAM_DIR_NONE CCBs
to get processed.  This check is not correct though, and needed to be
removed both for the changes elsewhere in this patch, as well as jeff's
preliminary bus_dmamap_load_ccb patch (which uncovered all of this in
the first place).

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

11 years agoRevert r244108. yyparse() declaration isn't redundant in stable/9.
glebius [Tue, 11 Dec 2012 12:40:54 +0000 (12:40 +0000)]
Revert r244108. yyparse() declaration isn't redundant in stable/9.

Reported by: tinderbox :)

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

11 years agoMFC r242943: Do not unwind past a zero PC frame.
emaste [Tue, 11 Dec 2012 12:34:46 +0000 (12:34 +0000)]
MFC r242943: Do not unwind past a zero PC frame.

  This improves GDB usability when debugging code compiled with
  optimization.

  Upstream GDB revision f0031b6d3ae9b164b3747986ab898190bd4dcf8c (prior
  to GDB's switch to GPLv3), with frame_debug_got_null_frame expanded
  inline.

  | 2004-12-12  Andrew Cagney  <cagney@gnu.org>
  |
  | * frame.c (get_prev_frame): When unwinding normal frames, check
  | that the PC isn't zero.

Sponsored by: ADARA Networks

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

11 years agoMFC r242936: Set optimized_out instead of reporting an error.
emaste [Tue, 11 Dec 2012 12:32:11 +0000 (12:32 +0000)]
MFC r242936:   Set optimized_out instead of reporting an error.

  This provides a better display when debugging code compiled with
  optimization on.

  GDB git revision e8395b4efd184f745070afb953f451f99e922be7 (prior to
  GDB's switch to GPLv3), modified for the interfaces provided by
  GDB 6.1.1.

  2005-02-28  Daniel Jacobowitz  <d...@codesourcery.com>

   * dwarf2loc.c (loclist_read_variable): Set optimized_out
   instead of reporting an error.
   * valprint.c (value_check_printable): New function.
   (common_val_print): New function.  Use value_check_printable.
   (value_print): Use value_check_printable.
   * value.h (common_val_print): Add prototype.
   * c-valprint.c (c_val_print): Use common_val_print.
   * cp-valprint.c (cp_print_value_fields): Likewise.
   (cp_print_hpacc_virtual_table_entries): Likewise.
   * f-valprint.c (f_val_print): Likewise.
   * jv-valprint.c (java_value_print, java_print_value_fields):
   Likewise.
   * scm-valprint.c (scm_value_print): Likewise.
   * stack.c (print_frame_args): Likewise.
   * varobj.c (c_value_of_variable): Likewise.
   * p-valprint.c (pascal_val_print, pascal_value_print): Likewise.
   (pascal_object_print_value_fields): Likewise.  Update call to
   pascal_object_print_static_field.
   (pascal_object_print_static_field): Remove TYPE argument.  Use
   common_val_print.

Sponsored by:        ADARA Networks

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

11 years agoMFC r243868:
kib [Tue, 11 Dec 2012 05:11:28 +0000 (05:11 +0000)]
MFC r243868:
Do not allocate buffer of the 255 bytes length on the stack.

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

11 years agoMFC r235771:
kevlo [Tue, 11 Dec 2012 02:40:01 +0000 (02:40 +0000)]
MFC r235771:

Remove redundant declaration of yyparse.

Reported by: tinderbox

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

11 years agoMFC r235767:
kevlo [Tue, 11 Dec 2012 01:49:57 +0000 (01:49 +0000)]
MFC r235767:

Add missing header needed by free().

Reported by: tinderbox

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

11 years agoMFC: 238979
gnn [Mon, 10 Dec 2012 21:18:02 +0000 (21:18 +0000)]
MFC: 238979

When we return with an error we cannot unlock the mutex, because
it's been freed.  Protect against that, hopefully unlikely, case.

Reviewed by: rpaulo

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

11 years agoMFC: 238537,238552
gnn [Mon, 10 Dec 2012 19:33:39 +0000 (19:33 +0000)]
MFC: 238537,238552
Add support for walltimestamp in DTrace.

Submitted by: Fabian Keil
Includes correction by: avg

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

11 years agoMFC recent ZFS changes from illumos:
mm [Mon, 10 Dec 2012 14:36:48 +0000 (14:36 +0000)]
MFC recent ZFS changes from illumos:
243503, 243524, 243525, 243560, 243561

MFC r243503:
Illumos 13879:4eac7a87eff2
3329 spa_sync() spends 10-20% of its time in spa_free_sync_cb()
3330 space_seg_t should have its own kmem_cache
3331 deferred frees should happen after sync_pass 1
3335 make SYNC_PASS_* constants tunable

New loader-only tunables:
vfs.zfs.sync_pass_deferred_free
vfs.zfs.sync_pass_dont_compress
vfs.zfs.sync_pass_rewrite

References:
https://www.illumos.org/issues/3329
https://www.illumos.org/issues/3330
https://www.illumos.org/issues/3331
https://www.illumos.org/issues/3335

MFC r243524:
Import the zio nop-write improvement from Illumos. To reduce I/O,
nop-write omits overwriting data if the checksum (cryptographically
secure) of new data matches the checksum of existing data.
It also saves space if snapshots are in use.

It currently works only on datasets with enabled compression, disabled
deduplication and sha256 checksums.

IllumOS 13887:196932ec9e6a and 13888:7204b3392a58
3236 zio nop-write

References:
https://www.illumos.org/issues/3236

MFC r243525:
Add loader(8) tunable to enable/disable nopwrite functionality:
vfs.zfs.nopwrite_enabled

MFC r243560:
Introduce a new dataset aclmode setting "restricted" to protect ACL's
being destroyed or corrupted by a drive-by chmod.

illumos-gate 13889:a67716f16746
3254 add support in zfs for aclmode=restricted

MFC r243561:
Update manpage dates in zfs.8 and zpool.8

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

11 years agoMerge r242474:
glebius [Mon, 10 Dec 2012 12:47:33 +0000 (12:47 +0000)]
Merge r242474:
   Remove separate paragraph on ASCII messages and instead
  provide this information along with messages documentation,
  like this done in manual pages for other netgraph nodes.

  Submitted by:   Mamontov Roman <mr.xanto gmail.com>

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

11 years agoMFC rr243398-243399:
pluknet [Mon, 10 Dec 2012 11:26:18 +0000 (11:26 +0000)]
MFC rr243398-243399:
- core(5) references sysctl debug.num_cores, but it is really debug.ncores.
- [mdoc] remove hard sentence breaks.

PR: docs/173831

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

11 years agoMFC to r242840:
grog [Mon, 10 Dec 2012 03:11:19 +0000 (03:11 +0000)]
MFC to r242840:

  Add y flag and environment variable LS_SAMESORT to specify the same
  sorting order for time and name with the -t option.  IEEE Std 1003.2
  (POSIX.2) mandates that the -t option sort in descending order, and
  that if two files have the same timestamp, they should be sorted in
  ascending order of their names.  The -r flag reverses both of these
  sort orders, so they're never the same.  This creates significant
  problems for sequentially named files stored on FAT file systems,
  where it can be impossible to list them in the order in which they
  were created.

  Add , (comma) option to print file sizes grouped and separated by
  thousands using the non-monetary separator returned by localeconv(3),
  typically a comma or period.

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

11 years agoMFC r243238:
eadler [Mon, 10 Dec 2012 02:44:47 +0000 (02:44 +0000)]
MFC r243238:
Standardize EXIT STATUS instructions in man pages when possible.

Approved by: cperciva (implicit)

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

11 years agoMFC r243101:
eadler [Mon, 10 Dec 2012 02:40:08 +0000 (02:40 +0000)]
MFC r243101:
Using set -x produces output on stderr instead of stdout.
It also doesn't work with make -s.
Prefer the use of builtin make features.

PR: misc/126312
Approved by: cperciva (implicit)

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

11 years agoMFC r243077:
eadler [Mon, 10 Dec 2012 02:35:19 +0000 (02:35 +0000)]
MFC r243077:
Fix error code if file isn't readable.

Approved by: cperciva (implicit)

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

11 years agoMFC r243084:
eadler [Mon, 10 Dec 2012 02:33:17 +0000 (02:33 +0000)]
MFC r243084:
Add support for a -q flag.  While here make the custom argument parsing
use getopt instead of hacking on it more.  This change also fixes the
method of silencing the compiler warning about gfn being used
uninitialized.

Approved by: cperciva (implicit)

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

11 years agoMFC r243753:
eadler [Sun, 9 Dec 2012 04:15:51 +0000 (04:15 +0000)]
MFC r243753:
The getline function returns the number of characters read, not
written. Use clearer text for this.

PR: docs/174023
Approved by: cperciva (implicit)

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

11 years agoMFC r243571:
mav [Sat, 8 Dec 2012 07:37:12 +0000 (07:37 +0000)]
MFC r243571:
Fix problem with the Samsung 840 PRO series SSD detection.
The device reports support for SATA Asynchronous Notification in its
IDENTIFY data, but returns error on attempt to enable that feature.
Make SATA XPT of CAM only report these errors, but not fail the device.

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

11 years agoMFC r240885:
mav [Sat, 8 Dec 2012 07:34:20 +0000 (07:34 +0000)]
MFC r240885:
Document ipv6 hook, present there for ages.

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

11 years agoMFC r243893:
eadler [Sat, 8 Dec 2012 00:28:16 +0000 (00:28 +0000)]
MFC r243893:
Remove hack to emulate effective uid and just use the EUID's name in the
first place.  I was unaware of this option when originally committing
this change.

I accidently merged this to only one directory last time :(

Approved by: cperciva (implicit)

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

11 years agoMFC r243893:
eadler [Sat, 8 Dec 2012 00:25:51 +0000 (00:25 +0000)]
MFC r243893:
Remove hack to emulate effective uid and just use the EUID's name in the
first place.  I was unaware of this option when originally committing
this change.

Approved by: cperciva (implicit)

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

11 years agoMFC r243663:
eadler [Sat, 8 Dec 2012 00:21:55 +0000 (00:21 +0000)]
MFC r243663:
Add support for AT&T Sierra Wireless USB 3G adapter

PR: kern/173982
Approved by: cperciva (implicit)

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

11 years agoMFC r238372:
kib [Sat, 8 Dec 2012 00:08:30 +0000 (00:08 +0000)]
MFC r238372:
Fix build for kernels with dtrace hooks.

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

11 years agoMerge r241882.
melifaro [Fri, 7 Dec 2012 20:55:24 +0000 (20:55 +0000)]
Merge r241882.

Provide example for newly-added NG_NETFLOW_V9INFO_TYPE

Submitted by: Dmitry Luhtionov <dmitryluhtionov at gmail.com>

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

11 years agoMFC: 238366, 240924
gnn [Fri, 7 Dec 2012 19:06:40 +0000 (19:06 +0000)]
MFC: 238366, 240924

Initial commit of an I/O provider for DTrace on FreeBSD.

 These probes are most useful when looking into the structures
 they provide, which are listed in io.d.  For example:

 dtrace -n 'io:kernel::start { printf("%d\n", args[0]->bio_bcount); }'

 Note that the I/O systems in FreeBSD and Solaris/Illumos are sufficiently
 different that there is not a 1:1 mapping from scripts that work
 with one to the other.

This commit includes the fix so that our probes use "kernel"
instead of the Solaris specific "genunix"

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

11 years agoMFC r241446,r241501
melifaro [Fri, 7 Dec 2012 13:03:23 +0000 (13:03 +0000)]
MFC r241446,r241501

Add NG_NETFLOW_V9INFO_TYPE command to be able to request netflowv9-specific
data.

Submitted by: Dmitry Luhtionov <dmitryluhtionov at gmail.com>

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

11 years agoMFC r243845:
kib [Fri, 7 Dec 2012 01:14:52 +0000 (01:14 +0000)]
MFC r243845:
Document the interpretation of the negative value of ticks for
taskqueue_enqueue_timeout(9).

MFC r243863:
Fix typo.

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

11 years agoMFC r243142:
kib [Fri, 7 Dec 2012 01:13:07 +0000 (01:13 +0000)]
MFC r243142:
In pget(9), if PGET_NOTWEXIT flag is not specified, also search the
zombie list for the pid. This allows several kern.proc sysctls to
report useful information for zombies.

Hold the allproc_lock around all searches instead of relocking it.
Remove private pfind_locked() from the new nfs client code.

MFC r243528 (by pjd):
Look for zombie process only if we were given process id.

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

11 years agoMFC r239007:
mav [Thu, 6 Dec 2012 18:35:00 +0000 (18:35 +0000)]
MFC r239007:
Remove duplicate check.

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

11 years agoMFC r243680, r243681.
np [Thu, 6 Dec 2012 18:23:23 +0000 (18:23 +0000)]
MFC r243680, r243681.

r243680:
cxgbe/tom: Add a flag to indicate that the L2 table entry for an
embryonic connection has been setup and never attempt to abort a tid
before this is done.  This fixes a bad race where a listening socket is
closed when the driver is in the middle of step (b) here.  The symptom
of this were "ARP miss" errors from the driver followed by tid leaks.

A hardware-offloaded passive open works this way:

a) A SYN "hits" the TCAM entry for a server tid and the chip delivers it
to the queue associated with the server tid (say, queue A).  It waits
for a response from the driver telling it what to do.

b) The driver decides it is ok to proceed.  It adds the new tid to the
list of embryonic connections associated with the server tid and then
hands off the SYN to the kernel's syncache to make sure that the kernel
okays it too.  If it does then the driver provides an L2 table entry,
queue id (say, queue B), etc. and instructs the chip to send the SYN/ACK
response.

c) The chip delivers a status to queue B depending on how the third step
of the 3-way handshake goes.  The driver removes the tid from its list
of embryonic connections and either expands the syncache entry or
destroys the tid.  In any case all subsequent messages for the new tid
will be delivered to queue B, not queue A.  Anything running in queue B
knows that the L2 entry has long been setup and the new flag is of no
interest from here on.  If the listener is closed it will deal with
so_comp as normal.

r243681:
cxgbe/tom: Handle the case where the chip falls out of DDP mode by
itself.  The hole in the receive sequence space corresponds to the
number of bytes placed directly up to that point.

Submittey by:

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

11 years agoEarly MFC of portions of r243752 adding an auditdistd user to stable/8
rwatson [Thu, 6 Dec 2012 11:52:31 +0000 (11:52 +0000)]
Early MFC of portions of r243752 adding an auditdistd user to stable/8
in order to ease future upgrades; the remainder of r243752 is left for
a future MFC of the OpenBSM upgrade:

  Merge a number of changes required to hook up OpenBSM 1.2-alpha2's
  auditdistd (distributed audit daemon) to the build:

  - Manual cross references
  - Makefile for auditdistd
  - rc.d script, rc.conf entrie
  - New group and user for auditdistd; associated aliases, etc.

  The audit trail distribution daemon provides reliable,
  cryptographically protected (and sandboxed) delivery of audit tails
  from live clients to audit server hosts in order to both allow
  centralised analysis, and improve resilience in the event of client
  compromises: clients are not permitted to change trail contents
  after submission.

  Submitted by:   pjd
  Sponsored by:   The FreeBSD Foundation (auditdistd)

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

11 years agoMFC r242511: Print a newline after the error message.
jh [Thu, 6 Dec 2012 08:35:46 +0000 (08:35 +0000)]
MFC r242511: Print a newline after the error message.

PR: bin/168447

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

11 years agoMFC r242897:
gjb [Thu, 6 Dec 2012 00:25:42 +0000 (00:25 +0000)]
MFC r242897:
 Prevent including .zfs snapshot directories in the src.txz
 distribution.  This can happen if the src/ tree checkout is
 within its own ZFS dataset, and the 'snapdir' ZFS property
 is set to 'visible.'

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

11 years agoMFC r243641:
pfg [Wed, 5 Dec 2012 22:47:45 +0000 (22:47 +0000)]
MFC r243641:
Partially bring r242520 to ext2fs.

When a file is first being written, the dynamic block reallocation
(implemented by ext2_reallocblks) relocates the file's blocks
so as to cluster them together into a contiguous set of blocks on
the disk.

When the cluster crosses the boundary into the first indirect block,
the first indirect block is initially allocated in a position
immediately following the last direct block.  Block reallocation
would usually destroy locality by moving the indirect block out of
the way to keep the data blocks contiguous.

The issue was diagnosed long ago by Bruce Evans on ffs and surfaced
on ext2fs when block reallocaton was ported. This is only a partial
solution based on the similarities with FFS. We still require more
review of the allocation details that vary in ext2fs.

Reported by:    bde

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

11 years agoMFC r243342:
kib [Tue, 4 Dec 2012 00:57:11 +0000 (00:57 +0000)]
MFC r243342:
Schedule garbage collection run for the in-flight rights passed over
the unix domain sockets to the next tick, coalescing the serial calls
until the collection fires.

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

11 years agoMFC r243341:
kib [Tue, 4 Dec 2012 00:54:49 +0000 (00:54 +0000)]
MFC r243341:
Add a special meaning to the negative ticks argument for
taskqueue_enqueue_timeout().  Do not rearm the callout if it is
already armed and the ticks is negative.  Otherwise rearm it to fire
in abs(ticks) ticks in the future.

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

11 years agoMFC r242433:
kib [Tue, 4 Dec 2012 00:51:29 +0000 (00:51 +0000)]
MFC r242433:
Enable the new instructions for reading and writing bases for %fs,
%gs, when supported. Enable SMEP when supported.

MFC r242828:
Do not try to enable new features in the %cr4 if running under hypervisor.

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

11 years agoMFC r242681 (ambrisko):
delphij [Mon, 3 Dec 2012 18:37:02 +0000 (18:37 +0000)]
MFC r242681 (ambrisko):

- Extend the prior commit to use the generic SCSI command building
  function use that for JBOD and Thunderbolt disk write command.  Now
  we only have one implementation in mfi.
- Fix dumping on Thunderbolt cards.  Polled IO commands do not seem to
  be normally acknowledged by changing cmd_status to MFI_STAT_OK.
  In order to get acknowledgement of the IO is complete, the Thunderbolt
  command queue needs to be run through.  I added a flag MFI_CMD_SCSI
  to indicate this command is being polled and to complete the
  Thunderbolt wrapper and indicate the result.  This flag needs to be
  set in the JBOD case in case if that us using Thunderbolt card.
  When in the polling loop check for completed commands.
- Remove mfi_tbolt_is_ldio and just do the check when needed.
- Fix an issue when attaching of disk device happens when a device is
  already scheduled to be attached but hasn't attached.
- add a tunable to allow raw disk attachment to CAM via:
        hw.mfi.allow_cam_disk_passthrough=1
- fixup aborting of commands (AEN and LD state change).  Use a generic
  abort function and only wait the command being aborted not both.
  Thunderbolt cards don't seem to abort commands so the abort times
  out.

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

11 years agoMFC r242497:
delphij [Mon, 3 Dec 2012 18:34:54 +0000 (18:34 +0000)]
MFC r242497:

Copy code from scsi_read_write() as mfi_build_syspd_cdb() to build SCSI
command properly.  Without this change, mfi(4) always sends 10 byte READ
and WRITE commands, which will cause data corruption when device is
larger than 2^32 sectors.

PR: kern/173291
Submitted by: Steven Hartland <steven.hartland multiplay.co.uk>
Reviewed by: mav

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

11 years agoMFC r242519:
delphij [Mon, 3 Dec 2012 18:30:12 +0000 (18:30 +0000)]
MFC r242519:

Replace log(3) with flsll(3) for watchdogd(8) and drop libm dependency.

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

11 years agoMFC r235038,241906:
delphij [Mon, 3 Dec 2012 18:26:23 +0000 (18:26 +0000)]
MFC r235038,241906:

netcat from OpenBSD 5.2.

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

11 years agoMFC r242728:
delphij [Mon, 3 Dec 2012 18:19:58 +0000 (18:19 +0000)]
MFC r242728:

ICMPV6_FILTER should read ICMP6_FILTER.

Submitted by: Frédéric Perrin <frederic.perrin resel.fr>

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

11 years agoMFC r242841:
delphij [Mon, 3 Dec 2012 18:16:36 +0000 (18:16 +0000)]
MFC r242841:

Use %s when calling make_dev with a string pointer.  This makes
clang happy.

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

11 years agoMFC r242332:
delphij [Mon, 3 Dec 2012 18:12:54 +0000 (18:12 +0000)]
MFC r242332:

s/dettach/detach/g

Approved by: pjd

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

11 years agoMFC r242507:
delphij [Mon, 3 Dec 2012 18:08:44 +0000 (18:08 +0000)]
MFC r242507:

Sync strlcpy with userland version.

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

11 years agoMFC r242506:
delphij [Mon, 3 Dec 2012 18:01:53 +0000 (18:01 +0000)]
MFC r242506:

Sync strlen with userland implementation.

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

11 years agoMFC r243155:
eadler [Mon, 3 Dec 2012 01:02:20 +0000 (01:02 +0000)]
MFC r243155:
Correct spelling of "lily" [0]
Correct spelling of Camellia

PR: misc/173655 [0]
Approved by: cperciva (implicit)

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

11 years agoMFC r242696 from HEAD:
issyl0 [Sun, 2 Dec 2012 12:26:17 +0000 (12:26 +0000)]
MFC r242696 from HEAD:
Document all of the options that wpa_supplicant accepts.

PR: docs/171755
Approved by: gabor (mentor)

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

11 years agoPull in r158245 from upstream clang:
dim [Sun, 2 Dec 2012 00:31:23 +0000 (00:31 +0000)]
Pull in r158245 from upstream clang:

  [C++11 Compat] Fix breaking change in C++11 pair copyctor.

  While this code is valid C++98, it is not valid C++11. The problem
  can be reduced to:

  class MDNode;

  class DIType {
    operator MDNode*() const {return 0;}
  };

  class WeakVH {
    WeakVH(MDNode*) {}
  };

  int main() {
    DIType di;
    std::pair<void*, WeakVH> p(std::make_pair((void*)0, di)));
  }

  This was not detected by any of the bots we have because they either
  compile C++98 with libstdc++ (which allows it), or C++11 with libc++
  (which incorrectly allows it). I ran into the problem when compiling
  with VS 2012 RC.

  Thanks to Richard for explaining the issue.

This fixes building clang 3.1 on stable/9 with libc++ in C++11 mode.

This is a direct commit to stable/9, since there is no separate commit
in head which has just this particular change, and I do not want to do a
full import at this time.

Reported by: Marco Bröder <marco.broeder@gmx.eu>

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

11 years agoMFC r243270: zfs_remove: assert that delete_now case is never true on FreeBSD
avg [Sat, 1 Dec 2012 19:24:09 +0000 (19:24 +0000)]
MFC r243270: zfs_remove: assert that delete_now case is never true on FreeBSD

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

11 years agoMFC r243268: zfs_remove: set VV_NOSYNC flag if a node is unlinked
avg [Sat, 1 Dec 2012 19:22:01 +0000 (19:22 +0000)]
MFC r243268: zfs_remove: set VV_NOSYNC flag if a node is unlinked

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

11 years agoMFC r243501: spa_import_rootpool: initialize ub_version before calling
avg [Sat, 1 Dec 2012 19:20:04 +0000 (19:20 +0000)]
MFC r243501: spa_import_rootpool: initialize ub_version before calling
spa_config_parse

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

11 years agoMFC r243500: spa_import_rootpool: do not call spa_history_log_version
avg [Sat, 1 Dec 2012 19:16:44 +0000 (19:16 +0000)]
MFC r243500: spa_import_rootpool: do not call spa_history_log_version

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

11 years agoMFC r243498: opensolaris compat: terminate cmn_err mesages with a new line
avg [Sat, 1 Dec 2012 19:14:35 +0000 (19:14 +0000)]
MFC r243498: opensolaris compat: terminate cmn_err mesages with a new line

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

11 years agoMFC r242575: zfs_dirlook: bailout early if directory is unlinked
avg [Sat, 1 Dec 2012 19:12:43 +0000 (19:12 +0000)]
MFC r242575: zfs_dirlook: bailout early if directory is unlinked

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

11 years agoMFC r243271,243400: vnode_if: fix locking protocol description for
avg [Sat, 1 Dec 2012 19:05:30 +0000 (19:05 +0000)]
MFC r243271,243400: vnode_if: fix locking protocol description for
lookup and cachedlookup

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

11 years agoMFC r243080:
eadler [Sat, 1 Dec 2012 16:44:33 +0000 (16:44 +0000)]
MFC r243080:
Only pass ip[46].addr when _addrl contains a value

Approved by: cperciva (implicit)

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

11 years agoMFC r242183:
crees [Sat, 1 Dec 2012 15:46:27 +0000 (15:46 +0000)]
MFC r242183:

Allow spaces in _chroot

Approved by: hrs

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

11 years agoMFC r243649: cyrus-sasl 2.1.26 was released. In this version, the type
ume [Sat, 1 Dec 2012 11:03:19 +0000 (11:03 +0000)]
MFC r243649: cyrus-sasl 2.1.26 was released.  In this version, the type
of callback functions was changed from "unsigned long" to "size_t".

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