]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoIn r268924 __fflush was modified so that when write(2) was not successful,
Xin LI [Wed, 10 Dec 2014 08:18:22 +0000 (08:18 +0000)]
In r268924 __fflush was modified so that when write(2) was not successful,
_p and _w are adjusted to account for the partial write (if any).

However, _p and _w should not be unconditionally adjusted and should only
be changed when we actually wrote some bytes, or the accumulated accounting
error will eventually result in a heap buffer overflow.

Reported by: adrian and alfred (Norse Corporation)
Security: FreeBSD-SA-14:27.stdio
Security: CVE-2014-8611

9 years agoFix the watchdog timeout calculation to prevent wrap. The RPi hardware
Ian Lepore [Wed, 10 Dec 2014 04:54:43 +0000 (04:54 +0000)]
Fix the watchdog timeout calculation to prevent wrap.  The RPi hardware
can't do a timeout bigger than 15 seconds.  The code wasn't checking for
this and because bitmasking was involved the requested timeout was
basically adjusted modulo-16.  That led to things like a 128 second
timeout actually being a 9 second timeout, which accidentally worked fine
until watchdogd was changed to only pet the dog once every 10 seconds.

9 years agoFix dependency on newvers.sh
Dag-Erling Smørgrav [Wed, 10 Dec 2014 03:12:22 +0000 (03:12 +0000)]
Fix dependency on newvers.sh

Noticed by: marck
MFC after: 1 week

9 years agoRestructure to make it easier to extend in the future
Brad Davis [Tue, 9 Dec 2014 23:26:47 +0000 (23:26 +0000)]
Restructure to make it easier to extend in the future

Reviewed by: will
Suggested by: ngie

9 years agoAdd some tests for user modification. [1]
Brad Davis [Tue, 9 Dec 2014 22:11:56 +0000 (22:11 +0000)]
Add some tests for user modification. [1]
Fix a missing test in the Makefile from my previous commit.

PR: 195834 [1]
Submitted by: Robert O'Neil <oneil.rs@gmail.com>
Approved by: will

9 years agoBreak out the tests into a file per command and clean up some long lines
Brad Davis [Tue, 9 Dec 2014 21:43:03 +0000 (21:43 +0000)]
Break out the tests into a file per command and clean up some long lines

Approved by: will

9 years agoAdd more tests for pw(8) useradd.
Brad Davis [Tue, 9 Dec 2014 20:36:07 +0000 (20:36 +0000)]
Add more tests for pw(8) useradd.

PR: 195832
Submitted by: Robert O'Neil <oneil.rs@gmail.com>
Approved by: will

9 years agoAdd llvm patch corresponding to r275633.
Dimitry Andric [Tue, 9 Dec 2014 20:04:26 +0000 (20:04 +0000)]
Add llvm patch corresponding to r275633.

9 years ago-u and -U are supposed to affect existing files too.
Simon J. Gerraty [Tue, 9 Dec 2014 19:50:50 +0000 (19:50 +0000)]
-u and -U are supposed to affect existing files too.

Reviewed by: marcel

9 years agoxen: create a new PCI bus override
Roger Pau Monné [Tue, 9 Dec 2014 18:03:25 +0000 (18:03 +0000)]
xen: create a new PCI bus override

When running as a Xen PVH Dom0 we need to add custom buses that override
some of the functionality present in the ACPI PCI Bus and the PCI Bus. We
currently override the ACPI PCI Bus, but not the PCI Bus, so add a new
override for the PCI Bus and share the generic functions between them.

Reported by: David P. Discher <dpd@dpdtech.com>
Sponsored by: Citrix Systems R&D

conf/files.amd64:
 - Add the new files.

x86/xen/xen_pci_bus.c:
 - Generic file that contains the PCI overrides so they can be used by the
   several PCI specific buses.

xen/xen_pci.h:
 - Prototypes for the generic overried functions.

dev/xen/pci/xen_pci.c:
 - Xen specific override for the PCI bus.

dev/xen/pci/xen_acpi_pci.c:
 - Xen specific override for the ACPI PCI bus.

9 years agoo Add BERI Virtio Networking Frontend (if_vtbe)
Ruslan Bukin [Tue, 9 Dec 2014 16:39:21 +0000 (16:39 +0000)]
o Add BERI Virtio Networking Frontend (if_vtbe)
o Move similar block/networking methods to common file
o Follow r275640 and correct MMIO registers width
o Pass value to MMIO platform_note method.

Sponsored by: DARPA, AFRL

9 years agoRename NETGEAR WG111V2_2 to WG111V1_2 to reflect external naming.
Mark Peek [Tue, 9 Dec 2014 15:26:04 +0000 (15:26 +0000)]
Rename NETGEAR WG111V2_2 to WG111V1_2 to reflect external naming.

Reviewed by: kevlo

9 years agoext2fs: Fix old out-of-bounds access.
Pedro F. Giffuni [Tue, 9 Dec 2014 14:56:00 +0000 (14:56 +0000)]
ext2fs: Fix old out-of-bounds access.

Overrunning buffer pointed to by (caddr_t)&oip->i_db[0] of 48 bytes by
passing it to a function which accesses it at byte offset 59 using
argument 60UL.

