]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agoDon't enqueue NULL on a drbr
rstone [Mon, 8 Aug 2016 16:19:24 +0000 (16:19 +0000)]
Don't enqueue NULL on a drbr

In one corner case in the bxe TX path, a NULL mbuf could be enqueued onto
a drbr queue.  This could case a KASSERT to fire with INVARIANTS enabled,
or the processing of packets from the queue to be prematurely ended later
on.

Submitted by: Matt Joras (matt.joras AT isilon.com)
Reviewed by: davidcs
MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D7041

7 years agoFix the sending of FORWARD-TSN and I-FORWARD-TSN chunks. The
tuexen [Mon, 8 Aug 2016 13:52:18 +0000 (13:52 +0000)]
Fix the sending of FORWARD-TSN and I-FORWARD-TSN chunks. The
last SID/SSN pair wasn't filled in.
Thanks to Julian Cordes for providing a packetdrill script
triggering the issue and making me aware of the bug.

MFC after: 3 days

7 years agoImport vDSO-related source files from the CloudABI repository.
ed [Mon, 8 Aug 2016 13:15:37 +0000 (13:15 +0000)]
Import vDSO-related source files from the CloudABI repository.

CloudABI executables that are emulated on Mac OS X do not invoke system
calls through "syscall". Instead, they make use of a vDSO that is
provided by the emulator that provides symbols for all of the system
call routines. The emulator can implement these any way it likes.

At some point in time we want to do this for native execution as well,
so that CloudABI executables are entirely oblivious of how system calls
need to be performed. They will simply call into functions and let that
deal with all of the details.

These source files can be used to generate a simple vDSO that does
nothing more than invoke "syscall". All we need to do now is map it into
the processes.

Obtained from: https://github.com/NuxiNL/cloudabi

7 years agoTry to check whether each key file exists before adding it, and bail out
des [Mon, 8 Aug 2016 10:46:18 +0000 (10:46 +0000)]
Try to check whether each key file exists before adding it, and bail out
if we didn't find any of them.  This reduces log spam about key files for
deprecated algorithms, which we look for but don't generate.

PR: 208254
MFC after: 3 days

7 years agoFix a locking issue found by stress testing with tsctp.
tuexen [Mon, 8 Aug 2016 08:20:10 +0000 (08:20 +0000)]
Fix a locking issue found by stress testing with tsctp.
The inp read lock neeeds to be held when considering control->do_not_ref_stcb.
MFC after: 3 days

7 years agoRemove vestigal references to __alpha__
ngie [Mon, 8 Aug 2016 07:19:30 +0000 (07:19 +0000)]
Remove vestigal references to __alpha__

Replace alpha reference in getconf(1) with amd64 [*]

MFC after: 1 week
PR:   211300 [*]
Submitted by: Sevan Janiyan <venture37@geeklan.co.uk> [*]
Sponsored by: EMC / Isilon Storage Division

7 years agohyperv/ic: Pass the channel callback to hv_util_attach()
sephe [Mon, 8 Aug 2016 06:18:54 +0000 (06:18 +0000)]
hyperv/ic: Pass the channel callback to hv_util_attach()

The saved channel callback in util softc is actually never used.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7424

7 years agohyperv/ic: Expose the receive buffer length for callers to use.
sephe [Mon, 8 Aug 2016 06:11:28 +0000 (06:11 +0000)]
hyperv/ic: Expose the receive buffer length for callers to use.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7423

7 years agohyperv/ic: Remove never used second parameter of hv_negotiate_version()
sephe [Mon, 8 Aug 2016 05:57:38 +0000 (05:57 +0000)]
hyperv/ic: Remove never used second parameter of hv_negotiate_version()

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7422

7 years agoetherswitch: Unbreak LINT build
sephe [Mon, 8 Aug 2016 05:57:04 +0000 (05:57 +0000)]
etherswitch: Unbreak LINT build

Sponsored by: Microsoft

7 years agoConsistently check for unsent data on the stream queues.
tuexen [Sun, 7 Aug 2016 23:04:46 +0000 (23:04 +0000)]
Consistently check for unsent data on the stream queues.

MFC after: 3 days

7 years agoSync in the latest CloudABI constants and data types.
ed [Sun, 7 Aug 2016 21:23:55 +0000 (21:23 +0000)]
Sync in the latest CloudABI constants and data types.

The only change is the addition of AT_SYSINFO_EHDR, which can be used
for providing a vDSO.

Obtained from: https://github.com/NuxiNL/cloudabi

7 years agoSet EN_MAS7_UPDATE HID0 bit for e500 core.
jhibbits [Sun, 7 Aug 2016 19:09:56 +0000 (19:09 +0000)]
Set EN_MAS7_UPDATE HID0 bit for e500 core.

Without enabling this bit, tlbre and tlbsx don't update the MAS7 register,
resulting in garbage in the register after a read (rather, the previous setting
of it for a tlbwe).  This can result in mmu_booke_mapdev_attr() thinking
mappings that should match actually don't, because tlb1_read_entry() can't
determine the correct address of a given entry.

