freebsd.git
8 years agoAdd more DRM_* debug macros from linux 3.8.13
bapt [Wed, 26 Aug 2015 21:31:04 +0000 (21:31 +0000)]
Add more DRM_* debug macros from linux 3.8.13

8 years agoSynchronize i915_reg.h with linux 3.8.13 version
bapt [Wed, 26 Aug 2015 21:17:48 +0000 (21:17 +0000)]
Synchronize i915_reg.h with linux 3.8.13 version

Keep a couple of old macros that will be removed lated when the rest of the code
will be updated to 3.8.13 equivalent.
Chase the renamed macros

Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D3487

8 years agoBelatedly add entries for libugidfw.so.4 to catch up with r284745.
jkim [Wed, 26 Aug 2015 18:22:59 +0000 (18:22 +0000)]
Belatedly add entries for libugidfw.so.4 to catch up with r284745.

8 years agoAdd the SOC_HISI_HI6220 option. This will be used to enable drivers for
andrew [Wed, 26 Aug 2015 18:09:17 +0000 (18:09 +0000)]
Add the SOC_HISI_HI6220 option. This will be used to enable drivers for
the HiSilicon hi6220 SoC used in the HiKey 96boards board.

Sponsored by: ABT Systems Ltd

8 years agoMerge ACPICA 20150818.
jkim [Wed, 26 Aug 2015 17:13:47 +0000 (17:13 +0000)]
Merge ACPICA 20150818.

8 years agoAfter consultations with the arm community, don't define softfp for
imp [Wed, 26 Aug 2015 17:10:43 +0000 (17:10 +0000)]
After consultations with the arm community, don't define softfp for
armv6. It's too ambiguous. We do use the softfp ABI for the moment on
armv6, but we allow floating point register use (and the compilers
will generate it). This is too ambiguous to use it as a decider for
which algorithms to use on the platform. Err on the side of caution
and not define it.

Submitted by: ian@
Reviewed by: andrew@

8 years agoSummary: Add the interactivity equations to the header comment for our
gnn [Wed, 26 Aug 2015 16:36:41 +0000 (16:36 +0000)]
Summary: Add the interactivity equations to the header comment for our
interactivity calculation routine.

Suggested by: rwatson

8 years agoReduce diff on i915_dma.c against linux 3.8.13
bapt [Wed, 26 Aug 2015 13:23:56 +0000 (13:23 +0000)]
Reduce diff on i915_dma.c against linux 3.8.13

No functional changes

Discussed with: dumbbell
Reviewed by: dumbbell

8 years agoFix race condition in its_cmd_send()
zbb [Wed, 26 Aug 2015 12:32:46 +0000 (12:32 +0000)]
Fix race condition in its_cmd_send()

its_cmd_send() can be called by multiple CPUs simultaneously.
After the command is pushed to ITS command ring the completion
status is polled using global pointer to the next free ring slot.
Use copied pointer and provide correct locking to avoid spurious
pointer value when concurrent access occurs.

Obtained from: Semihalf
Sponsored by:  The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3436

8 years agoFix SEE ALSO.
pluknet [Wed, 26 Aug 2015 11:54:40 +0000 (11:54 +0000)]
Fix SEE ALSO.

The history mechanism applies to csh.

Sponsored by: Nginx, Inc.

8 years agoAdd an option to select which SoCs we are building for. It is intended to
andrew [Wed, 26 Aug 2015 11:36:23 +0000 (11:36 +0000)]
Add an option to select which SoCs we are building for. It is intended to
be used with any SoC specific drivers, for example a ThunderX nic driver
would use something like the following in files.arm64:

arm64/cavium/thunder_nic.c optional soc_cavm_thunderx thndr_nic

Reviewed by: imp
Sponsored by: ABT Systems Ltd
Differential Revision: https://reviews.freebsd.org/D3479

8 years agoOnly access the Samsung registers when targeting Samsung hardware.
andrew [Wed, 26 Aug 2015 10:54:14 +0000 (10:54 +0000)]
Only access the Samsung registers when targeting Samsung hardware.

Sponsored by: ABT Systems Ltd

8 years agoAdd a above the virtio section.
andrew [Wed, 26 Aug 2015 10:32:23 +0000 (10:32 +0000)]
Add a above the virtio section.

8 years agoFix filemon locking races.
bdrewery [Wed, 26 Aug 2015 03:44:48 +0000 (03:44 +0000)]
Fix filemon locking races.

Convert filemon_lock and struct filemon* lock to sx(9), rather than a
self-rolled reader-writer lock, and hold it for the entire time needed.

At least filemon_lock_write() was not checking for active readers when
it would successfully return with the write lock "held".  This led to
a race with reading entries from filemon_inuse as they were removed.  This
could be seen with QUEUE_MACRO_DEBUG enabled, causing -1 to be read as an
entry rather than a valid struct filemon*.

Fixing filemon_lock_write() to check readers was insufficient to fix the
races.

sx(9) was used as the lock could be held while taking proctree_lock and sleeping
in fo_write.