The issue was inherited from an older FFS implementation and
fixed there with by merging UFS2 in r98542. We follow the
FFS fix.

Discussed with: bde
CID: 1007665
MFC after: 3 days

9 years agoSkip calling CPU_ISSET for NOCPU as a short period of time we can have
Dmitry Chagin [Tue, 9 Dec 2014 14:21:43 +0000 (14:21 +0000)]
Skip calling CPU_ISSET for NOCPU as a short period of time we can have
td_oncpu is NOCPU for thread in TDS_RUNNING state.

Differential Revision: https://reviews.freebsd.org/D1283
Reviewed by: jhb
MFC after: 1 Month

9 years agoxen: notify ACPI about SCI override
Roger Pau Monné [Tue, 9 Dec 2014 11:12:24 +0000 (11:12 +0000)]
xen: notify ACPI about SCI override

If the SCI is remapped to a non-ISA global interrupt notify the ACPI
subsystem about the override.

Reported by: David P. Discher <dpd@dpdtech.com>
Sponsored by: Citrix Systems R&D

9 years agoUpdate the virtio driver to work on the ARM AArch64 Foundation Model.
Andrew Turner [Tue, 9 Dec 2014 10:31:35 +0000 (10:31 +0000)]
Update the virtio driver to work on the ARM AArch64 Foundation Model.
There are two main parts to get it to work, 1) most of the register
accesses need to be word sized, other than the config register which
needs to be byte aligned, and 2) we don't need the platform driver
for this to work on the Foundation Model, allow it to be NULL.

Differential Revision: https://reviews.freebsd.org/D1240
Reviewed by: bryanv
Sponsored by: The FreeBSD Foundation

9 years agoInclude sys/kernel.h to pick up the definition of hz. subr_syscall.c uses
Andrew Turner [Tue, 9 Dec 2014 10:21:31 +0000 (10:21 +0000)]
Include sys/kernel.h to pick up the definition of hz. subr_syscall.c uses
it after r275616.

X-MFC with: r275616

9 years agoDo not call VFS_SYNC() before VFS_UNMOUNT() for forced unmount.
Konstantin Belousov [Tue, 9 Dec 2014 10:00:47 +0000 (10:00 +0000)]
Do not call VFS_SYNC() before VFS_UNMOUNT() for forced unmount.

Since VFS does not/cannot stop writes, sync might run indefinitely, or
be a wrong thing to do at all.  E. g. NFS ignores VFS_SYNC() for
forced unmounts, since non-responding server does not allow sync to
finish.  On the other hand, filesystems can and do stop writes using
fs-specific facilities, and should already fully flush caches in
VFS_UNMOUNT() due to the race.

Adjust msdosfs tp sync in unmount for forced call, to accomodate the
new behaviour.  Note that it is still racy, since writes are not
stopped.

Discussed with: avg, bjk, mckusick
Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 3 weeks

9 years agoApply chunk forgotten in r275620. Remove local variable for real.
Konstantin Belousov [Tue, 9 Dec 2014 09:36:28 +0000 (09:36 +0000)]
Apply chunk forgotten in r275620.  Remove local variable for real.

CID: 1257462
Sponsored by: The FreeBSD Foundation

9 years agoMove OFED init a bit earlier so that PXE boot works.
Hans Petter Selasky [Tue, 9 Dec 2014 08:56:01 +0000 (08:56 +0000)]
Move OFED init a bit earlier so that PXE boot works.

MFC after: 3 days
Sponsored by: Mellanox Technologies

9 years agoPull in r223171 from upstream llvm trunk (by Michael Zolotukhin):
Dimitry Andric [Tue, 9 Dec 2014 07:34:28 +0000 (07:34 +0000)]
Pull in r223171 from upstream llvm trunk (by Michael Zolotukhin):

  PR21302. Vectorize only bottom-tested loops.

  rdar://problem/18886083

This fixes a bug in the llvm vectorizer, which could sometimes cause
vectorized loops to perform an additional iteration, leading to possible
buffer overruns.  Symptoms of this, which are usually segfaults, were
first noticed when building gcc ports, here:

https://lists.freebsd.org/pipermail/freebsd-ports/2014-September/095466.html
https://lists.freebsd.org/pipermail/freebsd-toolchain/2014-September/001211.html

Since this fix is very important for ports, bump __FreeBSD_version to
make it easier for port maintainers to test whether the fix has been
applied.

Upstream PR: http://llvm.org/PR21302
MFC after: 3 days

9 years agoAdd port routing support for Wildcat Point.
Hans Petter Selasky [Mon, 8 Dec 2014 21:14:13 +0000 (21:14 +0000)]
Add port routing support for Wildcat Point.

PR: 195793
MFC after: 1 week

9 years agoAdd makewhatis to ITOOLS if MK_MAN != no
Enji Cooper [Mon, 8 Dec 2014 18:29:20 +0000 (18:29 +0000)]
Add makewhatis to ITOOLS if MK_MAN != no

This will fix installation with differing host targets in installworld, so
one can build i386/i386 on an amd64 host, then install to an i386/i386 target

Reported by: alfred
Phabric: D1280
MFC after: 1 week