MFC after: 11-RELEASE

7 years agoixl(4): Update to ixl-1.6.6-k.
sbruno [Sun, 7 Aug 2016 18:12:36 +0000 (18:12 +0000)]
ixl(4): Update to ixl-1.6.6-k.

Submitted by: erj
Reviewed by: jeffrey.e.pieper@intel.com
MFC after: 3 days
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D7391

7 years agopowerpc busdma: Use pmap_quick_enter_page()/pmap_quick_remove_page() to handle
jah [Sun, 7 Aug 2016 15:50:08 +0000 (15:50 +0000)]
powerpc busdma: Use pmap_quick_enter_page()/pmap_quick_remove_page() to handle
bouncing of unmapped buffers.  Also treat userspace buffers as unmapped, to
avoid borrowing the UVA for copies.  This allows sync'ing userspace buffers
outside the context of the owning process, and sync'ing bounced maps in
non-sleepable contexts.

This change is equivalent to r286787 for x86.

Reviewed by: jhibbits
Differential Revision: https://reviews.freebsd.org/D3989

7 years agoRemove stream queue entry consistently from wheel.
tuexen [Sun, 7 Aug 2016 12:51:13 +0000 (12:51 +0000)]
Remove stream queue entry consistently from wheel.
While there, improve the handling of drain.

MFC after: 3 days

7 years agoUse a more conventional spelling of "breakpoint".
brooks [Sun, 7 Aug 2016 09:02:54 +0000 (09:02 +0000)]
Use a more conventional spelling of "breakpoint".

7 years agoExtract out the various local definitions of ETHER_IS_BROADCAST() and
adrian [Sun, 7 Aug 2016 03:48:33 +0000 (03:48 +0000)]
Extract out the various local definitions of ETHER_IS_BROADCAST() and
turn them into a shared definition.

Set M_MCAST/M_BCAST appropriately upon packet reception in net80211, just
before they are delivered up to the ethernet stack.

Submitted by: rstone

7 years ago[arswitch] extend the debug support to be configurable at runtime.
adrian [Sun, 7 Aug 2016 01:32:37 +0000 (01:32 +0000)]
[arswitch] extend the debug support to be configurable at runtime.

* remove the DEBUG ifdef; defining it is too far reaching throughout
  the whole system;
* add a bitmask in the softc for controlling debugging;
* .. enable said debugging as a sysctl;
* add bitmaps for register access, reset and vlans.

TODO:

* Now that the debug statements are configurable, we definitely could
  do with more debugging
* Move the debugging into the top-level etherswitch driver and have
  sub-drivers obey.

7 years ago[mips] add support for using the MIPS user register for TLS data.
adrian [Sun, 7 Aug 2016 01:29:55 +0000 (01:29 +0000)]
[mips] add support for using the MIPS user register for TLS data.

This work, originally from Stacey Son, uses the MIPS UserReg for
reading the TLS data, and will fall back to the normal syscall path
when it isn't supported.

This code dynamically patches cpu_switch() to bypass the UserReg
instruction so to avoid generating a machine exception.

Thanks to sson for the original work, and to Dan Nelson for
bringing it to date and testing it on MIPS32 with me.

Tested:

* mips64 (sson)
* mips74k (dnelson_1901@yahoo.com) - AR9344 SoC, UserReg support
* mips24k (adrian) - AR9331 SoC, no UserReg support

Obtained from: sson, dnelson_1901@yahoo.com

7 years agoAdd Logitech Unifying receiver.
cy [Sat, 6 Aug 2016 20:27:12 +0000 (20:27 +0000)]
Add Logitech Unifying receiver.

MFC after: 1 week

7 years agoRe-correct the documentation for the 'type' parameter of the _SWAP
bjk [Sat, 6 Aug 2016 19:12:23 +0000 (19:12 +0000)]
Re-correct the documentation for the 'type' parameter of the _SWAP
macros from sys/queue.h -- only the singly-linked forms do not need
the 'field' argument.

Pointy Hat to: bjk
Reported by: akshay1994.leo_gmail.com

7 years agoFix building usr.bin/tar/tests with PIE symbol building enabled by
ngie [Sat, 6 Aug 2016 19:05:01 +0000 (19:05 +0000)]
Fix building usr.bin/tar/tests with PIE symbol building enabled by
removing CFLAGS+= -static

`CFLAGS+= -static` was a carryover from pre-r289195 with
usr.bin/tar/test/Makefile that should have been specified in LDFLAGS
There doesn't seem to be an apparent need for static compilation
of the test binaries.

Differential Revision: https://reviews.freebsd.org/D7430
MFC after: 1 week
Obtained-from: opBSD (418a491eed20d2603ddd1f1bd92c2c0d95094002)
Submitted by: op
Sponsored by: EMC / Isilon Storage Division

7 years agoAdd hw.fdt sysctl node.
stevek [Sat, 6 Aug 2016 18:48:47 +0000 (18:48 +0000)]
Add hw.fdt sysctl node.
Make FDT blob available via opaque hw.fdt.dtb sysctl, if a DTB has been
installed by the time sysctls are registered.

