]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
11 years agoMake VM_NDOMAIN a kernel option so that it can be enabled from a kernel
jhb [Thu, 14 Feb 2013 19:38:04 +0000 (19:38 +0000)]
Make VM_NDOMAIN a kernel option so that it can be enabled from a kernel
config file.

Requested by: phk (ages ago)
MFC after: 1 month

11 years agoHandle (ignore) when a process disappears before it can be tracked.
jamie [Thu, 14 Feb 2013 19:27:52 +0000 (19:27 +0000)]
Handle (ignore) when a process disappears before it can be tracked.

11 years agoFreeBSD uses #if __BSD_VISIBLE to hide non-standard functions, fix this.
zeising [Thu, 14 Feb 2013 19:26:58 +0000 (19:26 +0000)]
FreeBSD uses #if __BSD_VISIBLE to hide non-standard functions, fix this.

Noticed by: kib
Approved by: kib

11 years agoPrint slightly more useful information on the 'bad pte' panic.
kib [Thu, 14 Feb 2013 19:22:15 +0000 (19:22 +0000)]
Print slightly more useful information on the 'bad pte' panic.

No objections from: alc
MFC after: 1 week

11 years agoAssert that user address is never qremoved.
kib [Thu, 14 Feb 2013 19:21:20 +0000 (19:21 +0000)]
Assert that user address is never qremoved.

No objections from: alc
MFC after: 1 week

11 years agoAdd option "--unassign-pptdev=<bus/slot/func>" to allow 'bhyvectl' to detach
neel [Thu, 14 Feb 2013 18:41:12 +0000 (18:41 +0000)]
Add option "--unassign-pptdev=<bus/slot/func>" to allow 'bhyvectl' to detach
passthru devices from the guest.

Obtained from: NetApp

11 years agoResolve issue that caused WITNESS to report LORs.
jpaetzel [Thu, 14 Feb 2013 17:34:17 +0000 (17:34 +0000)]
Resolve issue that caused WITNESS to report LORs.

PR: kern/171838
Submitted by: Venkat Duvvuru <venkatduvvuru.ml@gmail.com>
MFC after: 2 weeks

11 years agoRevert r246791 as it needs a security review first
bapt [Thu, 14 Feb 2013 15:17:53 +0000 (15:17 +0000)]
Revert r246791 as it needs a security review first

Reported by: gavin, rwatson

11 years agoremove old-style function definition
charnier [Thu, 14 Feb 2013 14:44:08 +0000 (14:44 +0000)]
remove old-style function definition
reduce WARNS=6 output

11 years agoAllow fdescfs to be mounted from inside a jail
bapt [Thu, 14 Feb 2013 13:03:15 +0000 (13:03 +0000)]
Allow fdescfs to be mounted from inside a jail

MFC after: 1 week

11 years agoIn case of failure of the pkg boostrap advice the user to either change the
bapt [Thu, 14 Feb 2013 12:42:09 +0000 (12:42 +0000)]
In case of failure of the pkg boostrap advice the user to either change the
PACKAGESITE they use or install from ports directly indicating where the port
is localted in the port collection

Submitted by: kientzle

11 years agoAdd USB API to read power draw on USB devices.
hselasky [Thu, 14 Feb 2013 12:22:40 +0000 (12:22 +0000)]
Add USB API to read power draw on USB devices.
Update usbconfig to print power draw on USB devices.

MFC after: 2 weeks
Submitted by: Matt Burke @ icritical.com

11 years ago- Fix libmd dependency. It is needed in the bootstrap library list because
hrs [Thu, 14 Feb 2013 08:32:07 +0000 (08:32 +0000)]
- Fix libmd dependency.  It is needed in the bootstrap library list because
  usr.bin/xinstall depends on it.
- Remove libutil from usr.bin/xinstall/Makefile.  No symbol was actually used.

Reviewed by: brooks

11 years agorework old-style functions prototypes
charnier [Thu, 14 Feb 2013 08:16:03 +0000 (08:16 +0000)]
rework old-style functions prototypes
reduce WARNS=6 output

11 years agoSimplify r243637 and make sure that nfsdargs.{min,max}threads are always set
delphij [Thu, 14 Feb 2013 02:00:41 +0000 (02:00 +0000)]
Simplify r243637 and make sure that nfsdargs.{min,max}threads are always set
to meaningful value:

 - When nfsdcnt is set, it dictates all values;
 - Otherwise, nfsdargs.minthreads is set to user specified value, or the
   automatically detected value if there is no one specified;
   nfsdargs.maxthreads is set to the user specified value, or the value
   of nfsdargs.minthreads if there is no one specified; when it is smaller
   than nfsdargs.minthreads, the latter's value is always used.