9 years agoAdd -lxo (for df) and -lgpio(for gpioctl) to bsdbox. This will allow the picostation
Sean Bruno [Mon, 8 Dec 2014 17:14:01 +0000 (17:14 +0000)]
Add -lxo (for df) and -lgpio(for gpioctl) to bsdbox.  This will allow the picostation
build to work again.

Reviewed by: adrian

9 years agoAdd functions syncer_suspend() and syncer_resume(), which are supposed
Konstantin Belousov [Mon, 8 Dec 2014 16:48:57 +0000 (16:48 +0000)]
Add functions syncer_suspend() and syncer_resume(), which are supposed
to be called before suspension and after resume, correspondingly.  The
syncer_suspend() ensures that all filesystems dirty data and metadata
are saved to the permanent storage, and stops kernel threads which
might modify filesystems.  The syncer_resume() restores stopped
threads.

For now, only syncer is stopped.  This is needed, because each sync
loop causes superblock updates for UFS.

Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoWhen getnewbuf_reuse_bp() is called to reclaim some (clean) buffer,
Konstantin Belousov [Mon, 8 Dec 2014 16:42:34 +0000 (16:42 +0000)]
When getnewbuf_reuse_bp() is called to reclaim some (clean) buffer,
the vnode owning the buffer is not locked.  More, it cannot be locked
safely, since getnewbuf_reuse_bp() is called from newbuf(), and some
other vnode is already locked, for which reused buffer will be
reassigned.

As the consequence, reclamation of the owning vnode could go in
parallel, in particular, the call to vnode_destroy_vobject(), which
deallocates the vm object and zeroes the v_bufobj->bo_object.  Note
that the pages wired by the buffer are left wired and can be safely
freed by the vfs_vmio_release() without the need for the vm object
lock.  Also, seeing stale pointer to the v_object is safe due to vm
object type stability.

Check for bo_bufobj != NULL and cache the value in local variable to
avoid trying to lock NULL vm object.

Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoCurrent reaction of the nfsd worker threads to any signal is exit.
Konstantin Belousov [Mon, 8 Dec 2014 16:33:18 +0000 (16:33 +0000)]
Current reaction of the nfsd worker threads to any signal is exit.
This is not correct at least for the stop requests.  Check for stop
conditions and suspend threads if requested.

Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoDo some refactoring and minor cleanups of the thread_single() code in
Konstantin Belousov [Mon, 8 Dec 2014 16:27:43 +0000 (16:27 +0000)]
Do some refactoring and minor cleanups of the thread_single() code in
preparation for the global stop commit.

Move the code to weed suspended or sleeping threads into the
appropriate state, into the helper weed_inhib().  Current code already
has deep nesting and hard to follow [1].

Add currently useless helper remain_for_mode(), which returns the
count of threads which are allowed to run, according to the
single-threading mode.

In thread_single_end(), do not save curthread into local variable, it
is unused after, except to find curproc.

Remove stray empty line.

Requested by: avg [1]
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoThread waiting for the vfork(2)-ed child to exec or exit, must allow
Konstantin Belousov [Mon, 8 Dec 2014 16:18:05 +0000 (16:18 +0000)]
Thread waiting for the vfork(2)-ed child to exec or exit, must allow
for the suspension.

Currently, the loop performs uninterruptible cv_wait(9) call, which
prevents suspension until child allows further execution of parent.
If child is stopped, suspension or single-threading is delayed
indefinitely.

Create a helper thread_suspend_check_needed() to identify the need for
a call to thread_suspend_check().  It is required since call to the
thread_suspend_check() cannot be safely done while owning the child
(p2) process lock.  Only when suspension is needed, drop p2 lock and
call thread_suspend_check().  Perform wait for cv with timeout, in
case suspend is requested after wait started; I do not see a better
way to interrupt the wait.

Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoWhen process is exiting, check for suspension regardless of
Konstantin Belousov [Mon, 8 Dec 2014 16:02:02 +0000 (16:02 +0000)]
When process is exiting, check for suspension regardless of
multithreaded status of the process.

The stopped state must be cleared before P_WEXIT is set.  A stop
signal delivered just before first PROC_LOCK() block in exit1(9) would
put the process into pending stop with P_WEXIT set or assertion
triggered.  Also recheck for the suspension after failed
thread_single(9) call, since process lock could be dropped.

Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoAdjust the |x| small limit from 0x1p-7 to 0x1p-9. This
Steve Kargl [Mon, 8 Dec 2014 15:47:52 +0000 (15:47 +0000)]
Adjust the |x| small limit from 0x1p-7 to 0x1p-9.  This
adjustment increases the number of correctly rounded
cases within the interval on i386.

Requested by: bde

9 years agoAdjust the 'Relnotes:' search to look for any non-empty
Glen Barber [Mon, 8 Dec 2014 15:45:07 +0000 (15:45 +0000)]
Adjust the 'Relnotes:' search to look for any non-empty
string following the tag.

Sponsored by: The FreeBSD Foundation

9 years agopatch(1): avoid line number overflows
Pedro F. Giffuni [Mon, 8 Dec 2014 15:10:48 +0000 (15:10 +0000)]
patch(1): avoid line number overflows

Introduce strtolinenum to properly check line numbers while parsing:
no signs, no spaces, just digits, 0 <= x <= LONG_MAX

Properly validate line ranges supplied in diff file to prevent overflows.
Also fixes an out of boundary memory access because the resulting values
are used as array indices.