Reviewed by: andrew
Approved by: sjg (mentor)
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D7411

7 years agoUpdate with the members of the 9th core team.
bcr [Sat, 6 Aug 2016 17:53:53 +0000 (17:53 +0000)]
Update with the members of the 9th core team.

7 years agoCorrect the documentation of the 'type' parameter for the _SWAP
bjk [Sat, 6 Aug 2016 17:27:07 +0000 (17:27 +0000)]
Correct the documentation of the 'type' parameter for the _SWAP
macros from sys/queue.h

Submitted by: akshay1994.leo_gmail.com (for STAILQ)
Differential Revision: https://reviews.freebsd.org/D7428

7 years agoext2fs: Add defines for some missing ext4 feature flags.
pfg [Sat, 6 Aug 2016 17:24:35 +0000 (17:24 +0000)]
ext2fs: Add defines for some missing ext4 feature flags.

These are currently unused in our implementation and some even appear to
have not been implemented yet on linux but it is good to keep them for
reference.

Obtained from: NetBSD (CVS Rev. 1.41)
MFC after: 1 month

7 years agoext2fs: Add some more inode flags.
pfg [Sat, 6 Aug 2016 16:48:40 +0000 (16:48 +0000)]
ext2fs: Add some more inode flags.

These are currently unused in out implementation but it is good to keep
them for reference.

Obtained from: NetBSD (CVS Rev. 1.35)
MFC after: 1 month

7 years agoDon't modify a structure without holding a reference count on it.
tuexen [Sat, 6 Aug 2016 15:29:46 +0000 (15:29 +0000)]
Don't modify a structure without holding a reference count on it.

MFC after: 3 days

7 years agoCheck the first byte of the array for NUL, instead of the array as a NULL pointer
jhibbits [Sat, 6 Aug 2016 15:10:14 +0000 (15:10 +0000)]
Check the first byte of the array for NUL, instead of the array as a NULL pointer

The partition_name field is an array, so can never be NULL itself.  Check only
the first byte instead.

This was found when test building with clang, but I'm not sure how it passes
gcc's warnings either.

7 years agoTwo fixups for dtrace
jhibbits [Sat, 6 Aug 2016 15:06:19 +0000 (15:06 +0000)]
Two fixups for dtrace

* Use the right incantation to get the next stack pointer.  Since powerpc uses
  special frames for traps, dereferencing the stack pointer straight up won't
  get us the next stack pointer in every case.
* Clear EE using the correct instruction sequence.  The PowerISA states that
  'andi.' ANDs the register with 0||<imm>, instead of sign extending or filling
  out the unavailable bits with 1.  Even if it did sign extend, PSL_EE is
  0x8000, so ~PSL_EE is 0x7fff, and the upper bits would be cleared.  Use rlwinm
  in the 32-bit case, and a two-rotate sequence in the 64-bit case, the latter
  chosen to follow the output generated by gcc.

MFC after: 1 week

7 years agoAdd __cxa_thread_atexit(3) API implementation.
kib [Sat, 6 Aug 2016 13:32:40 +0000 (13:32 +0000)]
Add __cxa_thread_atexit(3) API implementation.

This is the backing feature to implement C++11 thread storage duration
specified by the thread_local keyword.  A destructor for given
thread-local object is registered to be executed at the thread
termination time using __cxa_thread_atexit().  Libc calls the
__cxa_thread_calls_dtors() during exit(3), before finalizers and
atexit functions, and libthr calls the function at the thread
termination time, after the stack unwinding and thread-specific key
destruction.

There are several uncertainties in the API which lacks a formal
specification.  Among them:
- is it allowed to register destructors during destructing;
we allow, but limiting the nesting level.  If too many iterations
detected, a diagnostic is issued to stderr and thread forcibly
terminates for now.
- how to handle destructors which belong to an unloading dso;
for now, we ignore destructor calls for such entries, and
issue a diagnostic.  Linux does prevent dso unload until all
threads with destructors from the dso terminated.
It is supposed that the diagnostics allow to detect real-world
applications relying on the above details and possibly adjust
our implementation.  Right now the choices were to provide the slim
API (but that rarely stands the practice test).

Tests are added to check generic functionality and to specify some of
the above implementation choices.

Submitted by: Mahdi Mokhtari <mokhi64_gmail.com>
Reviewed by: theraven
Discussed with: dim (detection of -std=c++11 supoort for tests)
Sponsored by: The FreeBSD Foundation (my involvement)
MFC after: 2 weeks
Differential revisions: https://reviews.freebsd.org/D7224,
    https://reviews.freebsd.org/D7427

7 years agoCreate namespace for the symbols added during 12-CURRENT cycle.
kib [Sat, 6 Aug 2016 13:28:58 +0000 (13:28 +0000)]
Create namespace for the symbols added during 12-CURRENT cycle.

Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

7 years agoMark an unused parameter as such.
tuexen [Sat, 6 Aug 2016 12:51:07 +0000 (12:51 +0000)]
Mark an unused parameter as such.

MFC after: 3 days