Sponsored by: EMC / Isilon Storage Division
MFC after: 2 weeks

8 years agoThe Freescale qoriq PCIe controller is compatible with mpc85xx.
jhibbits [Wed, 26 Aug 2015 03:37:33 +0000 (03:37 +0000)]
The Freescale qoriq PCIe controller is compatible with mpc85xx.

Add the compatible checks.

Obtained from: Semihalf (partial)
Sponsored by: Alex Perez/Inertial Computing

8 years agoAvoid taking proctree_lock and searching parents in wrappers if not needed.
bdrewery [Wed, 26 Aug 2015 03:37:18 +0000 (03:37 +0000)]
Avoid taking proctree_lock and searching parents in wrappers if not needed.

This should help the case where filemon is loaded but not in use.

Sponsored by: EMC / Isilon Storage Division
MFC after: 2 weeks

8 years agoRemove unneeded inuse list locking in filemon_comment().
bdrewery [Wed, 26 Aug 2015 03:33:34 +0000 (03:33 +0000)]
Remove unneeded inuse list locking in filemon_comment().

Sponsored by: EMC / Isilon Storage Division
MFC after: 2 weeks

8 years agoMove common locking for filemon_inuse and struct filemon* to filemon_pid_check().
bdrewery [Wed, 26 Aug 2015 03:32:47 +0000 (03:32 +0000)]
Move common locking for filemon_inuse and struct filemon* to filemon_pid_check().

This keeps the lock for the filemon_inuse list held only while reading
the list.

Sponsored by: EMC / Isilon Storage Division
MFC after: 2 weeks

8 years agoDrop a .WAIT into the list. Items later in the list than this depend
imp [Wed, 26 Aug 2015 02:47:11 +0000 (02:47 +0000)]
Drop a .WAIT into the list. Items later in the list than this depend
on items earlier. Enable parallel builds.

8 years agosh: Fix out of bounds read when there is no ] after a [:class:].
jilles [Tue, 25 Aug 2015 21:55:15 +0000 (21:55 +0000)]
sh: Fix out of bounds read when there is no ] after a [:class:].

The initial check for a matching ] was incorrect if a ] may be consumed by a
[:class:]. The subsequent loop assumed that there must be a ].

Remove the initial check and make the loop cope with a missing ].

Found with afl-fuzz.

MFC after: 1 week

8 years agoFix OpenSSH multiple vulnerabilities by backporting three changes
delphij [Tue, 25 Aug 2015 20:48:37 +0000 (20:48 +0000)]
Fix OpenSSH multiple vulnerabilities by backporting three changes
from OpenSSH-portable master.

Git revisions: 45b0eb752c94954a6de046bfaaf129e518ad4b5b
5e75f5198769056089fb06c4d738ab0e5abc66f7
d4697fe9a28dab7255c60433e4dd23cf7fce8a8b
Reviewed by: des
Security: FreeBSD-SA-15:22.openssh

8 years agoioat(4): Minor style cleanups
cem [Tue, 25 Aug 2015 17:39:03 +0000 (17:39 +0000)]
ioat(4): Minor style cleanups

Suggested by: ngie
Reviewed by: jimharris
Approved by: markj (mentor)
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D3481

8 years agoAdd softfp to MACHINE_CPU more often when we're compiling for soft
imp [Tue, 25 Aug 2015 17:11:49 +0000 (17:11 +0000)]
Add softfp to MACHINE_CPU more often when we're compiling for soft
float targets. It is added for booke on powerpc and all arm with hf in
the string. Also add arm to all arm builds and armv6 to armv6 and
newer builds.

PR: 202641

8 years agoUse kdb_jmpbuf and setjmp to handle accessing invalid addresses in the
andrew [Tue, 25 Aug 2015 17:02:28 +0000 (17:02 +0000)]
Use kdb_jmpbuf and setjmp to handle accessing invalid addresses in the
debugger memory access functions. This allows us to correctly reenter into
the debugger on failure.

Sponsored by: ABT Systems Ltd

8 years agoUse nitems to count the number of items in a static array.
andrew [Tue, 25 Aug 2015 16:50:25 +0000 (16:50 +0000)]
Use nitems to count the number of items in a static array.

Sponsored by: ABT Systems Ltd

8 years agoCall into kdb on a data abort when it's enabled. This is needed to
andrew [Tue, 25 Aug 2015 16:49:10 +0000 (16:49 +0000)]
Call into kdb on a data abort when it's enabled. This is needed to
correctly handle trying to access an invalid address in the debugger.

While here document that the breakpoint handler is supposed to fall
through to the following case.

Sponsored by: ABT Systems Ltd

8 years agoCorrectly update the address to write to after storing the stack pointer
andrew [Tue, 25 Aug 2015 16:43:32 +0000 (16:43 +0000)]
Correctly update the address to write to after storing the stack pointer
in the kernels setjmp function.

Sponsored by: ABT Systems Ltd

8 years agoCode cleanup unused-but-set-variable spotted by gcc.
araujo [Tue, 25 Aug 2015 15:34:28 +0000 (15:34 +0000)]
Code cleanup unused-but-set-variable spotted by gcc.