MFC after: 2 weeks

11 years agoAbstract out setting of nfsdcnt and consistently use MAXNFSDCNT when the
delphij [Thu, 14 Feb 2013 01:25:14 +0000 (01:25 +0000)]
Abstract out setting of nfsdcnt and consistently use MAXNFSDCNT when the
proposed value is too high and DEFNFSDCNT when proposed value is too low.

MFC after: 2 weeks

11 years agoUse static for all functions that do not need to be exported.
delphij [Thu, 14 Feb 2013 01:01:53 +0000 (01:01 +0000)]
Use static for all functions that do not need to be exported.

MFC after: 2 weeks

11 years agoRequests for invalid CPUID leaves should map to the highest known leaf instead.
neel [Wed, 13 Feb 2013 23:22:17 +0000 (23:22 +0000)]
Requests for invalid CPUID leaves should map to the highest known leaf instead.

Reviewed by: grehan
Obtained from: NetApp

11 years agoChange vfs.zfs.write_to_degraded from CTLFLAG_RW to CTLFLAG_RWTUN
mm [Wed, 13 Feb 2013 23:11:25 +0000 (23:11 +0000)]
Change vfs.zfs.write_to_degraded from CTLFLAG_RW to CTLFLAG_RWTUN

Suggested by: pjd

11 years agoMerge OpenSSL 1.0.1e.
jkim [Wed, 13 Feb 2013 23:07:20 +0000 (23:07 +0000)]
Merge OpenSSL 1.0.1e.

Approved by: secteam (simon), benl (silence)

11 years agoChange "the the" to "the". It is a continuation of r226436 and missed in
jkim [Wed, 13 Feb 2013 22:38:20 +0000 (22:38 +0000)]
Change "the  the" to "the".  It is a continuation of r226436 and missed in
r237658.

Approved by: benl (maintainer, implicit)

11 years agoImport OpenSSL 1.0.1e.
jkim [Wed, 13 Feb 2013 22:15:56 +0000 (22:15 +0000)]
Import OpenSSL 1.0.1e.

Approved by: secteam (delphij, simon), benl (silence)

11 years agoRestore De Bruijn algorithm for sparc64 where the compiler rely on a
delphij [Wed, 13 Feb 2013 17:30:54 +0000 (17:30 +0000)]
Restore De Bruijn algorithm for sparc64 where the compiler rely on a
library function for __builtin_c?z.

Tested by: Michael Moll <kvedulv kvedulv de>

11 years agoAdd strchrnul(), a GNU function similar to strchr(), except that it returns
zeising [Wed, 13 Feb 2013 15:46:33 +0000 (15:46 +0000)]
Add strchrnul(), a GNU function similar to strchr(), except that it returns
a pointer to the end of the string, rather than NULL, if the character was
not found.

Approved by: theraven

11 years agoRemove unused variable.
hselasky [Wed, 13 Feb 2013 15:43:15 +0000 (15:43 +0000)]
Remove unused variable.

MFC after: 1 week

11 years agoAdd a dependency so that when compiling in a static dtb, the kernel gets
ian [Wed, 13 Feb 2013 15:13:47 +0000 (15:13 +0000)]
Add a dependency so that when compiling in a static dtb, the kernel gets
re-linked after changing the .dts source.

Reviewed by: cognet, arm@

11 years agoMake the F_READAHEAD option to fcntl(2) work as documented: a value of zero
ian [Wed, 13 Feb 2013 15:09:16 +0000 (15:09 +0000)]
Make the F_READAHEAD option to fcntl(2) work as documented:  a value of zero
now disables read-ahead.  It used to effectively restore the system default
readahead hueristic if it had been changed; a negative value now restores
the default.

Reviewed by: kib

11 years agoResolve a LOR after r246616. Protect control requests using the USB device
hselasky [Wed, 13 Feb 2013 12:35:17 +0000 (12:35 +0000)]
Resolve a LOR after r246616. Protect control requests using the USB device
enumeration lock. Make sure all callers of usbd_enum_lock() check the return
value. Remove the control transfer specific lock. Bump the FreeBSD version
number, hence external USB modules may need to be recompiled due to a USB
device structure change.

MFC after: 1 week

11 years agoAdd new USB ID to FTDI driver.
hselasky [Wed, 13 Feb 2013 08:28:27 +0000 (08:28 +0000)]
Add new USB ID to FTDI driver.

MFC after: 1 week
PR: kern/175893
Submitted by: Tomek

11 years agoAdd specific supported revision of D-Link DWA-140 rev B1, B2.
hselasky [Wed, 13 Feb 2013 08:20:29 +0000 (08:20 +0000)]
Add specific supported revision of D-Link DWA-140 rev B1, B2.