7 years agoFix various bugs in relation to the I-DATA chunk support
tuexen [Sat, 6 Aug 2016 12:33:15 +0000 (12:33 +0000)]
Fix various bugs in relation to the I-DATA chunk support

This is joint work with rrs.

MFC after: 3 days

7 years agofix .zfs-related cases in zfs_lookup that were broken by r303763
avg [Sat, 6 Aug 2016 11:02:07 +0000 (11:02 +0000)]
fix .zfs-related cases in zfs_lookup that were broken by r303763

The problem is that the special .zfs nodes are not represented by
znodes but by special gfs-based nodes.
r303763 changed interface of zfs_dirlook such that started operating on
znodes rather than on vnodes and, thus, the function became unsuitable
for handling .zfs entities.
The solution is to move the handling of the special cases to zfs_lookup,
the only consumer of zfs_dirlook.
I already had this solution applied in D7421, but for different reasons.

Reported by: asomers
MFC after: 3 days
X-MFC with: r303763

7 years agoFix some logic in PCIe HotPlug; display EI status
vangyzen [Fri, 5 Aug 2016 23:23:48 +0000 (23:23 +0000)]
Fix some logic in PCIe HotPlug; display EI status

The interpretation of the Electromechanical Interlock Status was
inverted, so we disengaged the EI if a card was inserted.
Fix it to engage the EI if a card is inserted.

When displaying the slot capabilites/status with pciconf:

- We inverted the sense of the Power Controller Control bit,
  saying the power was off when it was really on (according to
  this bit).  Fix that.

- Display the status of the Electromechanical Interlock:
        EI(engaged)
        EI(disengaged)

Reviewed by: jhb
MFC after: 3 days
Sponsored by: Dell Inc.
Differential Revision: https://reviews.freebsd.org/D7426

7 years agomthca: Add a wrapper for the firmware's DIAG_RPRT command.
markj [Fri, 5 Aug 2016 21:34:09 +0000 (21:34 +0000)]
mthca: Add a wrapper for the firmware's DIAG_RPRT command.

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

7 years agoalways install etcupdate
bapt [Fri, 5 Aug 2016 19:24:52 +0000 (19:24 +0000)]
always install etcupdate

Now that etcupdate does not depend on rcs anymore there is no need to
conditionnally install it

7 years agoetcupdate: directly use diff3(1) instead of merge(1)
bapt [Fri, 5 Aug 2016 19:22:33 +0000 (19:22 +0000)]
etcupdate: directly use diff3(1) instead of merge(1)

During the last attempt to rmeove GNU rcs, 2 blockers were spotted:
We need an ident(1) and etcupdate(8) uses merge(1).

Now nothing should prevent to remove rcs from base

Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D7401

7 years agosdiff: remove non finish/function code
bapt [Fri, 5 Aug 2016 19:14:55 +0000 (19:14 +0000)]
sdiff: remove non finish/function code

2 extra options not available neither on other BSD nor in GNU sdiff:
--diff-pid and --pipe-fd were present in the SoC code, none were usable

Just remove it

7 years agoFix GCE image publication. The gcutil utility is deprecated in favor
gjb [Fri, 5 Aug 2016 19:00:45 +0000 (19:00 +0000)]
Fix GCE image publication.  The gcutil utility is deprecated in favor
of gcloud.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

7 years ago[ar934x] add tap/tun as modules, for people who wish to use VPNs.
adrian [Fri, 5 Aug 2016 17:17:36 +0000 (17:17 +0000)]
[ar934x] add tap/tun as modules, for people who wish to use VPNs.

7 years ago[arge] add some extra MDIO debugging support
adrian [Fri, 5 Aug 2016 17:16:35 +0000 (17:16 +0000)]
[arge] add some extra MDIO debugging support

* add an ANY debug level which will always echo the message if debugging
  is compiled in;
* log MDIO transaction timeouts if debugging is compiled in;
* the argemdio device is different to arge, so turning on MDIO debugging
  flags in arge->sc_debug doesn't help.  Add a debug sysctl to argemdio
  as well so that MDIO transactions can be debugged.

Tested:

* AR9331

7 years agoCorrect a spelling error.
alc [Fri, 5 Aug 2016 16:44:11 +0000 (16:44 +0000)]
Correct a spelling error.

7 years agoxen-netfront: improve the logic when handling nic features from ioctl
royger [Fri, 5 Aug 2016 15:48:56 +0000 (15:48 +0000)]
xen-netfront: improve the logic when handling nic features from ioctl

Simplify the logic involved in changing the nic features on the fly, and
only reset the frontend when really needed (when changing RX features). Also
don't return from the ioctl until the interface has been properly
reconfigured.

While there, make sure XN_CSUM_FEATURES is used consistently.

Reported by: julian
MFC after: 5 days
X-MFC-with: r303488
Sponsored by: Citrix Systems R&D

7 years agoRemove lockmgr_waiters(9) and BUF_LOCKWAITERS(9); they were not used
trasz [Fri, 5 Aug 2016 13:53:28 +0000 (13:53 +0000)]
Remove lockmgr_waiters(9) and BUF_LOCKWAITERS(9); they were not used
for anything.