PR: 195436
Obtained from: OpenBSD (CVS pch.c rev 1.45, 1,46, common.h rev 1.28)
MFC after: 1 week

9 years agoAdd more U3G USB IDs.
Hans Petter Selasky [Mon, 8 Dec 2014 10:49:23 +0000 (10:49 +0000)]
Add more U3G USB IDs.

Submitted by: Benediktus Anindito <bennybroz105@gmail.com>
MFC after: 1 week

9 years agoAdd more USB quirks for Western Digital external USB HDD
Hans Petter Selasky [Mon, 8 Dec 2014 10:41:34 +0000 (10:41 +0000)]
Add more USB quirks for Western Digital external USB HDD
enclosures. Rename an incorrectly named device. Increase
limit for maximum number of quirks.

PR:     178771, 180617
MFC after:  2 weeks

9 years agoBuild gperf with xdev as part of _xb-bootstrap-tools
Enji Cooper [Mon, 8 Dec 2014 09:09:50 +0000 (09:09 +0000)]
Build gperf with xdev as part of _xb-bootstrap-tools

This will unbreak the build when "env MK_CXX=no make delete-old" has been run
on the build host post-r272849

Tested with the following commands:

/bin/sh
export __MAKE_CONF=/dev/null SRCCONF=/dev/null
export MK_CLANG=no MK_CLANG_BOOTSTRAP=no MK_GCC=yes MK_GCC_BOOTSTRAP=yes
export MK_GNUCXX=yes TARGET=armv6 TARGET_ARCH=arm make xdev
make toolchain
make xdev-build
sudo -E make xdev-install
/usr/armv6-freebsd/usr/bin/cc -dumpmachine | grep arm

X-MFC with: r272849
Reported by: Dan Raymond <draymond@foxvalley.net>, gjb

9 years agoBuild gperf with xdev as part of _xb-bootstrap-tools to unbreak the build
Enji Cooper [Mon, 8 Dec 2014 07:33:11 +0000 (07:33 +0000)]
Build gperf with xdev as part of _xb-bootstrap-tools to unbreak the build
if/when MK_CXX == no and make delete-old has been run on the build host,
post-r272849

Tested with the following command:

% sudo env MK_CLANG=no MK_CLANG_BOOTSTRAP=no MK_GCC=yes MK_GCC_BOOTSTRAP=yes \
           MK_GNUCXX=yes make xdev

9 years agoUse CURVNET macros inside inet_get_local_port_range() function.
Craig Rodrigues [Mon, 8 Dec 2014 07:25:59 +0000 (07:25 +0000)]
Use CURVNET macros inside inet_get_local_port_range() function.
Without this fix, a kernel with VIMAGE + Infiniband will panic on bootup.

Certain necessary #include statements require LIST_HEAD.
Add these includes to ofed/include/linux/list.h, because
LIST_HEAD is specifically overridden in this file.

PR: 191468
Differential Revision: D1279
Reviewed by: hselasky

9 years agoSort the MK_CLANG* options (should have done this in the previous commit)
Enji Cooper [Mon, 8 Dec 2014 07:14:25 +0000 (07:14 +0000)]
Sort the MK_CLANG* options (should have done this in the previous commit)

9 years agoMK_CLANG == no should really imply MK_CLANG_IS_CC == no
Enji Cooper [Mon, 8 Dec 2014 07:13:41 +0000 (07:13 +0000)]
MK_CLANG == no should really imply MK_CLANG_IS_CC == no

9 years agoPush the build-tools logic down into Makefile.inc1 so it's localized all in
Enji Cooper [Mon, 8 Dec 2014 06:33:49 +0000 (06:33 +0000)]
Push the build-tools logic down into Makefile.inc1 so it's localized all in
one spot, and the potential for installing to the wrong DESTDIR is lower

9 years agoUse calloc() instead of malloc() + bzero(). This also gets rid of a warning
Xin LI [Mon, 8 Dec 2014 06:10:47 +0000 (06:10 +0000)]
Use calloc() instead of malloc() + bzero().  This also gets rid of a warning
because bzero is defined by strings.h which is not included in thread_pool.c.

MFC after: 2 weeks

9 years agoMFV r275540:
Xin LI [Mon, 8 Dec 2014 06:04:42 +0000 (06:04 +0000)]
MFV r275540:

When importing a pool, don't assume that the passed pool configuration
at vdev_load is always vaild.  It's possible that a stale configuration
that comes with extra vdevs, where metaslab_init() would fail because
of lower layer returns error.

Change the code to make metaslab_init() handle and return errors from
lower layer and pass it back to upper layer and handle it there.

Illumos issue:
    5213 panic in metaslab_init due to space_map_open returning ENXIO

MFC after: 2 weeks

9 years agoAdd refcounting to IPv6 DAD objects and simplify the DAD code to fix a
Mark Johnston [Mon, 8 Dec 2014 04:44:40 +0000 (04:44 +0000)]
Add refcounting to IPv6 DAD objects and simplify the DAD code to fix a
number of races which could cause double frees or use-after-frees when
performing DAD on an address. In particular, an IPv6 address can now only be
marked as a duplicate from the DAD callout.