Reviewed by: royger
Approved by: bapt (mentor)
Differential Revision: D3476

8 years agoCode cleanup unused-but-set-variable spotted by gcc.
araujo [Tue, 25 Aug 2015 15:33:09 +0000 (15:33 +0000)]
Code cleanup unused-but-set-variable spotted by gcc.

Approved by: bapt (mentor)
Differential Revision: D3475

8 years agoCode cleanup unused-but-set-variable spotted by gcc.
araujo [Tue, 25 Aug 2015 15:32:08 +0000 (15:32 +0000)]
Code cleanup unused-but-set-variable spotted by gcc.

Reviewed by: melifaro
Approved by: bapt (mentor)
Differential Revision: D3473

8 years agoSync ypwhich(1) code with the OpenBSD version that is more modern.
araujo [Tue, 25 Aug 2015 15:27:32 +0000 (15:27 +0000)]
Sync ypwhich(1) code with the OpenBSD version that is more modern.
Update the BSD LICENSE and remove the 3rd clause.

Reviewed by: rodrigc, kib, bapt
Approved by: bapt (mentor)
Obtained from: OpenBSD
Differential Revision: D3249

8 years agoLeave hypervisor mode upon startup on ARMv7
zbb [Tue, 25 Aug 2015 14:49:11 +0000 (14:49 +0000)]
Leave hypervisor mode upon startup on ARMv7

If ARMv7 boots in HYP mode, switch to SVC32.

Reviewed by:   ian
Submitted by:  Wojciech Macek <wma@semihalf.com>
               Jakub Palider  <jpa@semihalf.com>
Obtained from: Semihalf
Sponsored by:  Annapurna Labs
Differential Revision: https://reviews.freebsd.org/D1810

8 years agoMake UTF-8 parsing and generation more strict.
ed [Tue, 25 Aug 2015 09:16:09 +0000 (09:16 +0000)]
Make UTF-8 parsing and generation more strict.

- in mbrtowc() we need to disallow codepoints above 0x10ffff.
- In wcrtomb() we need to disallow codepoints between 0xd800 and 0xdfff.

Reviewed by: bapt
Differential Revision: https://reviews.freebsd.org/D3399

8 years agoCall the new RSS hash calculation function to correctly calculate a hash
adrian [Tue, 25 Aug 2015 06:12:59 +0000 (06:12 +0000)]
Call the new RSS hash calculation function to correctly calculate a hash
based on the configured requirements for the protocol.

Tested:

* UDP IPv6 TX/RX testing, w/ RSS enabled, 82599 ixgbe(4) hardware

8 years agoFinish r89633 and completely remove the remaining of VERSION.
delphij [Tue, 25 Aug 2015 05:31:00 +0000 (05:31 +0000)]
Finish r89633 and completely remove the remaining of VERSION.

PR: bin/202308
Submitted by: John Hein <z7dr6ut7gs snkmail com>
MFC after: 2 weeks

8 years agoTesting whether a page is dirty does not require the page lock. Moreover,
alc [Tue, 25 Aug 2015 01:01:25 +0000 (01:01 +0000)]
Testing whether a page is dirty does not require the page lock.  Moreover,
it may involve a pmap operation that iterates over the page's PV list, so
unnecessarily holding the page lock is undesirable.

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

8 years agoFix the spelling of eri's name.
loos [Mon, 24 Aug 2015 23:40:36 +0000 (23:40 +0000)]
Fix the spelling of eri's name.

Pointy hat to: loos
MFC with: r287009