Reviewed by: kib@
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D7420

7 years agotcp/lro: If timestamps mismatch or it's a FIN, force flush.
sephe [Fri, 5 Aug 2016 09:08:00 +0000 (09:08 +0000)]
tcp/lro: If timestamps mismatch or it's a FIN, force flush.

This keeps the segments/ACK/FIN delivery order.

Before this patch, it was observed: if A sent FIN immediately after
an ACK, B would deliver FIN first to the TCP stack, then the ACK.
This out-of-order delivery causes one unnecessary ACK sent from B.

Reviewed by: gallatin, hps
Obtained from:  rrs, gallatin
Sponsored by: Netflix (rrs, gallatin), Microsoft (sephe)
Differential Revision: https://reviews.freebsd.org/D7415

7 years agoKeep a reference count on USB keyboard polling to allow recursive
hselasky [Fri, 5 Aug 2016 08:58:00 +0000 (08:58 +0000)]
Keep a reference count on USB keyboard polling to allow recursive
cngrab() during a panic for example, similar to what the AT-keyboard
driver is doing.

Found by: Bruce Evans <brde@optusnet.com.au>
MFC after: 1 week

7 years agohyperv/vmbus: Only make sure the TX bufring will not be closed.
sephe [Fri, 5 Aug 2016 08:57:51 +0000 (08:57 +0000)]
hyperv/vmbus: Only make sure the TX bufring will not be closed.

KVP can write data, whose size is > 1/2 TX bufring size.

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7414

7 years agozfs: honour and make use of vfs vnode locking protocol
avg [Fri, 5 Aug 2016 06:23:06 +0000 (06:23 +0000)]
zfs: honour and make use of vfs vnode locking protocol

ZFS POSIX Layer is originally written for Solaris VFS which is very
different from FreeBSD VFS.  Most importantly many things that FreeBSD VFS
manages on behalf of all filesystems are implemented in ZPL in a different
way.
Thus, ZPL contains code that is redundant on FreeBSD or duplicates VFS
functionality or, in the worst cases, badly interacts / interferes
with VFS.

The most prominent problem is a deadlock caused by the lock order reversal
of vnode locks that may happen with concurrent zfs_rename() and lookup().
The deadlock is a result of zfs_rename() not observing the vnode locking
contract expected by VFS.

This commit removes all ZPL internal locking that protects parent-child
relationships of filesystem nodes.  These relationships are protected
by vnode locks and the code is changed to take advantage of that fact
and to properly interact with VFS.

Removal of the internal locking allowed all ZPL dmu_tx_assign calls to
use TXG_WAIT mode.

Another victim, disputable perhaps, is ZFS support for filesystems with
mixed case sensitivity.  That support is not provided by the OS anyway,
so in ZFS it was a buch of dead code.

To do:
- replace ZFS_ENTER mechanism with VFS managed / visible mechanism
- replace zfs_zget with zfs_vget[f] as much as possible
- get rid of not really useful now zfs_freebsd_* adapters
- more cleanups of unneeded / unused code
- fix / replace .zfs support

PR: 209158
Reported by: many
Tested by: many (thank you all!)
MFC after: 5 days
Sponsored by: HybridCluster / ClusterHQ
Differential Revision: https://reviews.freebsd.org/D6533

7 years agoioat(4): Log channel number in CTR events
cem [Fri, 5 Aug 2016 02:56:31 +0000 (02:56 +0000)]
ioat(4): Log channel number in CTR events

7 years agoFix a regression in pf.conf while parsing the 'interval' keyword.
loos [Fri, 5 Aug 2016 02:19:03 +0000 (02:19 +0000)]
Fix a regression in pf.conf while parsing the 'interval' keyword.

The bug was introduced by r287009.

PR: 210924
Submitted by: kp@
Sponsored by: Rubicon Communications (Netgate)
Pointy hat to: loos

7 years agopfctl: Make most global variables static.
kp [Thu, 4 Aug 2016 19:24:44 +0000 (19:24 +0000)]
pfctl: Make most global variables static.

This will make it easier to link as a library.

Submitted by: Christian Mauderer <christian.mauderer@embedded-brains.de>

7 years agopfctl: Add missing __FBSDID to pfctl_osfp.c
kp [Thu, 4 Aug 2016 19:24:05 +0000 (19:24 +0000)]
pfctl: Add missing __FBSDID to pfctl_osfp.c

7 years agoRegenerate after r303755.
bdrewery [Thu, 4 Aug 2016 19:15:51 +0000 (19:15 +0000)]
Regenerate after r303755.

MFC after: 3 days
X-MFC-With: r303755
Sponsored by: EMC / Isilon Storage Division

7 years agoStill provide freebsd10_* symbols from libc for COMPAT10.
bdrewery [Thu, 4 Aug 2016 19:14:18 +0000 (19:14 +0000)]
Still provide freebsd10_* symbols from libc for COMPAT10.

r296773 was done to only remove libc symbols for <7.  We want to provide
the syscall symbols going forward for 7+.