Differential Revision: https://reviews.freebsd.org/D1258
Reviewed by: ae, hrs
Reported by: rstone
MFC after: 1 month

9 years agoMFV r272851:
Mark Johnston [Mon, 8 Dec 2014 04:35:34 +0000 (04:35 +0000)]
MFV r272851:

5202 want ctf(4)

illumos/illumos-gate@fe2e029eea29fd49d0d9058dbd5b79a252667e6b

9 years agoDocument support for Netgear WG111v1 (rev2)
Mark Peek [Mon, 8 Dec 2014 04:06:03 +0000 (04:06 +0000)]
Document support for Netgear WG111v1 (rev2)

9 years agoMFhead @ r275589
Enji Cooper [Mon, 8 Dec 2014 03:36:43 +0000 (03:36 +0000)]
MFhead @ r275589

9 years agoThe previous commit should have been a logical or not a logical "and"
Enji Cooper [Mon, 8 Dec 2014 03:32:26 +0000 (03:32 +0000)]
The previous commit should have been a logical or not a logical "and"

Pointyhat to: me

9 years ago${CC} --version doesn't need to be queried if both COMPILER_TYPE and
Enji Cooper [Mon, 8 Dec 2014 03:30:42 +0000 (03:30 +0000)]
${CC} --version doesn't need to be queried if both COMPILER_TYPE and
COMPILER_VERSION are known

9 years agoFix mrc and mrc2 with APSR_nzcv. Binutils encodes it internally as 0 where
Andrew Turner [Sun, 7 Dec 2014 21:47:19 +0000 (21:47 +0000)]
Fix mrc and mrc2 with APSR_nzcv. Binutils encodes it internally as 0 where
we need it to be set to 15 for it to be equivalent to r15.

MFC after: 1 week
X-MFC with: r275415
Sponsored by: ABT Systems Ltd

9 years agoFix buffer overflow in Marvell PCI/PCIe driver
Zbigniew Bodek [Sun, 7 Dec 2014 21:02:45 +0000 (21:02 +0000)]
Fix buffer overflow in Marvell PCI/PCIe driver

Buffer overflow occured when more than one MSI was allocated.

Submitted by:    Wojciech Macek <wma@semihalf.com>
Obtained from:   Semihalf

9 years agoSmall space changes
Pedro F. Giffuni [Sun, 7 Dec 2014 20:32:24 +0000 (20:32 +0000)]
Small space changes

Mostly to keep in sync with OpenBSD and update the TAG.

Obtained from: OpenBSD
MFC after: 5 days

9 years agoPrefer setvbuf() to setlinebuf().
Pedro F. Giffuni [Sun, 7 Dec 2014 20:15:07 +0000 (20:15 +0000)]
Prefer setvbuf() to setlinebuf().

On FreeBSD's libc setlinebuf is a wrapper to setvbuf anyways.

Obtained from: OpenBSD
MFC after: 5 days

9 years agoMFV r275537:
Xin LI [Sun, 7 Dec 2014 18:15:27 +0000 (18:15 +0000)]
MFV r275537:

Illumos issue:
   5316 allow smbadm join to use RPC

(Due to our lack of smbsrv this is mostly no-op on
FreeBSD)

MFC after: 2 weeks

9 years agoremove opensolaris cyclic code, replace with high-precision callouts
Andriy Gapon [Sun, 7 Dec 2014 11:21:41 +0000 (11:21 +0000)]
remove opensolaris cyclic code, replace with high-precision callouts

In the old days callout(9) had 1 tick precision and that was inadequate
for some uses, e.g. DTrace profile module, so we had to emulate cyclic
API and behavior.  Now we can directly use callout(9) in the very few
places where cyclic was used.

Differential Revision: https://reviews.freebsd.org/D1161
Reviewed by: gnn, jhb, markj
MFC after: 2 weeks

9 years agokey_getspacq() returns holding the spacq_lock. Unlock it in all cases.
Andrey V. Elsukov [Sun, 7 Dec 2014 06:47:00 +0000 (06:47 +0000)]
key_getspacq() returns holding the spacq_lock. Unlock it in all cases.

MFC after: 1 week
Sponsored by: Yandex LLC

9 years agoInclude the received chunk padding when reporting an unknown chunk.
Michael Tuexen [Sat, 6 Dec 2014 22:57:19 +0000 (22:57 +0000)]
Include the received chunk padding when reporting an unknown chunk.
MFC after: 1 week

9 years agoFix rendering
Baptiste Daroussin [Sat, 6 Dec 2014 22:28:51 +0000 (22:28 +0000)]
Fix rendering

9 years agoAdd myself as a ports committer, mentored by bapt/bdrewery.
Sean Bruno [Sat, 6 Dec 2014 22:03:12 +0000 (22:03 +0000)]
Add myself as a ports committer, mentored by bapt/bdrewery.

9 years agoUpdate to reflect the current members of portmgr
Baptiste Daroussin [Sat, 6 Dec 2014 21:55:18 +0000 (21:55 +0000)]
Update to reflect the current members of portmgr

9 years agoadd some missing mentor->mentee relationship
Baptiste Daroussin [Sat, 6 Dec 2014 21:50:35 +0000 (21:50 +0000)]
add some missing mentor->mentee relationship

