Prezero the acl structure which is to be copied to usermode, to avoid
leakage of the previous content of padding and unitialized fields.

Reported by:	Ilia Noskov <noskov@nic.ru>
Reviewed by:	kib
MFC after:	1 week


git-svn-id: svn://svn.freebsd.org/base/head@246412 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Rework the handling of stop signals in the NFS client.  The changes in
195702, 195703, and 195821 prevented a thread from suspending while holding
locks inside of NFS by forcing the thread to fail sleeps with EINTR or
ERESTART but defer the thread suspension to the user boundary.  However,
this had the effect that stopping a process during an NFS request could
abort the request and trigger EINTR errors that were visible to userland
processes (previously the thread would have suspended and completed the
request once it was resumed).

This change instead effectively masks stop signals while in the NFS client.
It uses the existing TDF_SBDRY flag to effect this since SIGSTOP cannot
be masked directly.  Also, instead of setting PBDRY on individual sleeps,
the NFS client now sets the TDF_SBDRY flag around each NFS request and
stop signals are masked for all sleeps during that region (the previous
change missed sleeps in lockmgr locks).  The end result is that stop
signals sent to threads performing an NFS request are completely
ignored until after the NFS request has finished processing and the
thread prepares to return to userland.  This restores the behavior of
stop signals being transparent to userland processes while still
preventing threads from suspending while holding NFS locks.

Reviewed by:	kib
MFC after:	1 month


git-svn-id: svn://svn.freebsd.org/base/head@246417 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add support for buttons on USB audio devices,
like Volume Up and Volume Down.

Reviewed by:	mav @
MFC after:	1 week


git-svn-id: svn://svn.freebsd.org/base/head@246421 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add AUDIT_ARG_SOCKADDR() macro so we can start using the audit_arg_sockaddr()
function, which is currently unused.

Sponsored by:	The FreeBSD Foundation


git-svn-id: svn://svn.freebsd.org/base/head@246446 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Minor style tweaks.


git-svn-id: svn://svn.freebsd.org/base/head@246447 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Audit sockaddr argument for bind(2), connect(2), accept(2), sendto(2) and
recvfrom(2) syscalls.

Sponsored by:	The FreeBSD Foundation


git-svn-id: svn://svn.freebsd.org/base/head@246448 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Methodize the process of adding the software TX queue to the taskqueue.

Move it (for now) to the TX taskqueue.


git-svn-id: svn://svn.freebsd.org/base/head@246450 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
If an interrupt event's assign_cpu method fails, then restore the original
cpuset mask for the associated interrupt thread.

The text used above is verbatim from r195249 and the code should now be
in line with the intent of that commit.


git-svn-id: svn://svn.freebsd.org/base/head@246452 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Create a new TX lock specifically for queuing frames.

This now separates out the act of queuing frames from the act of running
TX and TX completion.


git-svn-id: svn://svn.freebsd.org/base/head@246453 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add support for mute buttons on USB audio devices and
use the hwvol interface to adjust the mixer settings.

MFC after:	1 week


git-svn-id: svn://svn.freebsd.org/base/head@246454 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix a copy-and-paste error in libcxxrt.


git-svn-id: svn://svn.freebsd.org/base/head@246462 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add myself as a src committer and my mentor relationship.

Approved by:	emaste (co-mentor)


git-svn-id: svn://svn.freebsd.org/base/head@246471 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Stop translating the ERESTART error from the open(2) into EINTR.
Posix requires that open(2) is restartable for SA_RESTART.

For non-posix objects, in particular, devfs nodes, still disable
automatic restart of the opens. The open call to a driver could have
significant side effects for the hardware.

Noted and reviewed by:	jilles
Discussed with:	bde
MFC after:	2 weeks


git-svn-id: svn://svn.freebsd.org/base/head@246472 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Document the ERESTART translation to EINTR for devfs nodes.

Based on the submission by:	jilles
MFC after:	2 weeks


git-svn-id: svn://svn.freebsd.org/base/head@246476 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
This fixes a out-of-order problem with several
of the newer drivers. The basic problem was
that the driver was pulling the mbuf off the
drbr ring and then when sending with xmit(), encounting
a full transmit ring. Thus the lower layer
xmit() function would return an error, and the
drivers would then append the data back on to the ring.
For TCP this is a horrible scenario sure to bring
on a fast-retransmit.

The fix is to use drbr_peek() to pull the data pointer
but not remove it from the ring. If it fails then
we either call the new drbr_putback or drbr_advance
method. Advance moves it forward (we do this sometimes
when the xmit() function frees the mbuf). When
we succeed we always call advance. The
putback will always copy the mbuf back to the top
of the ring. Note that the putback *cannot* be used
with a drbr_dequeue() only with drbr_peek(). We most
of the time, in putback, would not need to copy it
back since most likey the mbuf is still the same, but
sometimes xmit() functions will change the mbuf via
a pullup or other call. So the optimial case for
the single consumer is to always copy it back. If
we ever do a multiple_consumer (for lagg?) we
will  need a test and atomic in the put back possibly
a seperate putback_mc() in the ring buf.

Reviewed by:	jhb@freebsd.org, jlv@freebsd.org


git-svn-id: svn://svn.freebsd.org/base/head@246482 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
When vforked child is traced, the debugging events are not generated
until child performs exec().  The behaviour is reasonable when a
debugger is the real parent, because the parent is stopped until
exec(), and sending a debugging event to the debugger would deadlock
both parent and child.

On the other hand, when debugger is not the parent of the vforked
child, not sending debugging signals makes it impossible to debug
across vfork.

Fix the issue by declining generating debug signals only when vfork()
was done and child called ptrace(PT_TRACEME).  Set a new process flag
P_PPTRACE from the attach code for PT_TRACEME, if P_PPWAIT flag is
set, which indicates that the process was created with vfork() and
still did not execed. Check P_PPTRACE from issignal(), instead of
refusing the trace outright for the P_PPWAIT case.  The scope of
P_PPTRACE is exactly contained in the scope of P_PPWAIT.

Found and tested by:  zont
Reviewed by:	pluknet
MFC after:	2 weeks


git-svn-id: svn://svn.freebsd.org/base/head@246484 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Document the detail of interaction between vfork and PT_TRACEME.

MFC after:	2 weeks


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

MFC after:	2 weeks


git-svn-id: svn://svn.freebsd.org/base/head@246486 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Import new libc++ to head.  Various small fixes and cleanups.

MFC after:	2 weeks


git-svn-id: svn://svn.freebsd.org/base/head@246487 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Catch TRACE parameters up with r238888.  This change is only needed when
debugging is enabled.


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