Discussed with: jhb
MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division

7 years agoAdd __printflike() to bus_describe_intr() to enable -Wformat checks.
jhb [Thu, 4 Aug 2016 18:29:16 +0000 (18:29 +0000)]
Add __printflike() to bus_describe_intr() to enable -Wformat checks.

Fix a few places that were passing a raw string as the format to use
a "%s" format string instead.

MFC after: 2 months

7 years agoDon't permit mappings of invalid physical addresses on amd64 via /dev/mem.
jhb [Thu, 4 Aug 2016 17:55:23 +0000 (17:55 +0000)]
Don't permit mappings of invalid physical addresses on amd64 via /dev/mem.

Discussed with: kib

7 years ago[etherswitch] add LED API to the documentation and command line tool.
adrian [Thu, 4 Aug 2016 17:46:07 +0000 (17:46 +0000)]
[etherswitch] add LED API to the documentation and command line tool.

Submitted by: Dan Nelson <dnelson_1901@yahoo.com>

7 years ago[etherswitch] add in an initial API for controlling per-port LED behaviour.
adrian [Thu, 4 Aug 2016 17:45:35 +0000 (17:45 +0000)]
[etherswitch] add in an initial API for controlling per-port LED behaviour.

This is just implemented for the AR8327 for now.

Submitted by: Dan Nelson <dnelson_1901@yahoo.com>

7 years agocxgbe/t4_tom: The page pod arena allocates from pod address space and
np [Thu, 4 Aug 2016 17:29:42 +0000 (17:29 +0000)]
cxgbe/t4_tom: The page pod arena allocates from pod address space and
not index space.  The minimum valid allocation out of this arena is the
size of a single page pod.

Sponsored by: Chelsio Communications

7 years agoClean up the comments and code style in and around vm_pageout_cluster().
alc [Thu, 4 Aug 2016 16:20:12 +0000 (16:20 +0000)]
Clean up the comments and code style in and around vm_pageout_cluster().
In particular, fix factual, grammatical, and spelling errors in various
comments, and remove comments that are out of place in this function.

Reviewed by: kib, markj
MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D7410

7 years agoindent(1): Use bsearch() for looking up type keywords.
pfg [Thu, 4 Aug 2016 15:27:09 +0000 (15:27 +0000)]
indent(1): Use bsearch() for looking up type keywords.

Reference:
https://github.com/pstef/freebsd_indent/commit/f3b8e6e57fd47364b2360b44011a2fad5d11adc7

Submitted by: Piotr Stefaniak
Differential Revision: https://reviews.freebsd.org/D6966

7 years agoRemove the pvh_global_lock lock from the arm64 pmap. It is unneeded on arm64
andrew [Thu, 4 Aug 2016 13:49:36 +0000 (13:49 +0000)]
Remove the pvh_global_lock lock from the arm64 pmap. It is unneeded on arm64
as invalidation will have completed before the pmap_invalidate_* functions
have complete.

Discussed with: alc, kib
Obtained from: ABT Systems Ltd
MFC after: 1 month
Sponsored by: The FreeBSD Foundation

7 years agoRemove unused - never actually implemented - vnode lock types
trasz [Thu, 4 Aug 2016 13:45:18 +0000 (13:45 +0000)]
Remove unused - never actually implemented - vnode lock types
from vnode_if.src.

MFC after: 1 month

7 years agoGrammar fixes.
pluknet [Thu, 4 Aug 2016 11:38:53 +0000 (11:38 +0000)]
Grammar fixes.

7 years agomdoc: The .Fn function.
pluknet [Thu, 4 Aug 2016 11:22:51 +0000 (11:22 +0000)]
mdoc: The .Fn function.

7 years agoDragonFly 4.6.0 release added.
maxim [Thu, 4 Aug 2016 10:49:00 +0000 (10:49 +0000)]
DragonFly 4.6.0 release added.

7 years agoreport sector size and number of sectors in lsdev output for bios disks
avg [Thu, 4 Aug 2016 06:40:51 +0000 (06:40 +0000)]
report sector size and number of sectors in lsdev output for bios disks

MFC after: 3 weeks

7 years agohyperv/storvsc: Claim SPC-3 conformance, thus enable UNMAP support
sephe [Thu, 4 Aug 2016 05:05:35 +0000 (05:05 +0000)]
hyperv/storvsc: Claim SPC-3 conformance, thus enable UNMAP support

The Hyper-V on pre-win10 systems will only report SPC-2 conformance,
but it actually conforms to SPC-3.  The INQUIRY response is adjusted
to propagate the SPC-3 version information to CAM.

Submitted by: Hongjiang Zhang <honzhan microsoft com>
MFC after: 3 days
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7405

7 years agoAdd in tap/tun for openvpn-on-mips experiments.
adrian [Thu, 4 Aug 2016 01:49:18 +0000 (01:49 +0000)]
Add in tap/tun for openvpn-on-mips experiments.

(FWIW, it does work.)

7 years agoindent(1): add new -sac and -U options.
pfg [Wed, 3 Aug 2016 22:08:07 +0000 (22:08 +0000)]
indent(1): add new -sac and -U options.