9 years agoAdd mentor information for kami a.k.a. me.
Dominic Fandrey [Sat, 6 Dec 2014 21:34:37 +0000 (21:34 +0000)]
Add mentor information for kami a.k.a. me.

My mentors are cs and koobs.

Differential Revision: https://reviews.freebsd.org/D975
Reviewed by: cs
Approved by: cs

9 years agoCount consecutive read requests as blocking in CTL for files and ZVOLs.
Alexander Motin [Sat, 6 Dec 2014 20:39:25 +0000 (20:39 +0000)]
Count consecutive read requests as blocking in CTL for files and ZVOLs.

Technically read requests can be executed in any order or simultaneously
since they are not changing any data.  But ZFS prefetcher goes crasy when
it receives consecutive requests from different threads.  Since prefetcher
works on level of separate blocks, instead of two consecutive 128K requests
it may receive 32 8K requests in mixed order.

This patch is more workaround then a real fix, and it does not fix all of
prefetcher problems, but it improves sequential read speed by 3-4x times
in some configurations.  On the other side it may hurt performance if
some backing store has no prefetch, that is why it is disabled by default
for raw devices.

MFC after: 2 weeks

9 years agoFix the support of mapped IPv4 addresses.
Michael Tuexen [Sat, 6 Dec 2014 20:00:08 +0000 (20:00 +0000)]
Fix the support of mapped IPv4 addresses.
Thanks to Mark Bonnekessel and Markus Boese for making me aware of the
problems.
MFC after: 1 week

9 years agoApply the same fix in r274697 to the ARM case.
Andrew Turner [Sat, 6 Dec 2014 12:03:09 +0000 (12:03 +0000)]
Apply the same fix in r274697 to the ARM case.

9 years agoUse the unified syntax when generating assembly for clang. The clang 3.5
Andrew Turner [Sat, 6 Dec 2014 11:59:35 +0000 (11:59 +0000)]
Use the unified syntax when generating assembly for clang. The clang 3.5
integrated assembler only accepts it.

MFC after: 1 week
Sponsored by: ABT Systems Ltd

9 years agoMFV r275536:
Xin LI [Sat, 6 Dec 2014 10:05:07 +0000 (10:05 +0000)]
MFV r275536:

Illumos issue:
    3363 Mark non-returning functions in ctftools

MFC after: 2 weeks

9 years agoMFV r275535:
Xin LI [Sat, 6 Dec 2014 09:38:28 +0000 (09:38 +0000)]
MFV r275535:

Unexpand ISP2() and MSEC2NSEC().

Illumos issue:
    5255 uts shouldn't open-code ISP2

MFC after: 2 weeks

9 years agoMFV r275534:
Xin LI [Sat, 6 Dec 2014 09:14:46 +0000 (09:14 +0000)]
MFV r275534:

Sync with Illumos.  This have no effect to FreeBSD.

Illumos issue:
    5285 pass in cpu_pause_func via pause_cpus

MFC after: 2 weeks

9 years agoMFC r275533:
Xin LI [Sat, 6 Dec 2014 09:11:13 +0000 (09:11 +0000)]
MFC r275533:

Sync with Illumos.  This have no effect to FreeBSD.

Illumos issue:
    5100 sparc build failed after 5004

MFC after: 2 weeks

9 years ago${CC} --version doesn't need to be queried if both COMPILER_TYPE and
Enji Cooper [Sat, 6 Dec 2014 04:02:56 +0000 (04:02 +0000)]
${CC} --version doesn't need to be queried if both COMPILER_TYPE and
COMPILER_VERSION are known

9 years agoFix typos in comments and wrap to <80 columns
Enji Cooper [Sat, 6 Dec 2014 03:15:46 +0000 (03:15 +0000)]
Fix typos in comments and wrap to <80 columns

MFC after: 3 days

9 years agoFix typos in comments and wrap to <80 columns
Enji Cooper [Sat, 6 Dec 2014 03:12:57 +0000 (03:12 +0000)]
Fix typos in comments and wrap to <80 columns

MFC after: 3 days

9 years agoMFp4: @181627
Craig Rodrigues [Sat, 6 Dec 2014 02:59:59 +0000 (02:59 +0000)]
MFp4: @181627

Allow UMA allocated memory to be freed when VNET jails are torn down.

Differential Revision: D1201
Submitted by: bz
Reviewed by: rwatson, gnn

9 years agocxgbe(4): allow the driver to use rx buffers that do not end on a pack
Navdeep Parhar [Sat, 6 Dec 2014 01:47:38 +0000 (01:47 +0000)]
cxgbe(4): allow the driver to use rx buffers that do not end on a pack
boundary.

MFC after: 2 weeks

9 years agoMerge fixes from OpenBSD.
Pedro F. Giffuni [Sat, 6 Dec 2014 01:21:12 +0000 (01:21 +0000)]
Merge fixes from OpenBSD.

Check fstat return value.  Also, use off_t for file size and offsets.
Avoid iterating over end of string.

Obtained from: OpenBSD (CVS rev. 1.41, 1.43)
MFC after: 1 week

9 years agoMFV r260710 + 275532:
Xin LI [Sat, 6 Dec 2014 01:01:51 +0000 (01:01 +0000)]
MFV r260710 + 275532:

Add a new method, nvlist_print_json to allow libnvpair to emit JSON.

MFC after: 1 month

9 years ago5314 Remove "dbuf phys" db->db_data pointer aliases in ZFS
Xin LI [Sat, 6 Dec 2014 00:50:57 +0000 (00:50 +0000)]
5314 Remove "dbuf phys" db->db_data pointer aliases in ZFS
Reviewed by: Andriy Gapon <avg@freebsd.org>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Will Andrews <willa@spectralogic.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Justin T. Gibbs <justing@spectralogic.com>

illumos/illumos-gate@c1379625401dfbe1c39b79136dd384a571d47fde

9 years ago5347 idle pool may run itself out of space
Xin LI [Sat, 6 Dec 2014 00:47:31 +0000 (00:47 +0000)]
5347 idle pool may run itself out of space
Reviewed by: Alex Reece <alex.reece@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Steven Hartland <killing@multiplay.co.uk>
Reviewed by: Richard Elling <richard.elling@richardelling.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@231aab857f14a3e7a0ed5f2879399c3cd6ae92ea

9 years ago5368 ARC should cache more metadata
Xin LI [Sat, 6 Dec 2014 00:45:27 +0000 (00:45 +0000)]
5368 ARC should cache more metadata
Reviewed by: Alex Reece <alex.reece@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Richard Elling <richard.elling@richardelling.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@3a5286a1cffceafcd8cf79c4156fad605129bf50

9 years ago5349 verify that block pointer is plausible before reading
Xin LI [Sat, 6 Dec 2014 00:42:30 +0000 (00:42 +0000)]
5349 verify that block pointer is plausible before reading
Reviewed by: Alex Reece <alex.reece@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Reviewed by: Xin Li <delphij@FreeBSD.org>
Reviewed by: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
Approved by: Gordon Ross <gwr@nexenta.com>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@f63ab3d5a84a12b474655fc7e700db3efba6c4c9

9 years ago4181 zfs(1m): 'zfs allow' examples in the man page are outdated
Xin LI [Sat, 6 Dec 2014 00:38:55 +0000 (00:38 +0000)]
4181 zfs(1m): 'zfs allow' examples in the man page are outdated
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Marcel Telka <marcel.telka@nexenta.com>

illumos/illumos-gate@5619b3f84733e187bc34bca49abbec8bdfcd7d99

9 years ago5351 scrub goes for an extra second each txg
Xin LI [Sat, 6 Dec 2014 00:37:00 +0000 (00:37 +0000)]
5351 scrub goes for an extra second each txg
5352 scrub should pause when there is some dirty data
Reviewed by: Alex Reece <alex.reece@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Richard Elling <richard.elling@richardelling.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@6f6a76adacda33b10633476dc6c5d66d7f17dd94

9 years ago5348 zio_checksum_error() only fills in info if ECKSUM
Xin LI [Sat, 6 Dec 2014 00:34:25 +0000 (00:34 +0000)]
5348 zio_checksum_error() only fills in info if ECKSUM
Reviewed by: Alex Reece <alex.reece@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Steven Hartland <killing@multiplay.co.uk>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@373dc1cf9a4e0791397a9b268cdac1f664af58a8

9 years ago5350 clean up code in dnode_sync()
Xin LI [Sat, 6 Dec 2014 00:33:09 +0000 (00:33 +0000)]
5350 clean up code in dnode_sync()
Reviewed by: Alex Reece <alex.reece@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Richard Elling <richard.elling@richardelling.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@e6518318428d2be1962bf2d47fd83ebfe8cb2736

9 years ago5310 Remove always true tests for non-NULL ds->ds_phys
Xin LI [Sat, 6 Dec 2014 00:31:58 +0000 (00:31 +0000)]
5310 Remove always true tests for non-NULL ds->ds_phys
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Will Andrews <willa@spectralogic.com>
Reviewed by: Andriy Gapon <avg@FreeBSD.org>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Justin T. Gibbs <justing@spectralogic.com>

illumos/illumos-gate@d808a4fc6ac40e878a28e96f1ad7dd2ec439bfbf

9 years ago5311 traverse_dnode may report success when it should not
Xin LI [Sat, 6 Dec 2014 00:18:53 +0000 (00:18 +0000)]
5311 traverse_dnode may report success when it should not
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Andriy Gapon <avg@FreeBSD.org>
Reviewed by: Will Andrews <willa@spectralogic.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Justin T. Gibbs <justing@spectralogic.com>

illumos/illumos-gate@2a89c2c59b7c2beb2373c14368cbe7e32af6ffc1

9 years ago5312 libzfs should be decoupled from kernel's zfs_context.h
Xin LI [Sat, 6 Dec 2014 00:17:25 +0000 (00:17 +0000)]
5312 libzfs should be decoupled from kernel's zfs_context.h
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Will Andrews <willa@spectralogic.com>
Reviewed by: Andriy Gapon <avg@FreeBSD.org>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Justin T. Gibbs <justing@spectralogic.com>

illumos/illumos-gate@587644a8567e6a9533f88401daa59cbd78c4632f