Submitted by: PseudoCylon
MFC after: 1 week

11 years agoFix my email.
glebius [Wed, 13 Feb 2013 07:32:09 +0000 (07:32 +0000)]
Fix my email.

11 years agoAdd myself as a ports committer and my mentor relationship.
pclin [Wed, 13 Feb 2013 05:44:35 +0000 (05:44 +0000)]
Add myself as a ports committer and my mentor relationship.

Approved by: swills (mentor)

11 years agoPull out the if_transmit() work and revert back to ath_start().
adrian [Wed, 13 Feb 2013 05:32:19 +0000 (05:32 +0000)]
Pull out the if_transmit() work and revert back to ath_start().

My changed had some rather significant behavioural changes to throughput.
The two issues I noticed:

* With if_start and the ifnet mbuf queue, any temporary latency
  would get eaten up by some mbufs being queued.  With ath_transmit()
  queuing things to ath_buf's, I'd only get 512 TX buffers before I
  couldn't queue any further frames.

* There's also some non-zero latency involved with TX being pushed
  into a taskqueue via direct dispatch.  Any time the scheduler didn't
  immediately schedule the ath TX task would cause extra latency.
  Various 1ge/10ge drivers implement both direct dispatch (if the TX
  lock can be acquired) and deferred task transmission (if the TX lock
  can't be acquired), with frames being pushed into a drbd queue.
  I'll have to do this at some point, but until I figure out how to
  deal with 802.11 fragments, I'll have to wait a while longer.

So what I saw:

* lots of extra latency, specially under load - if the taskqueue
  wasn't immediately scheduled, things went pear shaped;

* any extra latency would result in TX ath_buf's taking their sweet time
  being replenished, so any further calls to ath_transmit() would drop
  mbufs.

* .. yes, there's no explicit backpressure here - things are just dropped.
  Eek.

With this, the general performance has gone up, but those subtle if_start()
related race conditions are back.  For some reason, this is doubly-obvious
with the AR5416 NIC and I don't quite understand why yet.

There's an unrelated issue with AR5416 performance in STA mode (it's
fine in AP mode when bridging frames, weirdly..) that requires a little
further investigation.  Specifically - it works fine on a Lenovo T40
(single core CPU) running a March 2012 9-STABLE kernel, but a Lenovo T60
(dual core) running an early November 2012 kernel behaves very poorly.
The same hardware with an AR9160 or AR9280 behaves perfectly.

11 years agoIntroduce PLATFORMMETHOD_END and use it.
rpaulo [Wed, 13 Feb 2013 02:21:45 +0000 (02:21 +0000)]
Introduce PLATFORMMETHOD_END and use it.

11 years ago- Make actually printing path of AF_LOCAL socket types.
zont [Tue, 12 Feb 2013 19:10:54 +0000 (19:10 +0000)]
- Make actually printing path of AF_LOCAL socket types.

MFC after: 1 week

11 years ago- Use correct size of copying different socket structures.
zont [Tue, 12 Feb 2013 18:48:11 +0000 (18:48 +0000)]
- Use correct size of copying different socket structures.

MFC after: 1 week

11 years agoEliminate the PC_CURTHREAD symbol and load the current thread's
marcel [Tue, 12 Feb 2013 17:38:35 +0000 (17:38 +0000)]
Eliminate the PC_CURTHREAD symbol and load the current thread's
thread structure pointer atomically from r13 (the pcpu pointer)
for the current CPU/core.
Add a CTASSERT in machdep.c to make sure that pc_curthread is in
fact the first field in struct pcpu.

The only non-atomic operations left were those related to process-
space operations, such as casuword, subyte, suword16, fubyte,
fuword16, copyin, copyout and their variations.

The casuword function has been re-structured more complete than
the others. This way we have an example of a better bundling
without introducing a lot of risk when we get it wrong. The
other functions can be rebundled in separate commits and with
the appropriate testing.

11 years agoEliminate padding by moving 'narg' next to 'code'. Both are 32-bit
marcel [Tue, 12 Feb 2013 17:24:41 +0000 (17:24 +0000)]
Eliminate padding by moving 'narg' next to 'code'. Both are 32-bit
entities in the syscall_args structure that otherwise has 64-bit
only fields.

11 years agoReform the busdma API so that new types may be added without modifying
kib [Tue, 12 Feb 2013 16:57:20 +0000 (16:57 +0000)]
Reform the busdma API so that new types may be added without modifying
every architecture's busdma_machdep.c.  It is done by unifying the
bus_dmamap_load_buffer() routines so that they may be called from MI
code.  The MD busdma is then given a chance to do any final processing
in the complete() callback.

