]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoRemove PACKET_TAG_IPSEC_IN_DONE mbuf tag lookup and usage of its
ae [Thu, 11 Dec 2014 14:58:55 +0000 (14:58 +0000)]
Remove PACKET_TAG_IPSEC_IN_DONE mbuf tag lookup and usage of its
security policy. The changed block of code in ip*_ipsec_input() is
called when packet has ESP/AH header. Presence of
PACKET_TAG_IPSEC_IN_DONE mbuf tag in the same time means that
packet was already handled by IPSEC and reinjected in the netisr,
and it has another ESP/AH headers (encrypted twice?).
Since it was already processed by IPSEC code, the AH/ESP headers
was already stripped (and probably outer IP header was stripped too)
and security policy from the tdb_ident was applied to those headers.
It is incorrect to apply this security policy to current headers.

Also make ip_ipsec_input() prototype similar to ip6_ipsec_input().

Obtained from: Yandex LLC
Sponsored by: Yandex LLC

9 years agoRemove check for presence of PACKET_TAG_IPSEC_PENDING_TDB and
ae [Thu, 11 Dec 2014 14:43:44 +0000 (14:43 +0000)]
Remove check for presence of PACKET_TAG_IPSEC_PENDING_TDB and
PACKET_TAG_IPSEC_OUT_CRYPTO_NEEDED mbuf tags. They aren't used in FreeBSD.

Instead check presence of PACKET_TAG_IPSEC_OUT_DONE mbuf tag. If it
is found, bypass security policy lookup as described in the comment.

PACKET_TAG_IPSEC_OUT_DONE tag added to mbuf when IPSEC code finishes
ESP/AH processing. Since it was already finished, this means the security
policy placed in the tdb_ident was already checked. And there is no reason
to check it again here.

Obtained from: Yandex LLC
Sponsored by: Yandex LLC

9 years agoMake sure callbacks being freed are not pending when the
hselasky [Thu, 11 Dec 2014 10:47:50 +0000 (10:47 +0000)]
Make sure callbacks being freed are not pending when the
"mlx4_en_deactivate_cq()" function returns.

MFC after: 1 week
Sponsored by: Mellanox Technologies

9 years agoRevert r275695: nd6_dad_find() was already correct.
markj [Thu, 11 Dec 2014 09:16:45 +0000 (09:16 +0000)]
Revert r275695: nd6_dad_find() was already correct.

Reported by: ae, kib
Pointy hat to: markj

9 years agoMFV r275696: file 5.21.
delphij [Thu, 11 Dec 2014 06:52:10 +0000 (06:52 +0000)]
MFV r275696: file 5.21.

MFC after:  2 weeks

9 years agoVendor import of file 5.21.
delphij [Thu, 11 Dec 2014 06:00:53 +0000 (06:00 +0000)]
Vendor import of file 5.21.

9 years agoFix a bug in r266857: nd6_dad_find() must return NULL if it doesn't find
markj [Thu, 11 Dec 2014 00:41:54 +0000 (00:41 +0000)]
Fix a bug in r266857: nd6_dad_find() must return NULL if it doesn't find
a matching element in the DAD queue.

Reported by: Holger Hans Peter Freyther <holger@freyther.de>
MFC after: 3 days

9 years agoFix building termcap.db when make obj is run beforehand from a clean tree by
ngie [Wed, 10 Dec 2014 23:18:11 +0000 (23:18 +0000)]
Fix building termcap.db when make obj is run beforehand from a clean tree by
using make variables for the filenames, which helps resolve pathing
appropriately when running cap_mkdb

X-MFC with: r275687
Pointyhat to: me

9 years agoRemove termcap entry reordering; install the file verbatim instead
ngie [Wed, 10 Dec 2014 20:40:03 +0000 (20:40 +0000)]
Remove termcap entry reordering; install the file verbatim instead

termcap entry reordering requires ex (which is available via usr.bin/vi), which
breaks on build hosts where installworld is run with MK_VI == no (or when
make delete-old is run on ^/projects/building-blocks as vi, et al, are
removed on the branch when the knob is tweaked to => "no")

Reordering termcap was believed to improve performance, but the file is now
accessed via /etc/termcap.db, so /etc/termcap (and /usr/share/misc/termcap by
proxy) access is less preferred.

Reordering the file broke the historical comment <-> entry mapping as well,
which could muddle the purpose of entries in the file, so it could be
potentially harmful to readers in its reordered state.

Discussion took place on hackers@ here:
https://lists.freebsd.org/pipermail/freebsd-hackers/2014-December/046657.html

Discussed with: -hackers, mp
MFC after: 1 month
Sponsored by: EMC / Isilon Storage Division

9 years agoFix kernel build for booke.
andreast [Wed, 10 Dec 2014 20:23:19 +0000 (20:23 +0000)]
Fix kernel build for booke.

9 years agoFix build for powerpc(32|64) kernels.
andreast [Wed, 10 Dec 2014 18:13:14 +0000 (18:13 +0000)]
Fix build for powerpc(32|64) kernels.

9 years agoFix a typo reported by Lennart Grahl.
tuexen [Wed, 10 Dec 2014 14:50:57 +0000 (14:50 +0000)]
Fix a typo reported by Lennart Grahl.

MFC after: 3 days