Add -sac (space after cast) and -nsac options.
These control whether space character is put after a cast operator or not.
Default is -nsac.

Add -U option for providing a file containing list of types.
This is needed for properly deciding which asterisks denote unary
operation and which denote binary.

These come from PostgreSQL.

Reference:
https://github.com/pstef/freebsd_indent/commit/84b00e3d46dfd6d955b2f481a1f3b275de9ad6d1
https://github.com/pstef/freebsd_indent/commit/49c52cf383fa2a246a1a22c6640a5a21b0f1fd90

Differential Revision: https://reviews.freebsd.org/D6966  (Partial)
Submitted by: Piotr Stefaniak

7 years agoFix a style(9) bug.
jkim [Wed, 3 Aug 2016 20:21:58 +0000 (20:21 +0000)]
Fix a style(9) bug.

7 years agoSupport nanosecond time stamps for pcap_dispatch(3) and pcap_loop(3).
jkim [Wed, 3 Aug 2016 20:08:39 +0000 (20:08 +0000)]
Support nanosecond time stamps for pcap_dispatch(3) and pcap_loop(3).

7 years ago[ar934x] shuffle AR93XX_BASE -> std.AR934X
adrian [Wed, 3 Aug 2016 19:23:22 +0000 (19:23 +0000)]
[ar934x] shuffle AR93XX_BASE -> std.AR934X

7 years ago[ar9330] ok, fine, I'll finally undo the 2011-era mistake of _BASE config files.
adrian [Wed, 3 Aug 2016 19:18:53 +0000 (19:18 +0000)]
[ar9330] ok, fine, I'll finally undo the 2011-era mistake of _BASE config files.

Repeated prodding by: imp

7 years ago[ar9330] add in module support for ipfw nat.
adrian [Wed, 3 Aug 2016 19:13:09 +0000 (19:13 +0000)]
[ar9330] add in module support for ipfw nat.

This actually does work, and works pretty well.

7 years agoCorrect some comments.
bdrewery [Wed, 3 Aug 2016 18:48:56 +0000 (18:48 +0000)]
Correct some comments.

Sponsored by: EMC / Isilon Storage Division
MFC after: 3 days

7 years agoWe need aw_nmi to be attached which needs GIC so attach a bit later.
manu [Wed, 3 Aug 2016 18:45:56 +0000 (18:45 +0000)]
We need aw_nmi to be attached which needs GIC so attach a bit later.
Also the GPIOC doesn't need to be attach early

Reviewed by: andrew
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D7082

7 years agouuid_to_string(3) is allocating memory and can fail on that.
oshogbo [Wed, 3 Aug 2016 18:04:08 +0000 (18:04 +0000)]
uuid_to_string(3) is allocating memory and can fail on that.
Check if any error accrued.

7 years agoFix EHCI driver by excluding first 512K from available memory
gonzo [Wed, 3 Aug 2016 18:03:14 +0000 (18:03 +0000)]
Fix EHCI driver by excluding first 512K from available memory

On Zynq 256K-512K memory region is not accessible by all bus masters.
EHCI driver fails when trying to use it for DMA transfers. Patching
memory node does not help because ubldr overrides values there with
the ones obtained from u-boot. So as a workaround we just mark first
512K as reserved.

PR: 211484
Submitted by: Thomas Skibo <thoma555-bsd@yahoo.com>
MFC after: 3 days

7 years agoFix misleading description of the -b option in the geli init command.
oshogbo [Wed, 3 Aug 2016 18:02:10 +0000 (18:02 +0000)]
Fix misleading description of the -b option in the geli init command.

Reviewed by: bjk, wblock
Differential Revision: https://reviews.freebsd.org/D7226
Discussed with: AllanJude

7 years agoFix a few cosmetic issues in boot1.efi.
markj [Wed, 3 Aug 2016 17:17:01 +0000 (17:17 +0000)]
Fix a few cosmetic issues in boot1.efi.

- Use ANSI function signatures.
- Remove unneeded checks for a NULL boot module.
- Use nitems().

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

7 years agoUse the port device name for the iov device for Chelsio T4/T5 cards.
jhb [Wed, 3 Aug 2016 17:11:08 +0000 (17:11 +0000)]
Use the port device name for the iov device for Chelsio T4/T5 cards.

Chelsio T4/T5 adapters are multifunction cards.  The main driver uses
physical function 4 (PF4).  However, VF devices for SR-IOV are only
supported on physical functions 0 through 3, where PF0 creates VFs tied
to port 0, etc.  The t4iov/t5iov driver was previously added to
create VF devices for ports that are present on each adapter.  This
change uses the recently added pci_iov_attach_name() function to
name the character device in /dev/iov after the associated port on
the card (e.g. /dev/iov/cxl0 is used to create VFs that share the
cxl0 port).  With this in place, mark the t4iov/t5iov devices quiet
to prevent them from cluttering dmesg.

Reviewed by: rstone
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D7402