The cam changes unify the bus_dmamap_load* handling in cam drivers.

The arm and mips implementations are updated to track virtual
addresses for sync().  Previously this was done in a type specific
way.  Now it is done in a generic way by recording the list of
virtuals in the map.

Submitted by: jeff (sponsored by EMC/Isilon)
Reviewed by: kan (previous version), scottl,
mjacob (isp(4), no objections for target mode changes)
Discussed with:      ian (arm changes)
Tested by: marius (sparc64), mips (jmallet), isci(4) on x86 (jharris),
amd64 (Fabian Keil <freebsd-listen@fabiankeil.de>)

11 years agoNow that we actually use more memory descriptors, make sure to dump
marcel [Tue, 12 Feb 2013 16:51:43 +0000 (16:51 +0000)]
Now that we actually use more memory descriptors, make sure to dump
them as well.

11 years agoo Bring in sync decoding the first nfssvc(2) parameter (flags) with
pluknet [Tue, 12 Feb 2013 13:01:34 +0000 (13:01 +0000)]
o Bring in sync decoding the first nfssvc(2) parameter (flags) with
the current definitions location.
o Respect numbers in NFSSVC_* (e.g. NFSSVC_V4ROOTEXPORT).

MFC after: 1 week

11 years agoSubstitute '#ifdef ALIGNED_POINTER' with '#ifndef __NO_STRICT_ALIGNMENT',
glebius [Tue, 12 Feb 2013 11:24:37 +0000 (11:24 +0000)]
Substitute '#ifdef ALIGNED_POINTER' with '#ifndef __NO_STRICT_ALIGNMENT',
since the former is defined everywhere. This cuts off some code not
necessary on non strict aligment arches.

Reviewed by: adrian
Sponsored by: Nginx, Inc.

11 years agoRemove debug output
gonzo [Tue, 12 Feb 2013 07:27:40 +0000 (07:27 +0000)]
Remove debug output

11 years agoWhen clang builds libc it may insert calls to __aeabi_* functions. Normally
andrew [Tue, 12 Feb 2013 06:04:51 +0000 (06:04 +0000)]
When clang builds libc it may insert calls to __aeabi_* functions. Normally
this is not a problem as they are resolved by libgcc. The exception is for
the __aeabi_mem* functions. These call back into libc to the appropriate
function. This causes issues for static binaries as we only link against
libc once so there is no way for it to call into libgcc and back.

The fix for this is to include these symbols in libc but keep them hidden
so binaries use the libgcc version.

11 years agoAllow us to build clang for ARM EABI. Clang and llvm use the
andrew [Tue, 12 Feb 2013 05:56:00 +0000 (05:56 +0000)]
Allow us to build clang for ARM EABI. Clang and llvm use the
arm-gnueabi-freebsd10.0 triple for EABI. Use this when we are on arm or
armv6 and are building for EABI.

Reviewed by: dim

11 years agoStyle.
pjd [Mon, 11 Feb 2013 23:14:54 +0000 (23:14 +0000)]
Style.

11 years agoUpdate comments to reflect r246689.
marius [Mon, 11 Feb 2013 23:05:10 +0000 (23:05 +0000)]
Update comments to reflect r246689.

11 years agoStyle.
pjd [Mon, 11 Feb 2013 22:54:23 +0000 (22:54 +0000)]
Style.

11 years agoMake SYSCTL_{LONG,QUAD,ULONG,UQUAD}(9) work as advertised and also handle
marius [Mon, 11 Feb 2013 21:50:00 +0000 (21:50 +0000)]
Make SYSCTL_{LONG,QUAD,ULONG,UQUAD}(9) work as advertised and also handle
constant values.

Reviewed by: kib
MFC after: 3 days

11 years agoMerge zfs_ioctl.c code that should have been merged together with ZFS v28.
mm [Mon, 11 Feb 2013 21:10:55 +0000 (21:10 +0000)]
Merge zfs_ioctl.c code that should have been merged together with ZFS v28.
Fixes several problems if working with read-only pools.

Changed code originaly introduced in onnv-gate 13061:bda0decf867b
Contains changes up to illumos-gate 13700:4bc0783f6064

PR: kern/175897
Suggested by: avg

MFC after: 2 weeks

11 years agoSend the adaptation layer indication only if set by the user.
tuexen [Mon, 11 Feb 2013 21:02:49 +0000 (21:02 +0000)]
Send the adaptation layer indication only if set by the user.

MFC after: 3 days
Discussed with: rrs