9 years ago5213 panic in metaslab_init due to space_map_open returning ENXIO
Xin LI [Sat, 6 Dec 2014 00:14:38 +0000 (00:14 +0000)]
5213 panic in metaslab_init due to space_map_open returning ENXIO
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Bayard Bell <Bayard.Bell@nexenta.com>
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Steven Hartland <steven.hartland@multiplay.co.uk>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Prakash Surya <prakash.surya@delphix.com>

illumos/illumos-gate@1e9bd7ec42f2d3bf854c2da35310901194833267

9 years agocxgbe(4): Allow for different pad and pack boundaries for different
Navdeep Parhar [Sat, 6 Dec 2014 00:13:56 +0000 (00:13 +0000)]
cxgbe(4): Allow for different pad and pack boundaries for different
adapters.  Set the pack boundary for T5 cards to be the same as the
PCIe max payload size.  The chip likes it this way.

In this revision the driver allocate rx buffers that align on both
boundaries.  This is not a strict requirement and a followup commit
will switch the driver to a more relaxed allocation strategy.

MFC after: 2 weeks

9 years ago5179 Remove unused ZFS ARC functions
Xin LI [Sat, 6 Dec 2014 00:12:58 +0000 (00:12 +0000)]
5179 Remove unused ZFS ARC functions
Reviewed by: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
Reviewed by: Steve Gonczi <gonczi@comcast.net>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Richard Elling <richard.elling@gmail.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Serapheim Dimitropoulos <serapheimd@gmail.com>

illumos/illumos-gate@fbefb14f62976763eeaa74a0c1ac68accb38cf44

9 years ago5316 allow smbadm join to use RPC
Xin LI [Sat, 6 Dec 2014 00:10:47 +0000 (00:10 +0000)]
5316 allow smbadm join to use RPC
Reviewed by: Bayard Bell <bayard.bell@nexenta.com>
Reviewed by: Dan McDonald <danmcd@nexenta.com>
Reviewed by: Thomas Keiser <thomas.keiser@nexenta.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Gordon Ross <gwr@nexenta.com>

illumos/illumos-gate@1ed6b69a5ca1ca3ee5e9a4931f74e2237c7e1c9f

9 years ago3363 Mark non-returning functions in ctftools
Xin LI [Sat, 6 Dec 2014 00:01:19 +0000 (00:01 +0000)]
3363 Mark non-returning functions in ctftools
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Reviewed by: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
Approved by: Albert Lee <trisk@omniti.com>
Author: Erik Cederstrand <erik@cederstrand.dk>

illumos/illumos-gate@a6bde1a23b60f140c7ed78df979c2e22b1ed9b2c

9 years ago5255 uts shouldn't open-code ISP2
Xin LI [Fri, 5 Dec 2014 23:55:44 +0000 (23:55 +0000)]
5255 uts shouldn't open-code ISP2
Reviewed by: Marcel Telka <marcel@telka.sk>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>

illumos/illumos-gate@de710d24d2fae4468e64da999e1d952a247f142c

9 years ago5285 pass in cpu_pause_func via pause_cpus
Xin LI [Fri, 5 Dec 2014 23:51:20 +0000 (23:51 +0000)]
5285 pass in cpu_pause_func via pause_cpus
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Approved by: Gordon Ross <gwr@nexenta.com>
Author: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>

illumos/illumos-gate@0ed5c46e82c989cfa9726d9dae452e3d24ef83be

9 years ago5100 sparc build failed after 5004
Xin LI [Fri, 5 Dec 2014 23:50:16 +0000 (23:50 +0000)]
5100 sparc build failed after 5004
Reviewed by: Garrett D'Amore <garrett@damore.org>
Reviewed by: Gary Mills <gary_mills@fastmail.fm>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Igor Kozhukhov <ikozhukhov@gmail.com>

illumos/illuoms-gate@6481fd49a4385db15285ddf89f9c80b45eaaa407

9 years ago5005 libnvpair JSON output broken by lint fixes
Xin LI [Fri, 5 Dec 2014 23:43:15 +0000 (23:43 +0000)]
5005 libnvpair JSON output broken by lint fixes
5006 libnvpair JSON cannot print int16 arrays
Reviewed by: Robert Mustacchi <rm@joyent.com>
Approved by: Gordon Ross <gwr@nexenta.com>
Author: Joshua M. Clulow <josh@sysmgr.org>

illumos/illumos-gate@37c79205ad46187f54b2edbf6a468160935f14d9

9 years agoUpdate OpenBSD CVS revision for our r255232.
Pedro F. Giffuni [Fri, 5 Dec 2014 23:08:39 +0000 (23:08 +0000)]
Update OpenBSD CVS revision for our r255232.

This is a no-op to make it easier to track changes from OpenBSD

MFC after: 3 days

9 years agoUse %d instead of %u for error number. This way we see ERESTART as -1
Xin LI [Fri, 5 Dec 2014 22:56:10 +0000 (22:56 +0000)]
Use %d instead of %u for error number.  This way we see ERESTART as -1
not 4294967295 when doing DTrace.

MFC after: 2 weeks

9 years agoSwitch to a .cpu directive. These will work when clang 3.5 is imported
Andrew Turner [Fri, 5 Dec 2014 19:23:51 +0000 (19:23 +0000)]
Switch to a .cpu directive. These will work when clang 3.5 is imported
where the .arch directive is a nop.

MFC after: 1 week
Sponsored by: ABT Systems Ltd