7 years agoPermit the name of the /dev/iov entry to be set by the driver.
jhb [Wed, 3 Aug 2016 17:09:12 +0000 (17:09 +0000)]
Permit the name of the /dev/iov entry to be set by the driver.

The PCI_IOV option creates character devices in /dev/iov for each PF
device driver that registers support for creating VFs.  By default the
character device is named after the PF device (e.g. /dev/iov/foo0).
This change adds a variant of pci_iov_attach() called pci_iov_attach_name()
that allows the name of the /dev/iov entry to be specified by the
driver.

Reviewed by: rstone
MFC after: 1 month
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D7400

7 years agoApply the fix from r232612 to fixed function counters.
jhb [Wed, 3 Aug 2016 16:52:00 +0000 (16:52 +0000)]
Apply the fix from r232612 to fixed function counters.

Reviewed by: emaste
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D7397

7 years agoDisable DSA again.
des [Wed, 3 Aug 2016 16:34:20 +0000 (16:34 +0000)]
Disable DSA again.

MFC after: 3 days

7 years agoindent(1): accept offsetof(3) as a keyword.
pfg [Wed, 3 Aug 2016 16:33:34 +0000 (16:33 +0000)]
indent(1): accept offsetof(3) as a keyword.

Reference:
https://github.com/pstef/freebsd_indent/commit/c470e5e2c974aa38450ca4762b93829f7a7bfa4d

Differential Revision: https://reviews.freebsd.org/D6966  (Partial)
Submitted by: Piotr Stefaniak

7 years agoRemove DSA from default cipher list and disable SSH1.
des [Wed, 3 Aug 2016 16:08:21 +0000 (16:08 +0000)]
Remove DSA from default cipher list and disable SSH1.

Upstream did this a long time ago, but we kept DSA and SSH1 in FreeBSD for
reasons which boil down to POLA.  Now is a good time to catch up.

MFC after: 3 days
Relnotes: yes

7 years agoRemove ncl_printf(), use printf(9) directly. After r303710 the
kib [Wed, 3 Aug 2016 15:58:20 +0000 (15:58 +0000)]
Remove ncl_printf(), use printf(9) directly.  After r303710 the
function duplicates printf().

Correct function names in the messages [*].

Noted by: bde [*]
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoCorrect assertion on vcpuid argument to vm_gpa_hold().
jhb [Wed, 3 Aug 2016 15:20:10 +0000 (15:20 +0000)]
Correct assertion on vcpuid argument to vm_gpa_hold().

PR: 208168
Submitted by: Dave Cameron <daverabbitz@ihug.co.nz>
Reviewed by: grehan
MFC after: 1 month

7 years agoMerge i386 and amd64 variants of mp_watchdog.c into x86/, there is no
kib [Wed, 3 Aug 2016 13:51:53 +0000 (13:51 +0000)]
Merge i386 and amd64 variants of mp_watchdog.c into x86/, there is no
difference between files.
For pc98, put x86/mp_x86.c into the same place as used by i386 file list.
Fix typo in comment.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoRemove unneeded (recursing) Giant acquisition around vprintf(9).
kib [Wed, 3 Aug 2016 11:49:17 +0000 (11:49 +0000)]
Remove unneeded (recursing) Giant acquisition around vprintf(9).

Reviewed by: rmacklem
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agolocks: fix sx compilation on mips after r303643
mjg [Wed, 3 Aug 2016 09:15:10 +0000 (09:15 +0000)]
locks: fix sx compilation on mips after r303643

The kernel.h header is required for the SYSINIT macro, which apparently
was present on amd64 by accident.

Reported by: kib

7 years agoAlthough the code amount is not big, move POSIX error processing into
ache [Wed, 3 Aug 2016 09:09:34 +0000 (09:09 +0000)]
Although the code amount is not big, move POSIX error processing into
two sepatate functions to make glob(3) code less obscure and more simple.
There is no needs to make them inline since it is error path which supposed
to not happes often.

7 years agoRemove Giant asserts. Update comment.
kib [Wed, 3 Aug 2016 08:57:15 +0000 (08:57 +0000)]
Remove Giant asserts.  Update comment.

Owning Giant in the init/uninit is accidental due to the moment where
VFS modules initialization is performed, and is not enforced by the
VFS interface.  The Giant lock does not prevent a parallel execution
of the code, it is VFS which implements the proper protocol.

Approved by: des (pseudofs maintainer)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoSome style changes. Fix a typo in comment.
kib [Wed, 3 Aug 2016 08:53:29 +0000 (08:53 +0000)]
Some style changes.  Fix a typo in comment.

Approved by: des (pseudofs maintainer)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoExplain why swapgeom_close_ev() is delegated.
kib [Wed, 3 Aug 2016 07:11:19 +0000 (07:11 +0000)]
Explain why swapgeom_close_ev() is delegated.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoRemove mention of the Giant from the fork_return() description.
kib [Wed, 3 Aug 2016 07:10:09 +0000 (07:10 +0000)]
Remove mention of the Giant from the fork_return() description.
Making emphasis on this lock in the core function comment is confusing
for the modern kernel.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days