11 years agoImplement guest vcpu pinning using 'pthread_setaffinity_np(3)'.
neel [Mon, 11 Feb 2013 20:36:07 +0000 (20:36 +0000)]
Implement guest vcpu pinning using 'pthread_setaffinity_np(3)'.

Prior to this change pinning was implemented via an ioctl (VM_SET_PINNING)
that called 'sched_bind()' on behalf of the user thread.

The ULE implementation of 'sched_bind()' bumps up 'td_pinned' which in turn
runs afoul of the assertion '(td_pinned == 0)' in userret().

Using the cpuset affinity to implement pinning of the vcpu threads works with
both 4BSD and ULE schedulers and has the happy side-effect of getting rid
of a bunch of code in vmm.ko.

Discussed with: grehan

11 years agoUse the right year.
delphij [Mon, 11 Feb 2013 18:22:26 +0000 (18:22 +0000)]
Use the right year.

Noticed by: Denis Ahrens <denis h3q com>

11 years agoMFV r246633:
mm [Mon, 11 Feb 2013 14:29:38 +0000 (14:29 +0000)]
MFV r246633:
Import vendor bugfixes regarding SA rounding, header size and layout.
This was already partially fixed by avg.

Illumos ZFS issues:
  3512 rounding discrepancy in sa_find_sizes()
  3513 mismatch between SA header size and layout

References:
  https://www.illumos.org/issues/3512
  https://www.illumos.org/issues/3513

MFC after: 2 weeks

11 years agoMFV r246394:
mm [Mon, 11 Feb 2013 13:59:57 +0000 (13:59 +0000)]
MFV r246394:
Add tunable to allow block allocation on degraded vdevs.

Illumos ZFS issues:
  3507 Tunable to allow block allocation even on degraded vdevs

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

MFC after: 2 weeks

11 years agoDon't send kernel provided information in the User Initiated
tuexen [Mon, 11 Feb 2013 13:57:03 +0000 (13:57 +0000)]
Don't send kernel provided information in the User Initiated
ABORT cause, since the user can also provide this kind of
information. So the receiver doesn't know who provided the
information.
While there: Fix a bug where the stack would send a malformed
ABORT chunk when using a send() call with SCTP_ABORT|SCT_SENDALL
flags.

MFC after: 3 days

11 years agoMajor update for unix_cmsg from Andrey Simonenko.
pluknet [Mon, 11 Feb 2013 12:56:23 +0000 (12:56 +0000)]
Major update for unix_cmsg from Andrey Simonenko.

Quoting the submitter:
- Added tests for SCM_BINTIME, LOCAL_PEERCRED, cmsghdr.cmsg_len
- Code that checks correctness of groups was corrected (getgroups(2) change)
- unix_cmsg.c was completely redesigned and simplified
- Use less timeout value in unix_cmsg.c for faster work
- Added support for not sending data in a message, not sending data and
  data array associated with a cmsghdr structure in a message
- Existent tests were improved
- unix_cmsg.t was redesigned and simplified

Correctness of unix_cmsg verified on 7.1-STABLE, 9.1-STABLE and 10-CURRENT.

PR: bin/131567
Submitted by: Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua>
MFC after: 2 weeks

11 years agoMFV r246392:
mm [Mon, 11 Feb 2013 12:42:11 +0000 (12:42 +0000)]
MFV r246392:
Import vendor ZFS bugfix fixing a possible deadlock in arc_read().

Illumos ZFS issues:
  3498 panic in arc_read(): !refcount_is_zero(&pbuf->b_hdr->b_refcnt)

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

MFC after: 2 weeks

11 years agoA10 reset mechanism is the same for all boards in this family so remove
gonzo [Mon, 11 Feb 2013 11:33:56 +0000 (11:33 +0000)]
A10 reset mechanism is the same for all boards in this family so remove
redundant reset function implementation pointer. We might want to
ressurect it later when support for other Allwinner chips is introduced.

11 years agoAdd watchdog driver for Allwinner A10
gonzo [Mon, 11 Feb 2013 11:31:23 +0000 (11:31 +0000)]
Add watchdog driver for Allwinner A10

11 years ago Resolve source address selection in presense of CARP. Add a couple
glebius [Mon, 11 Feb 2013 10:58:22 +0000 (10:58 +0000)]
  Resolve source address selection in presense of CARP. Add a couple
of helper functions:

- carp_master()   - boolean function which is true if an address
    is in the MASTER state.
- ifa_preferred() - boolean function that compares two addresses,
    and is aware of CARP.

  Utilize ifa_preferred() in ifa_ifwithnet().

  The previous version of patch also changed source address selection
logic in jails using carp_master(), but we failed to negotiate this part
with Bjoern. May be we will approach this problem again later.