9 years agoAdd "-media" autofs map, to access data on removable media, such as CD
trasz [Wed, 10 Dec 2014 14:36:44 +0000 (14:36 +0000)]
Add "-media" autofs map, to access data on removable media, such as CD
drives or flash keys.  It can be enabled by uncommenting a single entry
in default /etc/auto_master.  It can also be easily modified to use
fuse-based filesystems instead of in-kernel ones.

There is still one deficiency - the mountpoints are permanent, they
don't disappear when user removes the media.  Fixing it needs some
autofs changes.

Differential Revision: https://reviews.freebsd.org/D1210
MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoAdd fstyp(8). This utility, named after its SVR4 counterpart, detects
trasz [Wed, 10 Dec 2014 14:14:16 +0000 (14:14 +0000)]
Add fstyp(8).  This utility, named after its SVR4 counterpart, detects
filesystems.  It differs from file(1) in that it gives machine-parseable
output, it outputs filesystem labels, doesn't get confused by other
formats metadata, and runs in Capsicum sandbox.

Differential Revision: https://reviews.freebsd.org/D1255
Relnotes: yes
Sponsored by: The FreeBSD Foundation

9 years agoxen/intr: balance dynamic interrupts across available vCPUs
royger [Wed, 10 Dec 2014 13:25:21 +0000 (13:25 +0000)]
xen/intr: balance dynamic interrupts across available vCPUs

By default Xen binds all event channels to vCPU#0, and FreeBSD only shuffles
the interrupt sources once, at the end of the boot process. Since new event
channels might be created after this point (because new devices or backends
are added), try to automatically shuffle them at creation time.

This does not affect VIRQ or IPI event channels, that are already bound to a
specific vCPU as requested by the caller.

Sponsored by: Citrix Systems R&D

9 years agoxen: mask event channels while binding them to a vCPU
royger [Wed, 10 Dec 2014 11:42:02 +0000 (11:42 +0000)]
xen: mask event channels while binding them to a vCPU

Mask the event channel source before trying to bind it to a CPU, this
prevents stray interrupts from firing while assigning them and hitting the
KASSERT in xen_intr_handle_upcall.

Sponsored by: Citrix Systems R&D

9 years agoxen: convert the Grant-table code to a NewBus device
royger [Wed, 10 Dec 2014 11:35:41 +0000 (11:35 +0000)]
xen: convert the Grant-table code to a NewBus device

This allows the Grant-table code to attach directly to the xenpv bus,
allowing us to remove the grant-table initialization done in xenpv.

Sponsored by: Citrix Systems R&D

9 years agoo Put () for p to avoid unexpected macro expansion
br [Wed, 10 Dec 2014 11:35:10 +0000 (11:35 +0000)]
o Put () for p to avoid unexpected macro expansion
o style(9) fix

Submitted by: Yonghyeon PYUN <pyunyh@gmail.com>

9 years agoxen: move grant table code
royger [Wed, 10 Dec 2014 11:21:52 +0000 (11:21 +0000)]
xen: move grant table code

Mave the grant table code into the dev/xen folder in preparation for turning
it into a device using the newbus interface. This is just code motion, no
functional changes.

Sponsored by: Citrix Systems R&D

9 years agoFix multiple vulnerabilities in file(1) and libmagic(3).
delphij [Wed, 10 Dec 2014 08:19:55 +0000 (08:19 +0000)]
Fix multiple vulnerabilities in file(1) and libmagic(3).

Security: FreeBSD-SA-14:28.file
Security: CVE-2014-3710, CVE-2014-8116, CVE-2014-8117

9 years agoIn r268924 __fflush was modified so that when write(2) was not successful,
delphij [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 [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
des [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
brd [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]
brd [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
brd [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.
brd [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.
dim [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.
sjg [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
royger [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)
br [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.
mp [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.
pfg [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
dchagin [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
royger [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 [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 [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.
kib [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.
kib [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.
hselasky [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):
dim [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.
hselasky [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
ngie [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
sbruno [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
kib [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,
kib [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.
kib [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
kib [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
kib [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
kib [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
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
gjb [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
pfg [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.
hselasky [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
hselasky [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
ngie [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 agoUse CURVNET macros inside inet_get_local_port_range() function.
rodrigc [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 agoUse calloc() instead of malloc() + bzero(). This also gets rid of a warning
delphij [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:
delphij [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
markj [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:
markj [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)
mp [Mon, 8 Dec 2014 04:06:03 +0000 (04:06 +0000)]
Document support for Netgear WG111v1 (rev2)

9 years agoThe previous commit should have been a logical or not a logical "and"
ngie [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
ngie [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 [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
zbb [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
pfg [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().
pfg [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:
delphij [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
avg [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.
ae [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.
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
bapt [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.
sbruno [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
bapt [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
bapt [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.
kami [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.
mav [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.
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 [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 [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:
delphij [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:
delphij [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:
delphij [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:
delphij [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 agoFix typos in comments and wrap to <80 columns
ngie [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 agoMFp4: @181627
rodrigc [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
np [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.
pfg [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:
delphij [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
delphij [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 ago4181 zfs(1m): 'zfs allow' examples in the man page are outdated
delphij [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 ago5312 libzfs should be decoupled from kernel's zfs_context.h
delphij [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 agocxgbe(4): Allow for different pad and pack boundaries for different
np [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 ago5316 allow smbadm join to use RPC
delphij [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
delphij [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 ago5005 libnvpair JSON output broken by lint fixes
delphij [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.
pfg [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
delphij [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 [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