]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/log
FreeBSD/stable/8.git
11 years agoMFC r235252:
gjb [Fri, 18 May 2012 00:08:09 +0000 (00:08 +0000)]
MFC r235252:

Document the unzip(1) '-Z' option implemented in r234206.

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

11 years agoMFC r235211:
gjb [Fri, 18 May 2012 00:02:11 +0000 (00:02 +0000)]
MFC r235211:

General mdoc(7) and typo fixes.

PR: 167696

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

11 years agoMFC 233708,234154:
jhb [Thu, 17 May 2012 15:45:00 +0000 (15:45 +0000)]
MFC 233708,234154:
Fix a few issues with transmit handling in em(4) and igb(4):
- Do not define the foo_start() methods or set if_start in the ifnet if
  multiq transmit is enabled.  Also, set if_transmit and if_qflush before
  ether_ifattach rather than after when multiq transmit is enabled.  This
  helps to ensure that the drivers never try to mix different transmit
  methods.
- Properly restart transmit during resume.  igb(4) was not restarting it
  at all, and em(4) was restarting even if the link was down and was
  calling the wrong method if multiq transmit was enabled.
- Remove all the 'more' handling for transmit completions.  Transmit
  completion processing does not have a processing limit, so it always
  runs to completion and never has more work to do when it returns.
  Instead, the previous code was returning 'true' anytime there were
  packets in the queue that weren't still in the process of being
  transmitted.  The effect was that the driver would continuously
  reschedule a task to process TX completions in effect running at 100%
  CPU polling the hardware until it finished transmitting all of the
  packets in the ring.  Now it will just wait for the next TX completion
  interrupt.
- Restart packet transmission when the link becomes active.
- Fix the MSI-X queue interrupt handlers to restart packet transmission if
  there are pending packets in the relevant software queue (IFQ or buf_ring)
  after processing TX completions.  This is the root cause for the OACTIVE
  hangs as if the MSI-X queue handler drained all the pending packets from
  the TX ring, nothing would ever restart it.  As such, remove some
  previously-added workarounds to reschedule a task to poll the TX ring
  anytime OACTIVE was set.
- Use a dedicated task to handle deferred transmits from the if_transmit
  method instead of reusing the existing per-queue interrupt task.
  Reusing the per-queue interrupt task could result in both an interrupt
  thread and the taskqueue thread trying to handle received packets on a
  single queue resulting in out-of-order packet processing.
- Call ether_ifdetach() earlier in igb_detach().
- Drain tasks and free taskqueues during igb_detach().

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

11 years agoMFC r235122:
jlh [Thu, 17 May 2012 08:14:10 +0000 (08:14 +0000)]
MFC r235122:
  Introduce the ${SHLIB_LDSCRIPT} variable to have an ld(1) script
  instead of a symlink for .so files.

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

11 years agoMFC 234152:
jhb [Wed, 16 May 2012 21:07:19 +0000 (21:07 +0000)]
MFC 234152:
Allow device_busy() and device_unbusy() to be invoked while a device is
being attached.  This is implemented by adding a new DS_ATTACHING state
while a device's DEVICE_ATTACH() method is being invoked.  A driver is
required to not fail an attach of a busy device.  The device's state will
be promoted to DS_BUSY rather than DS_ACTIVE() if the device was marked
busy during DEVICE_ATTACH()

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

11 years agoMFC r235142:
jlh [Wed, 16 May 2012 20:33:29 +0000 (20:33 +0000)]
MFC r235142:
  Always define LD_32_PRELOAD so it works for 32 bits binaries on
  64 bits platforms.  Let rtld(1) decide if it needs to honor it
  or not.

  While here, fix a small bug in error reporting when asprintf(3)
  returns an error.

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

11 years agoMFC r234245:
delphij [Wed, 16 May 2012 20:06:17 +0000 (20:06 +0000)]
MFC r234245:

Eliminate an unused parameter of static method igmp_stats_live_old().

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

11 years agoMFC 218221,233709,233781,233793:
jhb [Wed, 16 May 2012 20:05:31 +0000 (20:05 +0000)]
MFC 218221,233709,233781,233793:
- Use a dedicated taskqueue with a thread that runs at a software-interrupt
  priority for the periodic polling of the machine check registers.
- Don't malloc() new MCA records for machine checks logged due to a
  CMCI or MC# exception.  Instead, use a pre-allocated pool of records.
  When a CMCI or MC# exception fires, schedule a task to refill the pool.
  The pool is sized to hold at least one record per available machine
  bank, and one record per CPU. This should handle the case of all CPUs
  triggering a single bank at once as well as the case a single CPU
  triggering all of its banks.  The periodic scans still use malloc()
  since they are run from a safe context.