Reported & tested by: Anton Yuzhaninov <citrin citrin.ru>
Sponsored by: Nginx, Inc

11 years agoCross-reference vfs_unbusy(9).
pluknet [Mon, 11 Feb 2013 10:14:12 +0000 (10:14 +0000)]
Cross-reference vfs_unbusy(9).

MFC after: 1 week

11 years agoAdd -lheimntlm to LDADD directly.
brooks [Mon, 11 Feb 2013 09:45:24 +0000 (09:45 +0000)]
Add -lheimntlm to LDADD directly.

With the current binutils, symbols from libheimtlm.so are loaded because
it is referenced by DT_NEEDED.  This feature is not implemented in
mclinker (https://code.google.com/p/mclinker/issues/detail?id=104).
I encountered the same issue when linking with a recent devel/binutils
invoked via clang.  This was the only use of DT_NEEDED in the tree so
removing it simplifies toolchain requirements.

Submitted by: Pete Chou <petechou@gmail.com> (mclinker issue)

11 years agoUse DEVMETHOD_END.
rpaulo [Mon, 11 Feb 2013 08:20:21 +0000 (08:20 +0000)]
Use DEVMETHOD_END.

11 years agoPut this back into the ath taskqueue rather than the ath TX taskqueue.
adrian [Mon, 11 Feb 2013 07:49:40 +0000 (07:49 +0000)]
Put this back into the ath taskqueue rather than the ath TX taskqueue.

This now should mean all the entry points into the software TX
scheduler are back in the same taskqueue.

11 years agoMFV r246390:
mm [Mon, 11 Feb 2013 07:48:57 +0000 (07:48 +0000)]
MFV r246390:
Import minor type change in refcount.h header from vendor (illumos).

MFC after: 2 weeks

11 years agoGo back to direct-dispatch of the software queue and frame TX paths
adrian [Mon, 11 Feb 2013 07:48:26 +0000 (07:48 +0000)]
Go back to direct-dispatch of the software queue and frame TX paths
when they're being called from the TX completion handler.

Going (back) through the taskqueue is just adding extra locking and
latency to packet operations.  This improves performance a little bit
on most NICs.

It still hasn't restored the original performance of the AR5416 NIC
but the AR9160, AR9280 and later NICs behave very well with this.

Tested:

* AR5416 STA (still tops out at ~ 70mbit TCP, rather than 150mbit TCP..)
* AR9160 hostap (good for both TX and RX)
* AR9280 hostap (good for both TX and RX)

11 years agoTeach athalq about the recent if_ath_alq timestamp format change.
adrian [Mon, 11 Feb 2013 02:54:24 +0000 (02:54 +0000)]
Teach athalq about the recent if_ath_alq timestamp format change.

11 years agoExtend the timestamp to be a timeval, rather than ticks.
adrian [Mon, 11 Feb 2013 02:48:49 +0000 (02:48 +0000)]
Extend the timestamp to be a timeval, rather than ticks.

This makes it easier to see TX and RX buffer latencies.

11 years agoProvide verbose help for fdt commands on platforms that use it.
kientzle [Mon, 11 Feb 2013 02:15:26 +0000 (02:15 +0000)]
Provide verbose help for fdt commands on platforms that use it.

11 years agoCapability rights for process management via process descriptors do exist
pjd [Mon, 11 Feb 2013 00:10:35 +0000 (00:10 +0000)]
Capability rights for process management via process descriptors do exist
already, so uncomment them.

Sponsored by: The FreeBSD Foundation

11 years agoAdd CAP_MKNOD right.
pjd [Sun, 10 Feb 2013 23:51:26 +0000 (23:51 +0000)]
Add CAP_MKNOD right.

Sponsored by: The FreeBSD Foundation

11 years agofts: Use O_DIRECTORY when opening name that might be changed by attacker.
jilles [Sun, 10 Feb 2013 23:09:15 +0000 (23:09 +0000)]
fts: Use O_DIRECTORY when opening name that might be changed by attacker.

There are uncommon cases where fts_safe_changedir() may be called with a
non-NULL name that is not "..". Do not block or worse if an attacker put (a
(symlink to) a fifo or device where a directory used to be.

MFC after: 1 week

11 years agoRemove the ia64-specific code fragment, which effect is more cleanly
kib [Sun, 10 Feb 2013 20:08:33 +0000 (20:08 +0000)]
Remove the ia64-specific code fragment, which effect is more cleanly
done by the call to trans_prot() function a line before.

Discussed with: Oliver Pinter <oliver.pntr@gmail.com>
MFC after: 1 week

11 years agoMake sure that received packets for removed addresses are handled
tuexen [Sun, 10 Feb 2013 19:57:19 +0000 (19:57 +0000)]
Make sure that received packets for removed addresses are handled
consistently. While there, make variable names consistent.

MFC after: 3 days

11 years agoext2fs: Use prototype declarations for function definitions
pfg [Sun, 10 Feb 2013 19:49:37 +0000 (19:49 +0000)]
ext2fs: Use prototype declarations for function definitions

Submitted by: Christoph Mallon
MFC after: 2 weeks

11 years agoUse the entire 64 bits of 'bar.pbi_length' when printing the bar size.
neel [Sun, 10 Feb 2013 19:35:40 +0000 (19:35 +0000)]
Use the entire 64 bits of 'bar.pbi_length' when printing the bar size.

This allows bar sizes greater than or equal to 4GB to be displayed correctly.

11 years agoMFV r246388:
mm [Sun, 10 Feb 2013 19:32:55 +0000 (19:32 +0000)]
MFV r246388:

Import vendor bugfixes

Illumos ZFS issues:
  3422 zpool create/syseventd race yield non-importable pool
  3425 first write to a new zvol can fail with EFBIG

References:
  https://www.illumos.org/issues/3422
  https://www.illumos.org/issues/3425

MFC after: 2 weeks

11 years agoAdd bootcamp support to the loader.
ae [Sun, 10 Feb 2013 19:27:17 +0000 (19:27 +0000)]
Add bootcamp support to the loader.

Tested by: dchagin
MFC after: 1 week

11 years agoImprove code style. No functional change.
tuexen [Sun, 10 Feb 2013 19:21:17 +0000 (19:21 +0000)]
Improve code style. No functional change.

MFC after: 3 days

11 years agofind: Run when cwd cannot be opened, except with -execdir or -delete.
jilles [Sun, 10 Feb 2013 18:56:37 +0000 (18:56 +0000)]
find: Run when cwd cannot be opened, except with -execdir or -delete.

fts(3) can run (albeit more slowly and imposing the {PATH_MAX} limit) when
the current directory cannot be opened. Therefore, do not make a failure to
open the current directory (for returning to it later in -exec) fatal.

If -execdir or -delete are used, the expectation is that fts(3) will use
chdir to avoid race conditions (except for -execdir with -L). Do not break
this expectation any more than it already is by still failing if the current
directory cannot be opened.

11 years agoDon't try to suppress the inclusion of the build date in named's version
cperciva [Sun, 10 Feb 2013 17:58:44 +0000 (17:58 +0000)]
Don't try to suppress the inclusion of the build date in named's version
string by undefining __DATE__, since (unlike gcc) clang doesn't allow us
to do that.  Instead, define NO_VERSION_DATE, which was helpfully added
to the named source code for exactly this purpose.

11 years agoBackport vendor changes in zfs(8) manual page (MFV r246389)
mm [Sun, 10 Feb 2013 17:10:07 +0000 (17:10 +0000)]
Backport vendor changes in zfs(8) manual page (MFV r246389)

Illumos ZFS issues:
  3380 zfs man page: documentation for zfs allow is confusing

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

MFC after: 2 weeks

11 years agoFix minor memory leak.
pjd [Sun, 10 Feb 2013 15:56:47 +0000 (15:56 +0000)]
Fix minor memory leak.

11 years agoAssert that if we are not dealing with keyfile we are dealing with passfile.
pjd [Sun, 10 Feb 2013 15:56:20 +0000 (15:56 +0000)]
Assert that if we are not dealing with keyfile we are dealing with passfile.

11 years agoUse arc4random_buf(3) instead of reimplementing it.
pjd [Sun, 10 Feb 2013 15:55:42 +0000 (15:55 +0000)]
Use arc4random_buf(3) instead of reimplementing it.

11 years agoCorrect spelling of "daemon". No .Dd bump.
gavin [Sun, 10 Feb 2013 14:28:07 +0000 (14:28 +0000)]
Correct spelling of "daemon".  No .Dd bump.

Noticed by: Nathan Rich <Nathan.Rich dynastysystems com>
MFC after: 3 days

11 years agofind: In -execdir ... {} +, only pass one file per invocation.
jilles [Sun, 10 Feb 2013 13:28:02 +0000 (13:28 +0000)]
find: In -execdir ... {} +, only pass one file per invocation.

This is inefficient but ensures that -execdir ... {} + does not mix files
from different directories in one invocation; the command could not access
some files. Files from the same directory should really be handled in one
invocation but this is somewhat more complicated.

11 years agosigqueue(2): Fix typo (EEPERM -> EPERM).
jilles [Sun, 10 Feb 2013 13:20:23 +0000 (13:20 +0000)]
sigqueue(2): Fix typo (EEPERM -> EPERM).

MFC after: 3 days

11 years ago- Move scratch data from the USB bus structure to the USB device structure
hselasky [Sun, 10 Feb 2013 10:56:13 +0000 (10:56 +0000)]
- Move scratch data from the USB bus structure to the USB device structure
so that simultaneous access cannot happen. Protect scratch area using
the enumeration lock. Also reduce stack usage in usbd_transfer_setup()
by moving some big stack members to the scratch area. This saves around
200 bytes of stack.
- Fix a whitespace.

MFC after: 1 week

11 years agoFix correct use of USB header files.
hselasky [Sun, 10 Feb 2013 10:55:20 +0000 (10:55 +0000)]
Fix correct use of USB header files.

11 years ago- Streamline detach logic in wlan drivers, so that
hselasky [Sun, 10 Feb 2013 10:36:16 +0000 (10:36 +0000)]
- Streamline detach logic in wlan drivers, so that
  freed memory cannot be used during detach.
- Remove all panic() calls from the urtw driver because
  panic() is not appropriate here.
- Remove redundant checks for device detached in
  device detach callbacks.
- Use DEVMETHOD_END to mark end of device methods.

MFC after: 2 weeks

11 years agoFix several unsafe pointer dereferences in the buffered_write()
kib [Sun, 10 Feb 2013 10:17:33 +0000 (10:17 +0000)]
Fix several unsafe pointer dereferences in the buffered_write()
function, implementing the sysctl vfs.ffs.set_bufoutput (not used in
the tree yet).

- The current directory vnode dereference is unsafe since fd_cdir
  could be changed and unreferenced, lock the filedesc around and vref
  the fd_cdir.
- The VTOI() conversion of the fd_cdir is unsafe without first
  checking that the vnode is indeed from an FFS mount, otherwise
  the code dereferences a random memory.
- The cdir could be reclaimed from under us, lock it around the
  checks.
- The type of the fp vnode might be not a disk, or it might have
  changed while the thread was in flight, check the type.

Reviewed and tested by: mckusick
MFC after: 2 weeks

11 years agoRemove a racy checks on resident and cached pages for
attilio [Sun, 10 Feb 2013 01:04:10 +0000 (01:04 +0000)]
Remove a racy checks on resident and cached pages for
tmpfs_mapped{read, write}() functions:
- tmpfs_mapped{read, write}() are only called within VOP_{READ, WRITE}(),
  which check before-hand to work only on valid VREG vnodes.  Also the
  vnode is locked for the duration of the work, making vnode reclaiming
  impossible, during the operation. Hence, vobj can never be NULL.
- Currently check on resident pages and cached pages without vm object
  lock held is racy and can do even more harm than good, as a page could
  be transitioning between these 2 pools and then be skipped entirely.
  Skip the checks as lookups on empty splay trees are very cheap.

Discussed with: alc
Tested by: flo
MFC after: 2 weeks

11 years agoAdd nmtree to ITOOLS if it is installed on the host instead of keying off
brooks [Sat, 9 Feb 2013 23:17:28 +0000 (23:17 +0000)]
Add nmtree to ITOOLS if it is installed on the host instead of keying off
the BOOTSTRAPPING variable.  The previous test was wrong because
BOOTSTRAPPING is 0 in most cases.

Tested by: db

11 years agoFix breakage introduced in r246318.
kientzle [Sat, 9 Feb 2013 21:36:14 +0000 (21:36 +0000)]
Fix breakage introduced in r246318.

11 years agoAdd dtc to the build.
kientzle [Sat, 9 Feb 2013 18:14:26 +0000 (18:14 +0000)]
Add dtc to the build.

11 years agoCleanup the handling of address scopes. Announce in the INIT/INIT-ACK
tuexen [Sat, 9 Feb 2013 17:26:14 +0000 (17:26 +0000)]
Cleanup the handling of address scopes. Announce in the INIT/INIT-ACK
only the supported address types. While there, do some whitespace
cleanups.

MFC after: 1 week

11 years agoReference something which exists instead of the non-existent runsocks
eadler [Sat, 9 Feb 2013 17:13:54 +0000 (17:13 +0000)]
Reference something which exists instead of the non-existent runsocks
program.

PR: docs/173664
Submitted by: wkoszek
Approved by: bcr (mentor)

11 years agoFix logic inversion.
eadler [Sat, 9 Feb 2013 17:13:51 +0000 (17:13 +0000)]
Fix logic inversion.

PR: docs/174966
Submitted by: Christian Ullrich <chris+freebsd@chrullrich.net>
Approved by: bcr (mentor)