Introduce a constant, ELF_NOTE_ROUNDSIZE, which evidently declare our
intention to use 4-byte padding for elf notes.

MFC after:	3 weeks


git-svn-id: svn://svn.freebsd.org/base/head@250145 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
KVM method support for procstat_getgroups, procstat_getumask,
procstat_getrlimit, and procstat_getosrel.

MFC after:	3 weeks


git-svn-id: svn://svn.freebsd.org/base/head@250146 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
procstat_getpathname: for kvm method, instead of returning the error
that the method is not supported, return an empty string.

This looks more handy for callers like procstat(1), which will not
abort after the failed call and still output some useful information.

MFC after:	3 weeks


git-svn-id: svn://svn.freebsd.org/base/head@250147 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add OpenBSD 5.3, released today, May 1 2013.


git-svn-id: svn://svn.freebsd.org/base/head@250148 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
In case ZFS doesn't use UMA for buffers there's no need to waste memory
creating zones that will remain empty.

Reviewed by:	pjd


git-svn-id: svn://svn.freebsd.org/base/head@250149 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add DragonFly BSD 3.4.1, released April 29 2013.

Submitted by:	Nikolai Lifanov <lifanov@mail.lifanov.com>


git-svn-id: svn://svn.freebsd.org/base/head@250150 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
The check to ensure that xstate_bv always has XFEATURE_ENABLED_X87 and
XFEATURE_ENABLED_SSE bits set is not needed.  CPU correctly handles
any bitmask which is subset of the enabled bits in %XCR0.

More, CPU instructions XSAVE and XSAVEOPT could write the mask without
e.g. XFEATURE_ENABLED_SSE, after the VZEROALL.  The check prevents the
restoration of the otherwise valid FPU save area.

In collaboration with:	jhb
MFC after:	1 week


git-svn-id: svn://svn.freebsd.org/base/head@250152 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Partially saved extended state must be handled always, i.e. for both
fpu-owned context, and for pcb-saved one.  More, the XSAVE could do
partial save, same as XSAVEOPT, so qualifier for the handler should be
use_xsave and not use_xsaveopt.

Since xsave_area_desc is now needed regardless of the XSAVEOPT use,
remove the write-only use_xsaveopt variable.

In collaboration with:	jhb
MFC after:	1 week


git-svn-id: svn://svn.freebsd.org/base/head@250153 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add accept4() system call.

The accept4() function, compared to accept(), allows setting the new file
descriptor atomically close-on-exec and explicitly controlling the
non-blocking status on the new socket. (Note that the latter point means
that accept() is not equivalent to any form of accept4().)

The linuxulator's accept4 implementation leaves a race window where the new
file descriptor is not close-on-exec because it calls sys_accept(). This
implementation leaves no such race window (by using falloc() flags). The
linuxulator could be fixed and simplified by using the new code.

Like accept(), accept4() is async-signal-safe, a cancellation point and
permitted in capability mode.


git-svn-id: svn://svn.freebsd.org/base/head@250154 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Regenerate files for accept4().


git-svn-id: svn://svn.freebsd.org/base/head@250155 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Isilon reported that sec=krb5p NFS mounts had a problem when m_len == 0
for the last mbuf of the list with an encrypted message. This patch replaces
the KASSERT() with code that handles this case.

Reported by:	john.gemignani@isilon.com
Reviewed by:	jhb
MFC after:	2 weeks


git-svn-id: svn://svn.freebsd.org/base/head@250157 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Document that the NFSv4 server statistics are operation counts and
not RPC counts.
This is a content change.

MFC after:	2 weeks


git-svn-id: svn://svn.freebsd.org/base/head@250158 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add pipe2() system call.

The pipe2() function is similar to pipe() but allows setting FD_CLOEXEC and
O_NONBLOCK (on both sides) as part of the function.

If p points to two writable ints, pipe2(p, 0) is equivalent to pipe(p).

If the pointer is not valid, behaviour differs: pipe2() writes into the
array from the kernel like socketpair() does, while pipe() writes into the
array from an architecture-specific assembler wrapper.

Reviewed by:	kan, kib


git-svn-id: svn://svn.freebsd.org/base/head@250159 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Regenerate files for pipe2().


git-svn-id: svn://svn.freebsd.org/base/head@250160 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
accept(2), pipe(2): Fix .Dd.


git-svn-id: svn://svn.freebsd.org/base/head@250161 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Document the fact that an NFSv4 mount against a volume on the same host
can result in a hung NFS server and is not recommended.
This is a content change.

MFC after:	2 weeks


git-svn-id: svn://svn.freebsd.org/base/head@250162 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Bump __FreeBSD_version for accept4() and pipe2().


git-svn-id: svn://svn.freebsd.org/base/head@250163 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Local hack to allow smooth transition for ports.
bsd.port.mk can set .MAKE.FreeBSD_UL=yes
to cause :L and :U to have their old behavior.
This should be reverted when 8.3 is EOL.

PR:		173299
Reviewed by:	obrien


git-svn-id: svn://svn.freebsd.org/base/head@250164 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add the AR933x SoC GPIO pin count limitation.


git-svn-id: svn://svn.freebsd.org/base/head@250165 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add device identification and probe/attach support for the QCA9565.

The QCA9565 is a 1x1 2.4GHz 11n chip with integrated on-chip bluetooth.
The AR9300 HAL already has support for this chip; it just wasn't
included in the probe/attach path.

Tested:

* This commit brought to you over a QCA9565 wifi connection from
  FreeBSD.
* .. ie, basic STA, pings, no iperf or antenna diversity checking just yet.


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