- Make machine check exception logging more readable.  On newer Intel systems,
  an uncorrected ECC error tends to fire on all CPUs in a package
  simultaneously and the current printf hacks are not sufficient to make
  the messages legible.  Instead, use the existing mca_lock spinlock to
  serialize calls to mca_log() and change the machine check code to panic
  directly when an unrecoverable error is encoutered rather than falling
  back to a trap_fatal() call in trap() (which adds nearly a screen-full of
  logging messages that aren't useful for machine checks).

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

11 years agoMFC r234244:
delphij [Wed, 16 May 2012 20:02:29 +0000 (20:02 +0000)]
MFC r234244:

The scandir(3) function expects fourth parameter, compar, be in type of:

int (*compar)(const struct dirent **, const struct dirent **)

The current code defines sortq() to accept two void *, then cast them
to const struct dirent **.  Because the code does not really need this
cast, we can eliminate the casts by changing the function prototype
to match scandir(3) expectation.

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

11 years agoMFC: r234957
brueffer [Wed, 16 May 2012 19:47:02 +0000 (19:47 +0000)]
MFC: r234957

Check vplabel for NULL before dereferencing it.  Fixes a panic
when running atop with MAC_MLS enabled.

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

11 years agoMFC r232102: Exit with proper status when wake() fails.
jh [Wed, 16 May 2012 17:26:14 +0000 (17:26 +0000)]
MFC r232102: Exit with proper status when wake() fails.

PR: bin/153527

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

11 years agoMFC r228363 (pjd):
mm [Wed, 16 May 2012 15:17:51 +0000 (15:17 +0000)]
MFC r228363 (pjd):
The vfs.zfs.txg.timeout sysctl can be safely modified at run time.

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

11 years agoMFC r228424,228448,230643: panic: add a switch and infrastructure for
avg [Wed, 16 May 2012 09:03:29 +0000 (09:03 +0000)]
MFC r228424,228448,230643: panic: add a switch and infrastructure for
stopping other CPUs in SMP case

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

11 years agoMFC r235201 r235419:
eadler [Wed, 16 May 2012 00:37:15 +0000 (00:37 +0000)]
MFC r235201 r235419:
 Add missing period at the end of the error message

Approved by: cperciva (implicit)

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

11 years agoMFC r235043:
jimharris [Wed, 16 May 2012 00:03:58 +0000 (00:03 +0000)]
MFC r235043:

Fix off-by-one error in sati_inquiry_block_device_translate_data().  Bug would
result in INQUIRY VPD 0x81 to SATA devices to return only 63 bytes of data
instead of 64 during SCSI/ATA translation.

Sponsored by: Intel

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

11 years agoMFC r235143:
kib [Tue, 15 May 2012 09:37:22 +0000 (09:37 +0000)]
MFC r235143:
Plug a leak.

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

11 years agoMFC 209613:
jhb [Mon, 14 May 2012 15:05:18 +0000 (15:05 +0000)]
MFC 209613:
Move prototypes for kern_sigtimedwait() and kern_sigprocmask() to
<sys/syscallsubr.h> where all other kern_<syscall> prototypes live.

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

11 years agoMFC r235283:
tuexen [Mon, 14 May 2012 10:18:31 +0000 (10:18 +0000)]
MFC r235283:
Fix a bug in the handling of association reset request.

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

11 years agoMFC r235282:
tuexen [Mon, 14 May 2012 10:14:43 +0000 (10:14 +0000)]
MFC r235282:
Only provide the supported features in the SCTP_ASSOC_CHANGE notif
if the state is SCTP_COMM_UP or SCTP_RESTART.
While there, do some cleanups.

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

11 years agoMFC r235280:
tuexen [Mon, 14 May 2012 10:12:03 +0000 (10:12 +0000)]
MFC r235280:
Remove a constant which is only used on non-FreeBSD platform.
(The actual code for the socket option handling has been #ifdefed
out forever...)

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

11 years agoMFC r235119:
yongari [Mon, 14 May 2012 04:24:24 +0000 (04:24 +0000)]
MFC r235119:
  Restore jumbo frame configuration which was broken in r218423.

  Submitted by: Andrey Zonov <andrey <> zonov dot org > (initial version)
  Tested by: Andrey Zonov <andrey <> zonov dot org >

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

11 years agoMFC: r234742
rmacklem [Sun, 13 May 2012 20:28:43 +0000 (20:28 +0000)]
MFC: r234742
It was reported via email that some non-FreeBSD NFS servers
do not include file attributes in the reply to an NFS create RPC
under certain circumstances.
This resulted in a vnode of type VNON that was not usable.
This patch adds an NFS getattr RPC to nfs_create() for this case,
to fix the problem. It was tested by the person that reported
the problem and confirmed to fix this case for their server.

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

11 years agoMFC r235069:
mav [Sun, 13 May 2012 02:09:27 +0000 (02:09 +0000)]
MFC r235069:
Fix `gmultipath configure` for big-endian machines.

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

11 years agoMFC r235209 r235227:
eadler [Sun, 13 May 2012 01:30:08 +0000 (01:30 +0000)]
MFC r235209 r235227:
Add a few new tips and update some old ones to more modern commands

Approved by: cperciva (implicit)

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

12 years agoMFC r232496:
eadler [Sat, 12 May 2012 00:55:29 +0000 (00:55 +0000)]
MFC r232496:
Fix a variety of grammar nits and errors

Approved by: cperciva (implicit)

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

12 years agoMFC r235208:
eadler [Sat, 12 May 2012 00:49:38 +0000 (00:49 +0000)]
MFC r235208:
make it easier for users used to a VCS that allows up to be a shortcut
for update.

Approved by: cperciva (implicit)

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

12 years agoMFC r235205:
eadler [Sat, 12 May 2012 00:46:59 +0000 (00:46 +0000)]
MFC r235205:
Document the -c option in --help output

Approved by: cperciva (implicit)

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

12 years agoMFC r235203:
eadler [Sat, 12 May 2012 00:43:34 +0000 (00:43 +0000)]
MFC r235203:
fix spacing in mtree file

Approved by: cperciva (implicit)

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

12 years agoMFC r235033:
ae [Fri, 11 May 2012 04:02:37 +0000 (04:02 +0000)]
MFC r235033:
  Don't ignore start offset value when user specifies it together
  with alignment.

  PR: bin/167567
  Tested by: Warren Block

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

12 years agoMFC r234138:
emaste [Fri, 11 May 2012 01:28:25 +0000 (01:28 +0000)]
MFC r234138:

  Support percent-encoded user and password

  RFC 1738 specifies that any ":", "@", or "/" within a user name or
  password in a URL is percent-encoded, to avoid ambiguity with the use
  of those characters as URL component separators.

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

12 years agoAdded forgotten r234867,234944 mergeinfo
daichi [Thu, 10 May 2012 22:38:15 +0000 (22:38 +0000)]
Added forgotten r234867,234944 mergeinfo

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

12 years agoMFC: 234867 and 234944
daichi [Thu, 10 May 2012 20:37:56 +0000 (20:37 +0000)]
MFC: 234867 and 234944

- fixed a vnode lock hang-up issue.
- fixed an incorrect lock status issue.
- fixed an incorrect lock issue of unionfs root vnode removed.
  (pointed out by keith)
- fixed an infinity loop issue.
  (pointed out by dumbbell)
- changed to do LK_RELEASE expressly when unlocked.
- fixed a unionfs_readdir math issue

Submitted by: ozawa@ongs.co.jp, Matthew Fleming <mfleming@isilon.com>

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

12 years agoMFC r234981:
kib [Thu, 10 May 2012 11:08:09 +0000 (11:08 +0000)]
MFC r234981:
Move the code to call the callout callback into the helper function
softclock_call_cc(). While there, move some common code to callout_cc_del().

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

12 years agoMFC r234952:
kib [Thu, 10 May 2012 10:56:46 +0000 (10:56 +0000)]
MFC r234952:
Mark the migrating callouts with CALLOUT_DFRMIGRATION flag. The flag is
cleared by callout_stop_safe() when the function detects a migration,
besides returning the success. The softclock() rechecks the flag for
migrating callout and cancels its execution if the flag was cleared
meantime.

PR: misc/166340

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

12 years agoMFC r211706:
kib [Wed, 9 May 2012 15:57:59 +0000 (15:57 +0000)]
MFC r211706:
On shared object unload, in __cxa_finalize, call and clear all installed
atexit and __cxa_atexit handlers that are either installed by unloaded
dso, or points to the functions provided by the dso.

Use _rtld_addr_phdr to locate segment information from the address of
private variable belonging to the dso, supplied by crtstuff.c. Provide
utility function __elf_phdr_match_addr to do the match of address against
dso executable segment.

Call back into libthr from __cxa_finalize using weak
__pthread_cxa_finalize symbol to remove any atfork handler which
function points into unloaded object.

The rtld needs private __pthread_cxa_finalize symbol to not require
resolution of the weak undefined symbol at initialization time. This
cannot work, since rtld is relocated before sym_zero is set up.

MFC r211894:
Do not call __pthread_cxa_finalize with invalid struct dl_phdr_info.

Requested and tested by: Peter Jeremy <peter rulingia com>

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

12 years agoMFC r235091:
tuexen [Wed, 9 May 2012 15:25:58 +0000 (15:25 +0000)]
MFC r235091:
Address clang warnings.

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

12 years agoMFC r235081:
tuexen [Wed, 9 May 2012 15:23:33 +0000 (15:23 +0000)]
MFC r235081:
Add support for the sac_info field in struct sctp_assoc_change
as required by RFC 6458.

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

12 years agoMFC r235077:
tuexen [Wed, 9 May 2012 15:21:19 +0000 (15:21 +0000)]
MFC r235077:
Remove debug code.

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

12 years agoMFC r235075:
tuexen [Wed, 9 May 2012 15:18:54 +0000 (15:18 +0000)]
MFC r235075:
Add support for SCTP_SEND_FAILED_EVENT as required by RFC 6458.

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

12 years agoMFC r211705:
kib [Wed, 9 May 2012 15:16:38 +0000 (15:16 +0000)]
MFC r211705:
Introduce implementation-private rtld interface _rtld_addr_phdr, which
fills struct dl_phdr_info for the shared object that contains the
specified address, if any.

Requested and tested by: Peter Jeremy <peter rulingia com>

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

12 years agoMFC r235066:
tuexen [Wed, 9 May 2012 15:15:13 +0000 (15:15 +0000)]
MFC r235066:
Provide the flags in the SCTP stream reconfig related notification
as specified in RFC 6525.

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

12 years agoMFC r235064:
tuexen [Wed, 9 May 2012 15:11:47 +0000 (15:11 +0000)]
MFC r235064:
Honor SCTP_ENABLE_STREAM_RESET socket option when processing incoming
requests. Fix also the provided result in the response and use names
as specified in RFC 6525.

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

12 years agoMFC r235057:
tuexen [Wed, 9 May 2012 15:09:13 +0000 (15:09 +0000)]
MFC r235057:
Do error checking for the SCTP_RESET_STREAMS, SCTP_RESET_ASSOC,
and SCTP_ADD_STREAMS socket options as specified by RFC 6525.

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

12 years agoMFC r235021:
tuexen [Wed, 9 May 2012 15:06:07 +0000 (15:06 +0000)]
MFC r235021:
Add support for the SCTP_ENABLE_STREAM_RESET socket option to
getsockopt(). This improves the support of RFC 6525.

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

12 years agoMFC r235009:
tuexen [Wed, 9 May 2012 15:03:16 +0000 (15:03 +0000)]
MFC r235009:
Add support for SCTP_STREAM_CHANGE_EVENT, SCTP_ASSOC_RESET_EVENT as
required by RFC 6525. This also fixes SCTP_STREAM_RESET_EVENT.

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

12 years agoMFC r234997:
tuexen [Wed, 9 May 2012 15:00:33 +0000 (15:00 +0000)]
MFC r234997:
Remove debug output.

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

12 years agoMFC r234996:
tuexen [Wed, 9 May 2012 14:58:19 +0000 (14:58 +0000)]
MFC r234996:
Call panic() only under INVARIANTS.

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

12 years agoMFC r234995:
tuexen [Wed, 9 May 2012 14:55:17 +0000 (14:55 +0000)]
MFC r234995:
Use SCTP_PRINTF() instead of printf() in all SCTP sources.

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

12 years agoMFC r234951:
tuexen [Wed, 9 May 2012 14:51:07 +0000 (14:51 +0000)]
MFC r234951:
Fix another RFC 6458 issue. Spotted by Irene Ruengeler.

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

12 years agoMFC r235099:
kib [Wed, 9 May 2012 14:45:40 +0000 (14:45 +0000)]
MFC r235099:
Add definition for the -z nodefaultlib flag.

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

12 years agoMFC r234832:
tuexen [Wed, 9 May 2012 14:44:36 +0000 (14:44 +0000)]
MFC r234832:
Add support for missing gauth_number_of_chunks field. This Bug was
found by Irene Ruengeler.

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

12 years agoMFC r234701:
tuexen [Wed, 9 May 2012 13:08:26 +0000 (13:08 +0000)]
MFC r234701:

Fix a bug in the TCP tracerouting which resulted in not accepting any
incoming packets. So all packets seemed to be lost.

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

12 years agoMFC: r234932
pho [Wed, 9 May 2012 10:05:02 +0000 (10:05 +0000)]
MFC: r234932

Added D_TRACKCLOSE to sndstat_cdevsw to fix the situation when
another process is in open() or stat() for the device node, then
close() from the owning process does not result in cdevsw close
method call. This fixes the pemanent "Device busy" seen.

Changed the sndstat_lock from mutex to sx.  This allows to extend
the region covered by the lock, to include the uiomove() call in
sndstat_read() and bufptr increment. This fixes the "panic:
sbuf_put_byte called with finished or corrupt sbuf" seen.

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

12 years agoPartial MFC r234935:
eadler [Wed, 9 May 2012 00:56:26 +0000 (00:56 +0000)]
Partial MFC r234935:
Prefer the use of csup to cvsup when talking about the binary.

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

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

12 years agoMFC r234772:
jlh [Tue, 8 May 2012 19:33:31 +0000 (19:33 +0000)]
MFC r234772:
  Import stdbuf(1) and the shared library it relies on.
  This tool changes the default buffering behaviour of standard
  stdio streams.

  It only works on dynamic binaries.  To make it work for static
  ones it would require cluttering stdio because there no single
  entry point.

  PR: 166660
  Reviewed by: current@, jhb
  Approved by: kib (mentor)
  MFC after: 1 week

MFC r234773:
  Fix small documentation mistakes.

  Submitted by: brueffer
  Approved by: kib (mentor)

MFC r234779:
  Use standard getopt(3) error message.

  Submitted by: jilles
  Approved by: kib (mentor)

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

12 years agoSync traceroute(8) with head.
uqs [Tue, 8 May 2012 08:19:07 +0000 (08:19 +0000)]
Sync traceroute(8) with head.

Merges r215937,216184 and r211062,215880,220968:

- Remove unused traceroute(8) contrib code from head
- make WARNS=3 clean
- fix an operator precedence bug for TCP tracerouting
- Remove unneeded struct timezone passed to gettimeofday().
- Remove clause 3 and 4 from TNF licenses.
- Check return code of setuid() in traceroute.

Requested by: tuexen

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

12 years agoMFC r234131:
eadler [Mon, 7 May 2012 12:20:26 +0000 (12:20 +0000)]
MFC r234131:
Return EBADF instead of EMFILE from dup2 when the second argument is
outside the range of valid file descriptors

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

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

12 years agoMFC: r225203 (partial)
marius [Mon, 7 May 2012 07:04:41 +0000 (07:04 +0000)]
MFC: r225203 (partial)

Attempt to make break-to-debugger and alternative break-to-debugger more
accessible:

(1) Always compile in support for breaking into the debugger if options
    KDB is present in the kernel.

(2) Disable both by default, but allow them to be enabled via tunables
    and sysctls debug.kdb.break_to_debugger and
    debug.kdb.alt_break_to_debugger.

(3) options BREAK_TO_DEBUGGER and options ALT_BREAK_TO_DEBUGGER continue
    to behave as before -- only now instead of compiling in
    break-to-debugger support, they change the default values of the
    above sysctls to enable those features by default.  Current kernel
    configurations should, therefore, continue to behave as expected.

(4) Migrate alternative break-to-debugger state machine logic out of
    individual device drivers into centralised KDB code.  This has a
    number of upsides, but also one downside: it's now tricky to release
    sio spin locks when entering the debugger, so we don't.  However,
    similar logic does not exist in other device drivers, including uart.

(5) dcons requires some special handling; unlike other console types, it
    allows overriding KDB's own debugger selection, so we need a new
    interface to KDB to allow that to work.

GENERIC kernels will now support break-to-debugger as long as appropriate
boot/run-time options are set, which should improve the debuggability of
kernels significantly.

MFC: r225214 (partial)

Follow up to r225203 refining break-to-debugger run-time configuration
improvements:

(1) Implement new model in previously missed at91 UART driver
(2) Move BREAK_TO_DEBUGGER and ALT_BREAK_TO_DEBUGGER from opt_comconsole.h
    to opt_kdb.h (spotted by np)
(3) Garbage collect now-unused opt_comconsole.h

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

12 years agoMFC r233113:
bz [Sun, 6 May 2012 20:26:28 +0000 (20:26 +0000)]
MFC r233113:

 Hide kernel option ROUTETABLES evaluations in the implementation
 rather than the header file.  With this also move RT_MAXFIBS and
 RT_NUMFIBS into the implemantion to avoid further usage in other
 code. rt_numfibs is all that should be needed.

 This allows users to change the number of FIBs from 1..RT_MAXFIBS(16)
 dynamically using the tunable without the need to change the kernel
 config for the maximum anymore.  This means that the multi-FIB
 feature is now fully available with GENERIC kernels.
 The kernel option ROUTETABLES can still be used to set the default
 numbers of FIBs in absence of the tunable.

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

12 years agoMFC r234601:
mav [Sun, 6 May 2012 15:56:07 +0000 (15:56 +0000)]
MFC r234601:
Add sos@ copyrights to RAID metadata modules, respecting his efforts in
decoding metadata formats in ataraid(4) code.

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

12 years agoMFC r234820:
eadler [Sun, 6 May 2012 14:23:01 +0000 (14:23 +0000)]
MFC r234820:
 pread(2) might fail with EBUSY, so document it

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

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

12 years agoMFC r234821:
eadler [Sun, 6 May 2012 14:15:52 +0000 (14:15 +0000)]
MFC r234821:
Add support for:
Olympus FE-210 camera
LG UP3S MP3 player
Laser MP3-2GA13 MP3

PR: usb/119201
Approved by: cperciva (implicit)

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

12 years agoMFC r234819:
eadler [Sun, 6 May 2012 14:11:51 +0000 (14:11 +0000)]
MFC r234819:
Allow users of gprof to get per run output files (using the pid)

PR: bin/99800
Approved by: cperciva (implicit)

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

12 years agoMFC r231929:
dougb [Sun, 6 May 2012 08:31:57 +0000 (08:31 +0000)]
MFC r231929:

If nested scheme allows dump kernel to its partition, we may allow
dump for the parent partition too.

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

12 years agoMFC r234572
melifaro [Sat, 5 May 2012 11:34:27 +0000 (11:34 +0000)]
MFC r234572

Do not require radix write lock to be held while dumping route table
via sysctl(4) interface. This permits router not to stop forwarding
packets while route table is being written to user-supplied buffer.

Reported by:        Pawel Tyll <ptyll@nitronet.pl>
Approved by:        kib(mentor)

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

12 years agoMerge 234342 from head:
glebius [Sat, 5 May 2012 10:05:13 +0000 (10:05 +0000)]
Merge 234342 from head:
  When we receive an ICMP unreach need fragmentation datagram, we take
  proposed MTU value from it and update the TCP host cache. Then
  tcp_mss_update() is called on the corresponding tcpcb. It finds the
  just allocated entry in the TCP host cache and updates MSS on the
  tcpcb. And then we do a fast retransmit of what we have in the tcp
  send buffer.

  This sequence gets broken if the TCP host cache is exausted. In this
  case allocation fails, and later called tcp_mss_update() finds nothing
  in cache. The fast retransmit is done with not reduced MSS and is
  immidiately replied by remote host with new ICMP datagrams and the
  cycle repeats. This ping-pong can go up to wirespeed.

  To fix this:
  - tcp_mss_update() gets new parameter - mtuoffer, that is like
    offer, but needs to have min_protoh subtracted.
  - tcp_mtudisc() as notification method renamed to tcp_mtudisc_notify().
  - tcp_mtudisc() now accepts not a useless error argument, but proposed
    MTU value, that is passed to tcp_mss_update() as mtuoffer.

  Reported by:  az
  Reported by:  Andrey Zonov <andrey zonov.org>
  Reviewed by:  andre (previous version of patch)

Tested by:  Andrey Zonov <andrey zonov.org>

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

12 years agoMFC r234775:
gjb [Sat, 5 May 2012 02:53:02 +0000 (02:53 +0000)]
MFC r234775:

As cron(8) is started with '-s' by default, timezones that observe
DST should not need to worry about scheduling jobs when the DST time
changes.

Rather than removing the BUGS section in crontab(5) regarding this,
note that disabling '-s' may still cause jobs to be executed twice or
not at all.

PR: 166318

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

12 years agoMFC r234769:
kib [Sat, 5 May 2012 00:30:43 +0000 (00:30 +0000)]
MFC r234769:
Fix several memory and lock leaks on the out of memory condition.

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

12 years agoMFC r228235, r228236, r233667, r234687, r234491, r234193, and r233424:
hselasky [Fri, 4 May 2012 16:25:35 +0000 (16:25 +0000)]
MFC r228235, r228236, r233667, r234687, r234491, r234193, and r233424:

Minor code simplification.
No functional change.
Fix some compile warnings.
Fix some mdoc issues.
Add missing LibUSB 1.0 API function.

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

12 years agoMFC r231835, r234636 and r234655:
hselasky [Fri, 4 May 2012 16:18:57 +0000 (16:18 +0000)]
MFC r231835, r234636 and r234655:

Add support for filtering USB devices and USB endpoints to the usbdump utility
when making software USB traces.

Improve support for USB packet filtering also when reading dumps, and
allow filtered data to be dumped to a binary file.

Add missing and probably also mandatory -h option.

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

12 years agoMFC r234541:
hselasky [Fri, 4 May 2012 15:57:05 +0000 (15:57 +0000)]
MFC r234541:
Add new USB ID to u3g driver.

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

12 years agoMFC r234803 and r234961:
hselasky [Fri, 4 May 2012 15:55:31 +0000 (15:55 +0000)]
MFC r234803 and r234961:
Add support for Multi-TT mode of modern USB HUBs.
This will give you more bandwidth for isochronous
FULL speed applications connected through a
High Speed HUB.

This patch has been tested with XHCI and EHCI.

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

12 years agoMFC r233429,r233435,r233437,r234077,r234133,r234135,r234159,r234823:
eadler [Thu, 3 May 2012 19:56:17 +0000 (19:56 +0000)]
MFC r233429,r233435,r233437,r234077,r234133,r234135,r234159,r234823:
A variety of changes that make the default shell easier to use.

Approved by: cperciva (implicit)

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

12 years agoMFC r230108:
eadler [Thu, 3 May 2012 16:49:27 +0000 (16:49 +0000)]
MFC r230108:
Fix trivial typo

Approved by: cperciva (implicit)

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

12 years agoMFC r234131:
eadler [Thu, 3 May 2012 16:31:44 +0000 (16:31 +0000)]
MFC r234131:
Return EBADF instead of EMFILE from dup2 when the second argument is
outside the range of valid file descriptors

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

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

12 years agoMFC r234714, r234700:
eadler [Thu, 3 May 2012 16:20:50 +0000 (16:20 +0000)]
MFC r234714, r234700:
Document the standardization status of err* and warn*

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

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

12 years agoFix multiple OpenSSL vulnerabilities.
bz [Thu, 3 May 2012 15:25:11 +0000 (15:25 +0000)]
Fix multiple OpenSSL vulnerabilities.

Security: CVE-2011-4576, CVE-2011-4619, CVE-2011-4109
Security: CVE-2012-0884, CVE-2012-2110
Security: FreeBSD-SA-12:01.openssl
Approved by: so (bz,simon)

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

12 years agoMFC r234715,r234716:
tuexen [Thu, 3 May 2012 07:17:25 +0000 (07:17 +0000)]
MFC r234715,r234716:

Export symbols for sctp_sendv() and sctp_recvv().
Move sctp_sendv and sctp_recvv to FBSD_1.3 as suggested by
Konstantin Belousov.

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

12 years agoMerge 233103, 233912 from head:
davidxu [Thu, 3 May 2012 03:05:18 +0000 (03:05 +0000)]
Merge 233103, 233912 from head:

233103:
Some software think a mutex can be destroyed after it owned it, for
example, it uses a serialization point like following:
pthread_mutex_lock(&mutex);
pthread_mutex_unlock(&mutex);
pthread_mutex_destroy(&muetx);
They think a previous lock holder should have already left the mutex and
is no longer referencing it, so they destroy it. To be maximum compatible
with such code, we use IA64 version to unlock the mutex in kernel, remove
the two steps unlocking code.

233912:
umtx operation UMTX_OP_MUTEX_WAKE has a side-effect that it accesses
a mutex after a thread has unlocked it, it event writes data to the mutex
memory to clear contention bit, there is a race that other threads
can lock it and unlock it, then destroy it, so it should not write
data to the mutex memory if there isn't any waiter.
The new operation UMTX_OP_MUTEX_WAKE2 try to fix the problem. It
requires thread library to clear the lock word entirely, then
call the WAKE2 operation to check if there is any waiter in kernel,
and try to wake up a thread, if necessary, the contention bit is set again
by the operation. This also mitgates the chance that other threads find
the contention bit and try to enter kernel to compete with each other
to wake up sleeping thread, this is unnecessary. With this change, the
mutex owner is no longer holding the mutex until it reaches a point
where kernel umtx queue is locked, it releases the mutex as soon as
possible.
Performance is improved when the mutex is contensted heavily.  On Intel
i3-2310M, the runtime of a benchmark program is reduced from 26.87 seconds
to 2.39 seconds, it even is better than UMTX_OP_MUTEX_WAKE which is
deprecated now. http://people.freebsd.org/~davidxu/bench/mutex_perf.c

Special code for stable/8:
And add code to detect if the UMTX_OP_MUTEX_WAKE2 is available.

PR: threads/167308

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

12 years agoMFC (with appropriate changes to gpt ikernel structures) r234417:
marck [Wed, 2 May 2012 11:38:58 +0000 (11:38 +0000)]
MFC (with appropriate changes to gpt ikernel structures) r234417:

  VMware environments are not unusual now.  Add VMware partitions recognition
  (both MBR for ESXi <= 4.1 and GPT for ESXi 5) to g_part.

  Reviewed by: ae
  Approved by: ae

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

12 years agoMFC r234415:
mav [Wed, 2 May 2012 07:22:58 +0000 (07:22 +0000)]
MFC r234415:
Some improvements to GEOM MULTIPATH:
 - Implement "configure" command to allow switching operation mode of
running device on-fly without destroying and recreation.
 - Implement Active/Read mode as hybrid of Active/Active and Active/Passive.
In this mode all paths not marked FAIL may handle reads same time,
but unlike Active/Active only one path handles write requests at any
point in time. It allows to closer follow original write request order
if above layers need it for data consistency (not waiting for requisite
write completion before sending dependent write).
 - Hide duplicate messages about device status change.
 - Remove periodic thread wake up with 10Hz rate.

Sponsored by: iXsystems, Inc.

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

12 years agoMFC r223019:
mav [Wed, 2 May 2012 07:08:04 +0000 (07:08 +0000)]
MFC r223019:
Do not report CFA devices as ATAPI, even though IDENTIFY data look alike.

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

12 years agoMFC r222643:
mav [Wed, 2 May 2012 07:05:20 +0000 (07:05 +0000)]
MFC r222643:
When possible, join ranges of subsequest BIO_DELETE requests to handle more
(up to 2048 instead of 256 or even 64) of them with single TRIM request.

OCZ Vertex2/Vertex3 SSDs can handle no more then 64 ranges per TRIM request.
Due to lack of BIO_DELETE clustering now, it means that we could delete no
more then 2MB per request (on FS with 32K block) with limited request rate.
This change increases delete rate on Vertex2 from 250MB/s to 950MB/s.

MFC r222643:
Increase maximum supported number of ranges per TRIM command from 256 to 512
to use full potential of Intel X25-M SSDs. On synthetic test with 32K ranges
it gives about 20% speedup, which probably costs more then 2K of RAM.

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

12 years agoMFC r222336, r222339:
mav [Wed, 2 May 2012 06:58:44 +0000 (06:58 +0000)]
MFC r222336, r222339:
Add names for few more SES element types according SES-2 specification.

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

12 years agoMerge ATA_CAM compatibility shims. While 8-STABLE doesn't have ATA_CAM
mav [Wed, 2 May 2012 06:52:00 +0000 (06:52 +0000)]
Merge ATA_CAM compatibility shims. While 8-STABLE doesn't have ATA_CAM
enabled by default, this should make migration easier for users enabling
it manually.

r221071:
Add shim to simplify migration to the CAM-based ATA. For each new adaX
device in /dev/ create symbolic link with adY name, trying to mimic old ATA
numbering. Imitation is not complete, but should be enough in most cases to
mount file systems without touching /etc/fstab.

r221384:
Do not report legacy unit numbers (do not create legacy aliases) for disks
on port multiplier ports above first two. They don't fit into ATA_STATIC_ID
scheme and so can't be mapped properly. No need to pollute dev.

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

12 years agoMFC r233770:
delphij [Wed, 2 May 2012 00:31:09 +0000 (00:31 +0000)]
MFC r233770:

Eliminate two cases of unwanted strncpy().  The name is not required
by the current code, and the results would get overwritten anyway
by subsequent memset().

Reviewed by: ume

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

12 years agoMFC r234657:
kib [Tue, 1 May 2012 11:45:16 +0000 (11:45 +0000)]
MFC r234657:
Take the spinlock around clearing of the fp->_flags in fclose(3), which
indicates the avaliability of FILE, to prevent possible reordering of
the writes as seen by other CPUs.

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

12 years agoMFC r234762:
tuexen [Tue, 1 May 2012 07:27:23 +0000 (07:27 +0000)]
MFC r234762:
Whitespace changes.

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

12 years agoMFC r234345:
marck [Mon, 30 Apr 2012 22:06:47 +0000 (22:06 +0000)]
MFC r234345:

VMware environment is frequent nowadays.  Add VMFS id.

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

12 years agoMFC r234616:
kib [Mon, 30 Apr 2012 13:44:04 +0000 (13:44 +0000)]
MFC r234616:
Allow for the process information sysctls to accept a thread id in addition
to the process id.

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

12 years agoMFC r233507:
dumbbell [Mon, 30 Apr 2012 13:37:07 +0000 (13:37 +0000)]
MFC r233507:
Use program exit status as pam_exec return code (optional)

pam_exec(8) now accepts a new option "return_prog_exit_status". When
set, the program exit status is used as the pam_exec return code. It
allows the program to tell why the step failed (eg. user unknown).
However, if it exits with a code not allowed by the calling PAM service
module function (see $PAM_SM_FUNC below), a warning is logged and
PAM_SERVICE_ERR is returned.

The following changes are related to this new feature but they apply no
matter if the "return_prog_exit_status" option is set or not.

The environment passed to the program is extended:
    o  $PAM_SM_FUNC contains the name of the PAM service module function
       (eg. pam_sm_authenticate).
    o  All valid PAM return codes' numerical values are available
       through variables named after the return code name. For instance,
       $PAM_SUCCESS, $PAM_USER_UNKNOWN or $PAM_PERM_DENIED.

pam_exec return code better reflects what went on:
    o  If the program exits with !0, the return code is now
       PAM_PERM_DENIED, not PAM_SYSTEM_ERR.
    o  If the program fails because of a signal (WIFSIGNALED) or doesn't
       terminate normally (!WIFEXITED), the return code is now
       PAM_SERVICE_ERR, not PAM_SYSTEM_ERR.
    o  If a syscall in pam_exec fails, the return code remains
       PAM_SYSTEM_ERR.

waitpid(2) is called in a loop. If it returns because of EINTR, do it
again. Before, it would return PAM_SYSTEM_ERR without waiting for the
child to exit.

Several log messages now include the PAM service module function name.

The man page is updated accordingly.

Reviewed by: des@
Sponsored by: Yakaz (http://www.yakaz.com)

MFC r234184:
Fix error messages containing the executed command name

Before, we took the first argument to pam_exec(8). With the addition of
options in front of the command, this could be wrong.

Now, options are parsed before calling _pam_exec() and messages contain
the proper command name.

While here, fix a warning.

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

12 years agoMFC r234731:
tuexen [Mon, 30 Apr 2012 06:54:44 +0000 (06:54 +0000)]
MFC r234731:
Remove unused structure.
Reported by Irene Ruengeler.

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

12 years agoMFC r234699:
tuexen [Sun, 29 Apr 2012 18:55:52 +0000 (18:55 +0000)]
MFC r234699:

Fix a type in an SCTP AUTH related notification. Keep the old name
for backwards compatibility.
Spotted by Irene Ruengeler.

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

12 years agoMFC r234614:
tuexen [Sun, 29 Apr 2012 18:52:22 +0000 (18:52 +0000)]
MFC r234614:
Use the flags defined in RFC 6525 in the stream reset event.

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

12 years agoMFC r234539:
tuexen [Sun, 29 Apr 2012 18:50:16 +0000 (18:50 +0000)]
MFC r234539:
Fix check used by stream reset related events.

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

12 years agoMFC r234464:
tuexen [Sun, 29 Apr 2012 18:48:00 +0000 (18:48 +0000)]
MFC r234464:
Whitespace changes.

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

12 years agoMFC r234461:
tuexen [Sun, 29 Apr 2012 18:46:19 +0000 (18:46 +0000)]
MFC r234461:
Use the same pattern for mbuf logging everywhere.

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

12 years agoMFC r234460:
tuexen [Sun, 29 Apr 2012 18:44:24 +0000 (18:44 +0000)]
MFC r234460:
Fix reported errno.

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

12 years agoMFC r234459:
tuexen [Sun, 29 Apr 2012 18:42:49 +0000 (18:42 +0000)]
MFC r234459:
Fix a bug where we copy out more data from a mbuf chain that are
ctually in it. This happens when SCTP receives an unknown chunk, which
requires the sending of an ERROR chunk, and there is no final padding but
the chunk is not 4-byte aligned.
Reported by yueting via rwatson@

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

12 years agoMFC r234296,r234297:
tuexen [Sun, 29 Apr 2012 18:40:41 +0000 (18:40 +0000)]
MFC r234296,r234297:

Bugfix: Don't send HBs on path which are not idle.
Send always HBs when in PF state.

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