8 years agoReapply r196551 which was accidentally reverted by r223637 (update to
loos [Mon, 24 Aug 2015 21:41:05 +0000 (21:41 +0000)]
Reapply r196551 which was accidentally reverted by r223637 (update to
OpenBSD pf 4.5).

Fix argument ordering to memcpy as well as the size of the copy in the
(theoretical) case that pfi_buffer_cnt should be greater than ~_max.

This fix the failure when you hit the self table size and force it to be
resized.

MFC after: 3 days
Sponsored by: Rubicon Communications (Netgate)

8 years agoioatcontrol(8): Fix build
cem [Mon, 24 Aug 2015 20:39:22 +0000 (20:39 +0000)]
ioatcontrol(8): Fix build

Tripped up by the FBSD SVN pre-commit hook!

Approved by: markj (mentor)
Sponsored by: EMC / Isilon Storage Division

8 years agoImport ioat(4) driver
cem [Mon, 24 Aug 2015 19:32:03 +0000 (19:32 +0000)]
Import ioat(4) driver

I/OAT is also referred to as Crystal Beach DMA and is a Platform Storage
Extension (PSE) on some Intel server platforms.

This driver currently supports DMA descriptors only and is part of a
larger effort to upstream an interconnect between multiple systems using
the Non-Transparent Bridge (NTB) PSE.

For now, this driver is only built on AMD64 platforms.  It may be ported
to work on i386 later, if that is desired.  The hardware is exclusive to
x86.

Further documentation on ioat(4), including API documentation and usage,
can be found in the new manual page.

Bring in a test tool, ioatcontrol(8), in tools/tools/ioat.  The test
tool is not hooked up to the build and is not intended for end users.

Submitted by: jimharris, Carl Delsey <carl.r.delsey@intel.com>
Reviewed by: jimharris (reviewed my changes)
Approved by: markj (mentor)
Relnotes: yes
Sponsored by: Intel
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D3456

8 years agoEnable hardfloat for assembly generation.
adrian [Mon, 24 Aug 2015 19:09:56 +0000 (19:09 +0000)]
Enable hardfloat for assembly generation.

gcc versions later than 4.2 started erroring out on seeing hardware
floating point references when soft-float was enabled.

Reviewed by: imp

8 years agoWhen forking a child process with PMC_F_DESCENDANTS set in pmc_attach()
bz [Mon, 24 Aug 2015 18:57:32 +0000 (18:57 +0000)]
When forking a child process with PMC_F_DESCENDANTS set in pmc_attach()
in the parent, we will inherit the pmcids but cannot execute any operations
on them in the child.  The reason for this is that pmc_find_pmc() only
tries to find the current process on the owners hash list, but given the
child does not own the attachment, we cannot find it.
Thus, in case the initial lookup fails, try to find the pmc_process state
affiliated with the child process, lookup the pmc from there using the
row index, and get the owner process from that pmc.
Then continue as normal and lookup the pmc context of the owner (process).

This allows us to call, e.g., pmc_start() in the child process before we
start the work there, but to collect the accumulated results later in
the parent.

Sponsored by: DARPA,AFRL
Obtained from: L41
Tested by: rwatson, L41
MFC after: 4 weeks
Reviewed by: gnn
Differential Revision: https://reviews.freebsd.org/D2052

8 years agoFix build for architectures that define wchar_t as an unsigned int.
marcel [Mon, 24 Aug 2015 17:58:11 +0000 (17:58 +0000)]
Fix build for architectures that define wchar_t as an unsigned int.

Reported by: bz@

8 years agoCheck the frame pointer is within the kernel before accessing it.
andrew [Mon, 24 Aug 2015 17:28:19 +0000 (17:28 +0000)]
Check the frame pointer is within the kernel before accessing it.

8 years agoStyle/whitespace cleanup in shared/common code.
sbruno [Mon, 24 Aug 2015 16:32:57 +0000 (16:32 +0000)]
Style/whitespace cleanup in shared/common code.

Differential Revision: https://reviews.freebsd.org/D3159
Submitted by: erj
MFC after: 2 weeks

8 years agoUpgrade libxo to 0.4.5.
marcel [Mon, 24 Aug 2015 16:26:20 +0000 (16:26 +0000)]
Upgrade libxo to 0.4.5.

Local changes incorporated by 0.4.5: r284340
Local changes retained: r276260, r282117

Obtained from: https://github.com/Juniper/libxo

8 years agoMake it possible to forcibly unmount devfs.
trasz [Mon, 24 Aug 2015 14:04:44 +0000 (14:04 +0000)]
Make it possible to forcibly unmount devfs.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoRemove now unused LIBPRIVATEDIR
bapt [Mon, 24 Aug 2015 13:46:12 +0000 (13:46 +0000)]
Remove now unused LIBPRIVATEDIR

Sponsored by: Gandi.net

8 years agoMake vfs_unmountall() unmount /dev after /, not before. The only
trasz [Mon, 24 Aug 2015 13:18:13 +0000 (13:18 +0000)]
Make vfs_unmountall() unmount /dev after /, not before.  The only
reason this didn't result in an unclean shutdown is that devfs ignores
MNT_FORCE flag.

Reviewed by: kib@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3467

8 years agoFix libproc on architectures that don't need the program counter to be
andrew [Mon, 24 Aug 2015 12:17:15 +0000 (12:17 +0000)]
Fix libproc on architectures that don't need the program counter to be
adjusted. This seems to be the case on all non-x86 architectures libproc
supports.

Reviewed by: kib
Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3465

8 years agoAdd support for pmap_sync_icache on arm64.
andrew [Mon, 24 Aug 2015 12:01:39 +0000 (12:01 +0000)]
Add support for pmap_sync_icache on arm64.

Reviewed by: emaste, imp (both earlier version)
Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3438

8 years agoAdd pages used by the PV entries to minidumps.
andrew [Mon, 24 Aug 2015 10:55:54 +0000 (10:55 +0000)]
Add pages used by the PV entries to minidumps.

8 years agoMFV (partial) r286889: 5692 expose the number of hole blocks in a file
avg [Mon, 24 Aug 2015 09:48:50 +0000 (09:48 +0000)]
MFV (partial) r286889: 5692 expose the number of hole blocks in a file

FreeBSD porting notes:
- only kernel-side changes are merged
- the new ioctl is not actually implemented yet
- thus, the goal is to synchronize DMU code

illumos/illumos-gate@2bcf0248e992f292c7b814458bcdce2f004925d6

https://www.illumos.org/issues/5692
we would like to expose the number of hole (sparse) blocks in a file.
this can be useful to for example if you want to fill in the holes with
some data; knowing the number of holes in advances allows you to report
progress on hole filling. We could use SEEK_HOLE to do that but it would
be O(n) where n is the number of holes present in the file.

Author: Max Grossman <max.grossman@delphix.com>
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Boris Protopopov <bprotopopov@hotmail.com>
Approved by: Richard Lowe <richlowe@richlowe.net>

8 years agoSome random tweaks to ctl.conf(5).
trasz [Mon, 24 Aug 2015 09:33:12 +0000 (09:33 +0000)]
Some random tweaks to ctl.conf(5).

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoRevert r284245: "Fix a callout race condition introduced in TCP
jch [Mon, 24 Aug 2015 09:30:27 +0000 (09:30 +0000)]
Revert r284245:  "Fix a callout race condition introduced in TCP
timers callouts with r281599."

r281599 fixed a TCP timer race condition, but due a callout(9) bug
it also introduced another race condition workaround-ed with r284245.
The callout(9) bug being fixed with r286880, we can now revert the
workaround (r284245).

Differential Revision: https://reviews.freebsd.org/D2079 (Initial change)
Differential Revision: https://reviews.freebsd.org/D2763 (Workaround)
Differential Revision: https://reviews.freebsd.org/D3078 (Fix)
Sponsored by: Verisign, Inc.
MFC after: 2 weeks

8 years agospa_import_rootpool: prevent lock and resource leak
avg [Mon, 24 Aug 2015 08:44:44 +0000 (08:44 +0000)]
spa_import_rootpool: prevent lock and resource leak

The lock leak could lead to a deadlock later.

PR: 198563
Submitted by: Fabian Keil <fk@fabiankeil.de>
MFC after: 1 week

8 years agoaccount for ashift when gathering buffers to be written to l2arc device
avg [Mon, 24 Aug 2015 08:10:52 +0000 (08:10 +0000)]
account for ashift when gathering buffers to be written to l2arc device

The change that introduced the L2ARC compression support also introduced
a bug where the on-disk size of the selected buffers could end up larger
than the target size if the ashift is greater than 9.  This was because
the buffer selection could did not take into account the fact that
on-disk size could be larger than the in-memory buffer size due to
the alignment requirements.

At the moment b_asize is a misnomer as it does not always represent the
allocated size: if a buffer is compressed, then the compressed size is
properly rounded (on FreeBSD), but if the compression fails or it is not
applied, then the original size is kept and it could be smaller than what
ashift requires.

For the same reasons arcstat_l2_asize and the reported used space
on the cache device could be smaller than the actual allocated size
if ashift > 9.  That problem is not fixed by this change.

This change only ensures that l2ad_hand is not advanced by more
than target_sz.  Otherwise we would overwrite active (unevicted)
L2ARC buffers.  That problem is manifested as growing l2_cksum_bad
and l2_io_error counters.

This change also changes 'p' prefix to 'a' prefix in a few places
where variables represent allocated rather than physical size.

The resolved problem could also result in the reported allocated size
being greater than the cache device's capacity, because of the
overwritten buffers (more than one buffer claiming the same disk
space).

This change is already in ZFS-on-Linux:
zfsonlinux/zfs@ef56b0780c80ebb0b1e637b8b8c79530a8ab3201

PR: 198242
PR: 195746 (possibly related)
Reviewed by: mahrens (https://reviews.csiden.org/r/229/)
Tested by: gkontos@aicom.gr (most recently)
MFC after: 15 days
X-MFC note: patch does not apply as is at the moment
Relnotes: yes
Sponsored by: ClusterHQ
Differential Revision: https://reviews.freebsd.org/D2764
Reviewed by: noone (@FreeBSD.org)

8 years agoSync HPA and VPA implementations with CUP.
ed [Mon, 24 Aug 2015 07:49:27 +0000 (07:49 +0000)]
Sync HPA and VPA implementations with CUP.

After fixing the 16-bits integer arithmetic overflow in 286981, we
should also make sure to fix the VPA sequence. Bring HPA and VPA in sync
with how we now implement CUP.

PR: 202612
Reported by: kcwu csie org
MFC after: 1 month

8 years agoAdd static and remove unused variables.
hrs [Mon, 24 Aug 2015 05:38:05 +0000 (05:38 +0000)]
Add static and remove unused variables.

8 years agoImplement the IPv6 RSS software hash function.
adrian [Mon, 24 Aug 2015 05:36:08 +0000 (05:36 +0000)]
Implement the IPv6 RSS software hash function.

This isn't yet linked into the receive/transmit paths anywhere just yet.

This is part of a GSoC 2015 project.

Submitted by: Tiwei Bie <btw@mail.ustc.edu.cn>
Reviewed by: hiren, gnn
Differential Revision: https://reviews.freebsd.org/D3423

8 years agoRemove obsolete API (SIOCGDRLST_IN6 and SIOCGPRLST_IN6) support.
hrs [Mon, 24 Aug 2015 05:28:23 +0000 (05:28 +0000)]
Remove obsolete API (SIOCGDRLST_IN6 and SIOCGPRLST_IN6) support.

8 years ago- Deprecate IN6_IFF_NODAD. It was used to prevent DAD on a loopback
hrs [Mon, 24 Aug 2015 05:21:49 +0000 (05:21 +0000)]
- Deprecate IN6_IFF_NODAD.  It was used to prevent DAD on a loopback
  interface but in6if_do_dad() already had a check for IFF_LOOPBACK.

- Remove in6if_do_dad() check in in6_broadcast_ifa().  An address
  which needs DAD always has IN6_IFF_TENTATIVE there.

- in6if_do_dad() now returns EAGAIN when the interface is not ready
  since DAD callout handler ignores such an interface.

- In DAD callout handler, mark an address as IN6_IFF_TENTATIVE
  when the interface has ND6_IFF_IFDISABLED.  And Do IFF_UP and
  IFF_DRV_RUNNING check consistently when DAD is required.

- draft-ietf-6man-enhanced-dad is now published as RFC 7527.

- Fix some typos.

8 years agoInstead of doing an no-op (|= 0), actually clear the flags in
delphij [Mon, 24 Aug 2015 04:49:20 +0000 (04:49 +0000)]
Instead of doing an no-op (|= 0), actually clear the flags in
acl_clear_flags_np.

MFC after: 2 weeks

8 years agoFix static fdt support.
jhibbits [Mon, 24 Aug 2015 04:39:07 +0000 (04:39 +0000)]
Fix static fdt support.

FDT_DTB_STATIC is defined in opt_platform.h, and fdt_static_dtb is in
fdt_common.h, so include those files.

Sponsored by: Alex Perez/Inertial Computing

8 years agoFix spelling.
araujo [Mon, 24 Aug 2015 01:53:18 +0000 (01:53 +0000)]
Fix spelling.

Reviewed by: wblock, pfg
Approved by: bapt (mentor)
Differential Revision: D3380

8 years agoUpdate bzero(3) manpage to following the Posix Standard.
araujo [Mon, 24 Aug 2015 01:51:10 +0000 (01:51 +0000)]
Update bzero(3) manpage to following the Posix Standard.

Reviewed by: wblock, pfg
Approved by: bapt (mentor)
Differential Revision: D3380

8 years agoMake it clear that we're ignoring the return value fread(3). All
imp [Mon, 24 Aug 2015 00:34:09 +0000 (00:34 +0000)]
Make it clear that we're ignoring the return value fread(3). All
errors that might happen here will be reported a few lines down.

CID: 1295248

8 years agoWe need to add the soft float to the CFLAGS always, not just when
imp [Mon, 24 Aug 2015 00:03:51 +0000 (00:03 +0000)]
We need to add the soft float to the CFLAGS always, not just when
NO_CPUCFLAGS is not defined since it is part of the ABI as we've
defined it, not just a nice optimization.

8 years agoSparc64 is the odd-man out, so form the if that way rather than
imp [Sun, 23 Aug 2015 23:12:30 +0000 (23:12 +0000)]
Sparc64 is the odd-man out, so form the if that way rather than
listing everybody else.

8 years agoEnable KDTRACE_HOOKS by default on all armv6 kernels to get more testing.
andrew [Sun, 23 Aug 2015 21:10:20 +0000 (21:10 +0000)]
Enable KDTRACE_HOOKS by default on all armv6 kernels to get more testing.

8 years agosh: Don't create bad parse result when postponing a bad substitution error.
jilles [Sun, 23 Aug 2015 20:44:53 +0000 (20:44 +0000)]
sh: Don't create bad parse result when postponing a bad substitution error.

An invalid substitution like ${var@} does not cause a parse error but is
stored in the intermediate representation, to be written as part of the
error message. If there is a CTL* byte in the stored part, this confuses
some code such as the code to skip an unused alternative such as in
${var-alternative}.

To keep things simple, do not store CTL* bytes.

Found with afl-fuzz.

MFC after: 1 week

8 years agoUpdate svnlite(1) commit template. This makes it possible to set the
trasz [Sun, 23 Aug 2015 15:20:49 +0000 (15:20 +0000)]
Update svnlite(1) commit template.  This makes it possible to set the
"freebsd-sponsored-by" and "freebsd-mfc-after" in ~/.subversion/config,
in the "[miscellany]" section - just like you already can with
devel/subversion port/package.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoAfter r286237 it should be fine to call vgone(9) on a busy GEOM vnode;
trasz [Sun, 23 Aug 2015 14:53:54 +0000 (14:53 +0000)]
After r286237 it should be fine to call vgone(9) on a busy GEOM vnode;
remove KASSERT that would prevent forced devfs unmount from working.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoTweak the "rctl_enable" description to not give the impression
trasz [Sun, 23 Aug 2015 13:51:06 +0000 (13:51 +0000)]
Tweak the "rctl_enable" description to not give the impression
of being disabled by default.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoHandle the breakpoint instruction in userland by sending a SIGTRAP signal.
andrew [Sun, 23 Aug 2015 13:18:56 +0000 (13:18 +0000)]
Handle the breakpoint instruction in userland by sending a SIGTRAP signal.

8 years agoAlthough the website [1] says US-ASCII is accepted, ISO-8859-1 seems to
delphij [Sun, 23 Aug 2015 08:22:00 +0000 (08:22 +0000)]
Although the website [1] says US-ASCII is accepted, ISO-8859-1 seems to
be the only accepted character that is close enough to US-ASCII (and
this is also done on OpenBSD; the alternative would be to use UTF-8).

[1] http://www.denic.de/en/domains/technik/denic_whois-server/index.html

MFC after: 2 weeks

8 years agoReset the channel to the first available channel if the interface
adrian [Sun, 23 Aug 2015 01:17:52 +0000 (01:17 +0000)]
Reset the channel to the first available channel if the interface
is configured on a channel that isn't valid in the new operating mode.

This isn't strictly true - it should find the first channel that is
available for the given operating mode.

However, I think defaulting to the first channel is fine - it's typically
available for all modes.

If someone would like to correctly implement this feature - try to
find a channel that is valid for the given operating mode and error
out if we can't find one.

This prevents various NICs (eg wpi(4)) from throwing a firmware error.

Tested:

* ath(4), STA/AP mode
* iwn(4), STA/adhoc mode

PR: kern/202502
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>

8 years agoRemove cust_pkg() not that pkg_foo(1) has been removed.
imp [Sat, 22 Aug 2015 23:09:19 +0000 (23:09 +0000)]
Remove cust_pkg() not that pkg_foo(1) has been removed.

8 years agoRemove some code duplication by using biofinish().
mav [Sat, 22 Aug 2015 15:58:35 +0000 (15:58 +0000)]
Remove some code duplication by using biofinish().

Submitted by: imp
MFC after: 1 week

8 years agoMake the UMA harvesting go away completely if not wanted. Default to "not wanted".
markm [Sat, 22 Aug 2015 12:59:05 +0000 (12:59 +0000)]
Make the UMA harvesting go away completely if not wanted. Default to "not wanted".
Provide and document the RANDOM_ENABLE_UMA option.

Change RANDOM_FAST to RANDOM_UMA to clarify the harvesting.

Remove RANDOM_DEBUG option, replace with SDT probes. These will be of
use to folks measuring the harvesting effect when deciding whether to
use RANDOM_ENABLE_UMA.

Requested by: scottl and others.
Approved by: so (/dev/random blanket)
Differential Revision:    https://reviews.freebsd.org/D3197

8 years agoFix build when LEAPSECONDS is enabled.
delphij [Sat, 22 Aug 2015 07:41:28 +0000 (07:41 +0000)]
Fix build when LEAPSECONDS is enabled.

MFC after: 2 weeks

8 years agoMFV r287019: leapseconds from tzdata2015f.
delphij [Sat, 22 Aug 2015 07:40:51 +0000 (07:40 +0000)]
MFV r287019: leapseconds from tzdata2015f.

MFC after: 2 weeks

8 years agoFollow up to r287014
jhibbits [Sat, 22 Aug 2015 07:27:06 +0000 (07:27 +0000)]
Follow up to r287014

Missed these files, from the original diff.
Sponsored by: Alex Perez/Inertial Computing
Differential Revision: https://reviews.freebsd.org/D3027

8 years agoEnhance book-e pmap for 36-bit physaddr
jhibbits [Sat, 22 Aug 2015 07:20:03 +0000 (07:20 +0000)]
Enhance book-e pmap for 36-bit physaddr

Summary:
This is (probably step 1) of enhancing the book-e pmap to support the full
36-bit physical address space on Freescale e500 and e5500 cores.

Thus far it has only been regression tested on one platform.  Since I only have
one other Book-E platform (e5500), that needs work beyond this, I haven't yet
tested it on this.

Test Plan: Regression tested on my RouterBoard RB800.

Reviewed By: marcel
Differential Revision: https://reviews.freebsd.org/D3027

8 years agoCreate a RouterBoard platform and use it to create a flash map
jhibbits [Sat, 22 Aug 2015 05:50:18 +0000 (05:50 +0000)]
Create a RouterBoard platform and use it to create a flash map

Summary:
The RouterBoard uses a predefined partition map which doesn't exist in the fdt.
This change allows overriding the fdt slicer with a custom slicer, and uses this
custom slicer to define the flash map on the RouterBoard RB800.
D3305 converts the mpc85xx platform into a base class, so that systems based on
the mpc85xx platform can add their own overrides.  This change builds on D3305,
and creates a RouterBoard (RB800) platform to initialize the slicer override.

Reviewed By: nwhitehorn, imp
Differential Revision: https://reviews.freebsd.org/D3345

8 years agoMake pkill/pgrep -j ARG take jname, not just jid.
jamie [Sat, 22 Aug 2015 05:04:36 +0000 (05:04 +0000)]
Make pkill/pgrep -j ARG take jname, not just jid.

PR: 201588
Submitted by: Daniel Shahaf <danielsh at apache.org>
MFC after: 3 days

8 years agoMake the mpc85xx platform a kobj base class.
jhibbits [Sat, 22 Aug 2015 03:29:12 +0000 (03:29 +0000)]
Make the mpc85xx platform a kobj base class.

Summary:
Some systems are based around mpc85xx, but need special initialization.  By
making the mpc85xx platform a base class, these systems can be platform
subclasses, and perform board-specific initialization in addition to the mpc85xx
initialization.

Test Plan:
Tested on my RB800.  A platform class was created, and will be committed
separately.

Reviewed By: nwhitehorn
Differential Revision: https://reviews.freebsd.org/D3305

8 years agoAdd ALTQ(9) support for the CoDel algorithm.
loos [Fri, 21 Aug 2015 22:02:22 +0000 (22:02 +0000)]
Add ALTQ(9) support for the CoDel algorithm.

CoDel is a parameterless queue discipline that handles variable bandwidth
and RTT.

It can be used as the single queue discipline on an interface or as a sub
discipline of existing queue disciplines such as PRIQ, CBQ, HFSC, FAIRQ.

Differential Revision: https://reviews.freebsd.org/D3272
Reviewd by: rpaulo, gnn (previous version)
Obtained from: pfSense
Sponsored by: Rubicon Communications (Netgate)

8 years agoWe're waiting on a struct proc *, not a struct thread *. Fix a
imp [Fri, 21 Aug 2015 21:47:29 +0000 (21:47 +0000)]
We're waiting on a struct proc *, not a struct thread *. Fix a
comment that was wrong.

8 years agoDocument bsd.compiler.mk and the variables it defines.
imp [Fri, 21 Aug 2015 19:51:27 +0000 (19:51 +0000)]
Document bsd.compiler.mk and the variables it defines.

8 years agoDocument CFLAGS_NO_SIMD.
imp [Fri, 21 Aug 2015 19:51:19 +0000 (19:51 +0000)]
Document CFLAGS_NO_SIMD.

8 years agoFix the racy xargs -P0 -n2 test added in r286289
ngie [Fri, 21 Aug 2015 18:42:57 +0000 (18:42 +0000)]
Fix the racy xargs -P0 -n2 test added in r286289

Sort the output obtained from xargs and the expected output
to ensure the end result versus the input file is stable

Differential Revision: D3432
Submitted by: Nikolai Lifanov <lifanov@mail.lifanov.com>

8 years agoDisable the -P0 test
ngie [Fri, 21 Aug 2015 17:47:17 +0000 (17:47 +0000)]
Disable the -P0 test

It's unreliable (sometimes it passes, sometimes it fails)

Reported by: Jenkins (many times over the past few weeks)

8 years agoFix typos (depreciated -> deprecated)
ngie [Fri, 21 Aug 2015 17:45:18 +0000 (17:45 +0000)]
Fix typos (depreciated -> deprecated)

8 years agoEliminate pointless assignments to rtvals[] in swap_pager_putpages().
alc [Fri, 21 Aug 2015 17:00:39 +0000 (17:00 +0000)]
Eliminate pointless assignments to rtvals[] in swap_pager_putpages().

Reviewed by: kib
Sponsored by: EMC / Isilon Storage Division

8 years agoDocument bsd.arch.inc.mk.
imp [Fri, 21 Aug 2015 16:05:56 +0000 (16:05 +0000)]
Document bsd.arch.inc.mk.

8 years agopreload_search_info: make sure mod is set
royger [Fri, 21 Aug 2015 15:57:57 +0000 (15:57 +0000)]
preload_search_info: make sure mod is set

Add a check to preload_search_info to make sure mod is set. Most of the
callers of preload_search_info don't check that the mod parameter is
set, which can cause page faults. While at it, remove some now unnecessary
checks before calling preload_search_info.

Sponsored by: Citrix Systems R&D
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D3440

8 years agoxen: allow disabling PV disks and nics
royger [Fri, 21 Aug 2015 15:53:08 +0000 (15:53 +0000)]
xen: allow disabling PV disks and nics

Introduce two new loader tunnables that can be used to disable PV disks and
PV nics at boot time. They default to 0 and should be set to 1 (or any
number different than 0) in order to disable the PV devices:

hw.xen.disable_pv_disks=1
hw.xen.disable_pv_nics=1

In /boot/loader.conf will disable both PV disks and nics.

Sponsored by: Citrix Systems R&D
Tested by: Karl Pielorz <kpielorz_lst@tdx.co.uk>
MFC after: 1 week

8 years agoMark bsd.info.mk as depreciated
bapt [Fri, 21 Aug 2015 15:30:50 +0000 (15:30 +0000)]
Mark bsd.info.mk as depreciated

8 years agovt_cpulogos: Resize all terms/windows when tearing down logos
cem [Fri, 21 Aug 2015 15:21:56 +0000 (15:21 +0000)]
vt_cpulogos: Resize all terms/windows when tearing down logos

PR: 202288 (partial)
Tested by: Jakob Alvermark
Reviewed by: ed
Approved by: markj (mentor)
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D3388