]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agoAdd support for adding up to 64 Multicast addresses with a single
davidcs [Thu, 6 Oct 2016 21:39:04 +0000 (21:39 +0000)]
Add support for adding up to 64 Multicast addresses with a single
mailbox command

MFC after:5 days

7 years agocxgbe(4): Fix whitespace in the pm_stats display.
np [Thu, 6 Oct 2016 21:25:17 +0000 (21:25 +0000)]
cxgbe(4): Fix whitespace in the pm_stats display.

7 years ago[ar531x] add default configs for AR531x ports.
adrian [Thu, 6 Oct 2016 20:37:23 +0000 (20:37 +0000)]
[ar531x] add default configs for AR531x ports.

Submitted by: Mori Hiroki <yamori813@yahoo.co.jp>
Differential Revision: https://reviews.freebsd.org/D7237

7 years agoAdd test for a musl libc memmem bug
emaste [Thu, 6 Oct 2016 20:27:40 +0000 (20:27 +0000)]
Add test for a musl libc memmem bug

With a short needle (aka little) musl's memmem could read past the end
of the haystack (aka big). This was fixed in musl commit c718f9f.

Reviewed by: ed
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D8137

7 years agolocaledef: Improve cc_list parsing
bapt [Thu, 6 Oct 2016 19:51:30 +0000 (19:51 +0000)]
localedef: Improve cc_list parsing

original commit log:
=====
I had originally suspected the parsing of ctype definition files as being
the source of the ctype flag mis-definitions, but it wasn't.  In the
process, I simplified the cc_list parsing so I'm committing the no-impact
improvement separately.  It removes some parsing redundancies and
won't parse partial range definitions anymore.
====

Submitted by: marino
Obtained from: Dragonfly
MFC after: 1 month

7 years agolocaledef: Fix ctype dump (fixed wide spread errors)
bapt [Thu, 6 Oct 2016 19:46:43 +0000 (19:46 +0000)]
localedef: Fix ctype dump (fixed wide spread errors)

This commit is from John Marino in dragonfly with the following commit log:

====
This was a CTYPE encoding error involving consecutive points of the same
ctype.  It was reported by myself to Illumos over a year ago but I was
unsure if it was only happening on BSD.  Given the cause, the bug is also
present on Illumos.

Basically, if consecutive points were of the exact same ctype, they would
be defined as a range regardless.  For example, all of these would be
considered equivalent:

  <A> ... <C>, <H>  (converts to <A> .. <H>)
  <A>, <B>, <H>     (converts to <A> .. <H>)
  <A>, <J> ... <H>  (converts to <A> .. <H>)

So all the points that shouldn't have been defined got "bridged" by the
extreme points.

The effects were recently reported to FreeBSD on PR 213013.  There are
countless places were the ctype flags are misdefined, so this is a major
fix that has to be MFC'd.
====

This reveals a bad change I did on the testsuite: while 0x07FF is a valid
unicode it is not used yet (reserved for future use)

PR: 213013
Submitted by: marino@
Reported by: Kurtis Rader <krader@skepticism.us>
Obtained from: Dragonfly
MFC after: 1 month

7 years agovrefl: Assert that the interlock is held.
bdrewery [Thu, 6 Oct 2016 18:10:19 +0000 (18:10 +0000)]
vrefl: Assert that the interlock is held.

Sponsored by: Dell EMC Isilon
MFC after: 2 weeks

7 years agoAdd vrecyclel() to vrecycle() a vnode with the interlock already held.
bdrewery [Thu, 6 Oct 2016 18:09:22 +0000 (18:09 +0000)]
Add vrecyclel() to vrecycle() a vnode with the interlock already held.

Obtained from: OneFS
Sponsored by: Dell EMC Isilon
MFC after: 2 weeks

7 years agoAdd link for vrefl(9).
bdrewery [Thu, 6 Oct 2016 18:05:25 +0000 (18:05 +0000)]
Add link for vrefl(9).

Sponsored by: Dell EMC Isilon
MFC after: 1 week

7 years agoMove netmap selinfo.h in to sensible location.
sbruno [Thu, 6 Oct 2016 17:54:34 +0000 (17:54 +0000)]
Move netmap selinfo.h in to sensible location.

netmap_kern.h currently requires all drivers including it to include
selinfo.h.

Submitted by: mmacy@nextbsd.org
Reviewed by: gnn
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D5334

7 years agoImprove grammar.
bdrewery [Thu, 6 Oct 2016 17:35:50 +0000 (17:35 +0000)]
Improve grammar.

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoRemove "long" variables from the TCP stack (not including the modular
jtl [Thu, 6 Oct 2016 16:28:34 +0000 (16:28 +0000)]
Remove "long" variables from the TCP stack (not including the modular
congestion control framework).

Reviewed by: gnn, lstewart (partial)
Sponsored by: Juniper Networks, Netflix
Differential Revision: (multiple)
Tested by: Limelight, Netflix

7 years agoIf the new window size is less than the old window size, skip the
jtl [Thu, 6 Oct 2016 16:09:45 +0000 (16:09 +0000)]
If the new window size is less than the old window size, skip the
calculations to check if we should advertise a larger window.

Reviewed by: gnn
MFC after: 2 weeks
Sponsored by: Juniper Networks, Netflix
Differential Revision: https://reviews.freebsd.org/D7076
Tested by: Limelight, Netflix

7 years agoCorrectly calculate snd_max in persist case.
jtl [Thu, 6 Oct 2016 16:00:48 +0000 (16:00 +0000)]
Correctly calculate snd_max in persist case.

In the persist case, take the SYN and FIN flags into account when updating
the sequence space sent.

Reviewed by: gnn
MFC after: 2 weeks
Sponsored by: Juniper Networks, Netflix
Differential Revision: https://reviews.freebsd.org/D7075
Tested by: Limelight, Netflix

7 years agoRemove declaration of un-defined function tcp_seq_subtract().
jtl [Thu, 6 Oct 2016 15:57:15 +0000 (15:57 +0000)]
Remove declaration of un-defined function tcp_seq_subtract().

Reviewed by: gnn
MFC after: 1 week
Sponsored by: Juniper Networks, Netflix
Differential Revision: https://reviews.freebsd.org/D7055

7 years agoFix possible geom destruction before final provider close.
mav [Thu, 6 Oct 2016 15:20:05 +0000 (15:20 +0000)]
Fix possible geom destruction before final provider close.

Introduce internal counter to track opens.  Using provider's counters is
not very successfull after calling g_wither_provider().

MFC after: 2 weeks
Sponsored by: iXsystems, Inc.

7 years agowrite(1): Capsicumify
cem [Thu, 6 Oct 2016 14:55:15 +0000 (14:55 +0000)]
write(1): Capsicumify

Enter Capsicum capability sandbox pretty early in this setuid program.

Some minor modifications were needed to cache directory fds and use
relative lookups.

Rights restriction of the stdio descriptors is unfortunately pretty messy
because we need an ioctl capability not present in the current libcapsicum
helpers (FIODGNAME).

Reviewed by: ed
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D7999

7 years agoReplace rw_init/rw_destroy with corresponding macros.
ae [Thu, 6 Oct 2016 14:42:06 +0000 (14:42 +0000)]
Replace rw_init/rw_destroy with corresponding macros.

Obtained from: Yandex LLC

7 years agoARM: Remove ARMv4 #defines from busdma_machdep-v6.c, it's ARMv6
mmel [Thu, 6 Oct 2016 13:53:17 +0000 (13:53 +0000)]
ARM: Remove ARMv4 #defines from busdma_machdep-v6.c, it's ARMv6
specific file. Consistently use BUSDMA_DCACHE_ALIGN for cache
line alignment.

MFC after: 1 week

7 years agolocate: ANSIfy
emaste [Thu, 6 Oct 2016 13:37:46 +0000 (13:37 +0000)]
locate: ANSIfy

7 years agologin: fix capitalization in errx messages
emaste [Thu, 6 Oct 2016 13:21:42 +0000 (13:21 +0000)]
login: fix capitalization in errx messages

Reported by: bde

7 years agoARM: SEV/WFE instructions are implemented starting from ARMv6K,
mmel [Thu, 6 Oct 2016 13:18:18 +0000 (13:18 +0000)]
ARM: SEV/WFE instructions are implemented starting from ARMv6K,
use it directly.

MFC after: 1 week

7 years agoARM: Add identifiers for ARM Cortex v8 and Marvell Sheeva v7 cores.
mmel [Thu, 6 Oct 2016 12:01:10 +0000 (12:01 +0000)]
ARM: Add identifiers for ARM Cortex v8 and Marvell Sheeva v7 cores.
Not a functional change.

MFC after: 3 days

7 years agoARM: Remove unused variable.
mmel [Thu, 6 Oct 2016 11:54:42 +0000 (11:54 +0000)]
ARM: Remove unused variable.
Not a functional change.

MFC after: 3 days

7 years agosavecore(8): Fix buffer overrun inspecting disks with varying sector size
cem [Thu, 6 Oct 2016 05:16:44 +0000 (05:16 +0000)]
savecore(8): Fix buffer overrun inspecting disks with varying sector size

A premature optimization lead to caching a native-sector sized memory
allocation.  If the program examined a 512 byte sector disk, then a 4096
byte sector disk, the program would overrun the cached 512 byte buffer.

Just remove the optimization to fix the bug.  This was introduced with the 4Kn
dump support in r298076.

Reported by: markj
Reviewed by: markj, rpokala
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D8162

7 years agoDisable loop unrolling in skein for sys/boot
allanjude [Thu, 6 Oct 2016 03:32:30 +0000 (03:32 +0000)]
Disable loop unrolling in skein for sys/boot

When tsoome@ added skein support to the ZFS boot code and zfsloader, it
resulted in an explosion in code size, running close to a number of
limits.

The default for the C version of skein is to unroll all loops for
skein-256 and 512

Disabling the loop unrolling saves 20-28kb from each binary
boot1.efi
gptzfsboot
loader.efi
userboot.so
zfsloader

Reviewed by: emaste, tsoome
Sponsored by: ScaleEngine Inc.
Differential Revision: https://reviews.freebsd.org/D7826

7 years agostyle(9): Some additional clarification
cem [Thu, 6 Oct 2016 01:52:00 +0000 (01:52 +0000)]
style(9): Some additional clarification

Prompted by an email from bde@.

Reviewed by: emaste, imp (earlier version)
With input from: wblock
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D7983

7 years agoFix ABI compat shims, broken by adding NVMe support.
mav [Thu, 6 Oct 2016 01:14:10 +0000 (01:14 +0000)]
Fix ABI compat shims, broken by adding NVMe support.

MFC after: 1 week

7 years agoFix extended buttons support on synaptic clickpad
gonzo [Thu, 6 Oct 2016 01:01:00 +0000 (01:01 +0000)]
Fix extended buttons support on synaptic clickpad

Fix regression introduced by r306355 on synaptic clickpads with
extended buttons (buttons stopped working)

PR: 205690
Submitted by: Vladimir Kondratyev <wulf@cicgroup.ru>

7 years agoRemove an alias if_list, use if_link consistently.
kevlo [Thu, 6 Oct 2016 00:51:27 +0000 (00:51 +0000)]
Remove an alias if_list, use if_link consistently.

Reviewed by: tuexen
Differential Revision: https://reviews.freebsd.org/D8075

7 years agogmirror: Write an updated syncid before queuing writes.
markj [Thu, 6 Oct 2016 00:13:55 +0000 (00:13 +0000)]
gmirror: Write an updated syncid before queuing writes.

When a syncid bump is pending, any write to the mirror results in the
updated syncid being written to each component's metadata block. However,
the update was only being performed after the writes to the mirror
componenents were queued. Instead, synchronously update the metadata block
first.

MFC after: 3 weeks
Sponsored by: Dell EMC Isilon

7 years agogmirror: Bump the syncid if broken disks are found during startup.
markj [Thu, 6 Oct 2016 00:05:45 +0000 (00:05 +0000)]
gmirror: Bump the syncid if broken disks are found during startup.

Consider a mirror with two components, m1 and m2. Suppose a hardware error
results in the removal of m2, with m1's genid bumped. Suppose further that
a replacement mirror component m3 is created and synchronized, after which
the system is shut down uncleanly. During a subsequent bootup, if gmirror
tastes m1 and m2 first, m2 will be removed from the mirror because it is
broken, but the mirror will be started without bumping the syncid on m1
because all elements of the mirror are accounted for. Then m3 will be
added to the already-running mirror with the same syncid as m1, so the
components will not be synchronized despite the unclean shutdown.

Handle this scenario by bumping the syncid of healthy components if any
broken mirrors are discovered during mirror startup.

MFC after: 3 weeks
Sponsored by: Dell EMC Isilon

7 years agogmirror: Use bool instead of boolean_t.
markj [Wed, 5 Oct 2016 23:55:01 +0000 (23:55 +0000)]
gmirror: Use bool instead of boolean_t.

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agovfs_bio: Remove a leading space (style)
cem [Wed, 5 Oct 2016 23:42:02 +0000 (23:42 +0000)]
vfs_bio: Remove a leading space (style)

Introduced in r282085.

Sponsored by: Dell EMC Isilon

7 years agogroff: use changelog date rather than file modification date in man pages
emaste [Wed, 5 Oct 2016 23:25:29 +0000 (23:25 +0000)]
groff: use changelog date rather than file modification date in man pages

The source checkout date is not particularly relevant, and this makes
groff man pages build reproducibly.

Reviewed by: bapt
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D8158

7 years agoAdd history section to nos-tun(8)
sevan [Wed, 5 Oct 2016 20:45:21 +0000 (20:45 +0000)]
Add history section to nos-tun(8)

PR: 212545
Approved by: bcr (mentor)
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D8104

7 years agoAdd history section to natd(8)
sevan [Wed, 5 Oct 2016 20:42:35 +0000 (20:42 +0000)]
Add history section to natd(8)
Fix back sentence raised by igor.

PR: 212544
Approved by: bcr (mentor)
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D8104

7 years agoAdd history section to fsck_ffs(8)
sevan [Wed, 5 Oct 2016 20:38:49 +0000 (20:38 +0000)]
Add history section to fsck_ffs(8)
Move sentence to a new line as advised by igor.

PR: 212474
Approved by: bcr (mentor)
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D8104

7 years agoAdd history section to fsck(8)
sevan [Wed, 5 Oct 2016 20:31:44 +0000 (20:31 +0000)]
Add history section to fsck(8)

PR: 212472
Approved by: bcr (mentor)
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D8104

7 years agoDocument the history of fdisk based on the original post to comp.unix.bsd by Julian...
sevan [Wed, 5 Oct 2016 20:28:04 +0000 (20:28 +0000)]
Document the history of fdisk based on the original post to comp.unix.bsd by Julian Elischer [1] and the Mach 2.5 Installation notes [2].
I was unable to pin point the exact version of Mach the fdisk utility appeared as I could not find documentation older than version 2.5 & no source code or repo history.
fdisk utility appears as a separate utility[3] in v2.5. Due to this, I have avoided stating the exact version fdisk first appeared in Mach.
Add authors section.

[1] https://groups.google.com/d/topic/comp.unix.bsd/Hhi45vAHxDg/discussion
[2] ftp://ftp.mcs.vuw.ac.nz/doc/misc/mach-i386-doc/i386_install.ps
[3] ftp://ftp.mcs.vuw.ac.nz/doc/misc/mach-i386-doc/i386_manpages.ps

PR: 212470
Approved by: bcr (mentor)
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D8104

7 years agoDocument the history of fdisk based on the original post to comp.unix.bsd by Julian...
sevan [Wed, 5 Oct 2016 20:21:06 +0000 (20:21 +0000)]
Document the history of fdisk based on the original post to comp.unix.bsd by Julian Elischer [1] and the Mach 2.5 Installation notes [2].
I was unable to pin point the exact version of Mach the fdisk utility appeared as I could not find documentation older than version 2.5 & no source code or repo history.
fdisk utility appears as a separate utility[3] in v2.5. Due to this, I have avoided stating the exact version fdisk first appeared in Mach.
Add authors section.
Make correction pointed by igor
[1] https://groups.google.com/d/topic/comp.unix.bsd/Hhi45vAHxDg/discussion
[2] ftp://ftp.mcs.vuw.ac.nz/doc/misc/mach-i386-doc/i386_install.ps
[3] ftp://ftp.mcs.vuw.ac.nz/doc/misc/mach-i386-doc/i386_manpages.ps
PR: 212469
Approved by: bcr (mentor)
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D8104

7 years agoRegen src.conf.5 after r306649
emaste [Wed, 5 Oct 2016 20:18:17 +0000 (20:18 +0000)]
Regen src.conf.5 after r306649

Sponsored by: The FreeBSD Foundation

7 years agomakeman: avoid bogus output with duplicated options
emaste [Wed, 5 Oct 2016 20:12:00 +0000 (20:12 +0000)]
makeman: avoid bogus output with duplicated options

On some targets 'make showconfig' currently reports both 'no' and 'yes'
for some options. For example:

% make TARGET=mips showconfig | grep SSP
MK_SSP           = no
MK_SSP           = yes

Emit a warning on encountering a duplicated variable, and skip the
second entry.

Sponsored by: The FreeBSD Foundation

7 years agoAdd history section for devfs(8)
sevan [Wed, 5 Oct 2016 20:08:07 +0000 (20:08 +0000)]
Add history section for devfs(8)
Move sentence to a new line as advised by igor.

PR: 212441
Approved by: bcr (mentor)
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D8104

7 years agoAdd history section for devd(8)
sevan [Wed, 5 Oct 2016 20:04:36 +0000 (20:04 +0000)]
Add history section for devd(8)
Move sentence to a new line as advised by igor

PR: 212439
Approved by: bcr (mentor)
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D8104

7 years agoAdd man pages for Capsicum helpers.
oshogbo [Wed, 5 Oct 2016 20:02:34 +0000 (20:02 +0000)]
Add man pages for Capsicum helpers.

Reviewed by: cem
Differential Revision: https://reviews.freebsd.org/D8154

7 years agoAdd history section for clri(8)
sevan [Wed, 5 Oct 2016 20:01:09 +0000 (20:01 +0000)]
Add history section for clri(8)
http://minnie.tuhs.org/cgi-bin/utree.pl?file=V6/usr/man/man8/clri.8

PR: 212438
Approved by: bcr (mentor)
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D8104

7 years agoAdd history section for bsdlabel(8)
sevan [Wed, 5 Oct 2016 19:56:10 +0000 (19:56 +0000)]
Add history section for bsdlabel(8)
http://minnie.tuhs.org/cgi-bin/utree.pl?file=4.3BSD-Tahoe/usr/man/cat8/disklabel.0
Remove tab after space, highlighted by igor

PR: 212436
Approved by: bcr (mentor)
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D8104

7 years agoAdd history section for atmconfig(8)
sevan [Wed, 5 Oct 2016 19:49:48 +0000 (19:49 +0000)]
Add history section for atmconfig(8)

PR: 212415
Approved by: bcr (mentor)
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D8104

7 years agoAdd history section for test(1)
sevan [Wed, 5 Oct 2016 19:47:02 +0000 (19:47 +0000)]
Add history section for test(1)
http://minnie.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/cmd/test.c

PR: 211789
Approved by: bcr (mentor)
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D8104

7 years agoAdd history section for stty(1)
sevan [Wed, 5 Oct 2016 19:37:46 +0000 (19:37 +0000)]
Add history section for stty(1)
http://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man1/stty.1

PR: 211788
Approved by: bcr (mentor)
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D8104

7 years agoAdd history section of pwd(1)
sevan [Wed, 5 Oct 2016 19:31:29 +0000 (19:31 +0000)]
Add history section of pwd(1)
http://minnie.tuhs.org/cgi-bin/utree.pl?file=V5/usr/source/s2/pwd.c

PR: 211787
Approved by: bcr (mentor)
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D8104

7 years agoDocument origins of expr & authors
sevan [Wed, 5 Oct 2016 19:26:35 +0000 (19:26 +0000)]
Document origins of expr & authors
http://minnie.tuhs.org/cgi-bin/utree.pl?file=PWB1/usr/man/man1/expr.1

PR: 173979
Approved by: bcr (mentor)
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D8104

7 years agoAdd history section for echo(1)
sevan [Wed, 5 Oct 2016 19:16:55 +0000 (19:16 +0000)]
Add history section for echo(1)
Sourced using the draft copy of the second edition manual
http://www.tuhs.org/Archive/PDP-11/Distributions/research/1972_stuff/unix_2nd_edition_manual.pdf

PR: 211785
Approved by: bcr (mentor)
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D8104

7 years agoif_cpsw overhaul:
loos [Wed, 5 Oct 2016 19:09:27 +0000 (19:09 +0000)]
if_cpsw overhaul:

- Fix RX and TX teardown:
  . TX teardown would not reclaim the abandoned descriptors;
  . Interrupt storms in RX teardown;
  . Fixed the acknowledge of the teardown completion interrupt.

- Remove temporary lists for the descriptors;

- Simplified the descriptor handling (less writes and reads from
  descriptors where possible);

- Better debug;

- Add support for the RX threshold interrupts:
  With interrupt moderation only, an RX overrun is likely to happen.  The
  RX threshold is set to trigger a non paced interrupt everytime your RX
  free buffers are under the minimum threshold, helping to prevent the rx
  overrun.

The NIC now survive when pushed over its limits (where previously it would
lock up in a few seconds).

uFW (600MHz SoC) can now forward up to 560Mb/s of UDP traffic (netmap
pkt-gen as source and sink).  TCP forwarding rate is over 350Mb/s.

No difference (other than CPU use) was seen on Beaglebone black (1GHz SoC)
for his fast ethernet.

Tested on: uFW, BBB
Sponsored by: Rubicon Communications, LLC (Netgate)

7 years agoAdd man page for dnvlist.
oshogbo [Wed, 5 Oct 2016 19:01:00 +0000 (19:01 +0000)]
Add man page for dnvlist.

Submitted by: Adam Starak <starak.adam@gmail.com>
Reviewed by: cem, wblock

7 years agoAdd history section for dd(1)
sevan [Wed, 5 Oct 2016 18:38:38 +0000 (18:38 +0000)]
Add history section for dd(1)
First version of UNIX to include dd found using TUHS
http://minnie.tuhs.org/cgi-bin/utree.pl?file=V5/usr/source/s1/dd.c

PR: 211777
Approved by: bcr (mentor)
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D8104

7 years agoDocument where chio(1) originated from & which version of FreeBSD first included it.
sevan [Wed, 5 Oct 2016 18:26:39 +0000 (18:26 +0000)]
Document where chio(1) originated from & which version of FreeBSD first included it.

PR: 211776
Approved by: bcr (mentor)
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D8104

7 years agoMake the page daemon's notion of what kind of pass is being performed
alc [Wed, 5 Oct 2016 17:32:06 +0000 (17:32 +0000)]
Make the page daemon's notion of what kind of pass is being performed
by vm_pageout_scan() local to vm_pageout_worker().  There is no reason
to store the pass in the NUMA domain structure.

Reviewed by: kib
MFC after: 3 weeks

7 years agoCAM ccbq sanity: checks on insert and remove
markj [Wed, 5 Oct 2016 17:18:24 +0000 (17:18 +0000)]
CAM ccbq sanity: checks on insert and remove

KASSERT in cam_ccbq_insert_ccb that only XPT_FC_QUEUED ops are queued,
and XPT_FC_USER_CCB ops are not. Otherwise cam_ccbq_ccb_done may be
skipped.

Bounds check the index used for camq_remove in order to panic instead
of scribble on removal of an out-of-bounds index (e.g. consider the
effect of camq_remove of CAM_UNQUEUED_INDEX).

KASSERT in cam_ccbq_remove_ccb that the ccb removed by index was the
one sought.

Submitted by: Ryan Libby <rlibby@gmail.com>
Reviewed by: imp, mav
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D8151

7 years agolibm: remove unused variables
emaste [Wed, 5 Oct 2016 17:04:58 +0000 (17:04 +0000)]
libm: remove unused variables

Sponsored by: The FreeBSD Foundation

7 years agoabort in srandomdev if kern.arandom sysctl fails
emaste [Wed, 5 Oct 2016 17:03:22 +0000 (17:03 +0000)]
abort in srandomdev if kern.arandom sysctl fails

The sysctl cannot fail. If it does fail on some FreeBSD derivative or
after some future change, just abort() so that the problem will be found
and fixed.

While abort() is not normally suitable for a library, it makes sense
here.

This is akin to r306636 for arc4random.

Reviewed by: ed
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D8077

7 years agoFix naming in Casper man page.
oshogbo [Wed, 5 Oct 2016 16:23:02 +0000 (16:23 +0000)]
Fix naming in Casper man page.

7 years agoChange vm_pageout_scan() to return a value indicating whether the free page
alc [Wed, 5 Oct 2016 16:15:26 +0000 (16:15 +0000)]
Change vm_pageout_scan() to return a value indicating whether the free page
target was met.

Previously, vm_pageout_worker() itself checked the length of the free page
queues to determine whether vm_pageout_scan(pass >= 1)'s inactive queue scan
freed enough pages to meet the free page target.  Specifically,
vm_pageout_worker() used vm_paging_needed().  The trouble with
vm_paging_needed() is that it compares the length of the free page queues to
the wakeup threshold for the page daemon, which is much lower than the free
page target.  Consequently, vm_pageout_worker() could conclude that the
inactive queue scan succeeded in meeting its free page target when in fact
it did not; and rather than immediately triggering an all-out laundering
pass over the inactive queue, vm_pageout_worker() would go back to sleep
waiting for the free page count to fall below the page daemon wakeup
threshold again, at which point it will perform another limited (pass == 1)
scan over the inactive queue.

Changing vm_pageout_worker() to use vm_page_count_target() instead of
vm_paging_needed() won't work because any page allocations that happen
concurrently with the inactive queue scan will result in the free page count
being below the target at the end of a successful scan.  Instead, having
vm_pageout_scan() return a value indicating success or failure is the most
straightforward fix.

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

7 years agoWe don't use cpu_control on armv6, remove the macro there.
andrew [Wed, 5 Oct 2016 14:00:05 +0000 (14:00 +0000)]
We don't use cpu_control on armv6, remove the macro there.

7 years agoARM: Remove next bunch of unused cpu_functions from ARMv6.
mmel [Wed, 5 Oct 2016 12:19:09 +0000 (12:19 +0000)]
ARM: Remove next bunch of unused cpu_functions from ARMv6.

7 years agoARM: Disconnect elf_trampoline.c from ARMv6 build.
mmel [Wed, 5 Oct 2016 12:17:43 +0000 (12:17 +0000)]
ARM: Disconnect elf_trampoline.c from ARMv6 build.
The trampoline code never functioned properly for Cortex CPUs,
and its functionality is already provided by ubldr.

7 years agoFix e500mc/derivatives cpu idle
jhibbits [Wed, 5 Oct 2016 04:40:48 +0000 (04:40 +0000)]
Fix e500mc/derivatives cpu idle

Setting the doze registers wasn't actually working, and was being masked by a
bad #ifdef.  Since the #ifdef was fixed, now e500mc-based SoCs hang at idle.
Fix this by using the intended wait.

MFC after: 1 week

7 years agoDo not retry on some security sense codes.
mav [Wed, 5 Oct 2016 00:45:58 +0000 (00:45 +0000)]
Do not retry on some security sense codes.

MFC after: 1 week

7 years agoMake 502.pfdenied find blacklistd/* filter names dynamically
lidl [Tue, 4 Oct 2016 23:12:35 +0000 (23:12 +0000)]
Make 502.pfdenied find blacklistd/* filter names dynamically

This change is needed to make the 520.pfdenied script find the new
blacklistd/* anchor points for reporting blocked traffic.

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

7 years agoMake blacklist-helper commands emit a message when successful
lidl [Tue, 4 Oct 2016 23:10:43 +0000 (23:10 +0000)]
Make blacklist-helper commands emit a message when successful

The blacklistd daemon expects to see a message on stdout, instead
of just relying on the exit value from any invoked programs.

Change the pf filtering to create multiple filters, attached under
a the "blacklist/*" anchor point.  This prevents the filtering for
each port's filtering rule from overwriting the previously installed
filtering rule.  Check for an existing filtering rule for each port,
so the installation of a given filtering rule only happens once.
Reinstalling the same rule resets the counters for the pf rule, and
we don't want that.

Reported by: David Horn (dhorn2000 at gmail.com)
Reviewed by: emaste
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D8081

7 years agoMFV: r306687
jkim [Tue, 4 Oct 2016 22:22:32 +0000 (22:22 +0000)]
MFV: r306687

Merge byacc 20160606.

7 years agoCorrect some comments after r294299.
bdrewery [Tue, 4 Oct 2016 21:44:20 +0000 (21:44 +0000)]
Correct some comments after r294299.

Sponsored by: Dell EMC Isilon

7 years agoMerge ACPICA 20160930.
jkim [Tue, 4 Oct 2016 20:27:15 +0000 (20:27 +0000)]
Merge ACPICA 20160930.

7 years agopf: remove fastroute tag
kp [Tue, 4 Oct 2016 19:35:14 +0000 (19:35 +0000)]
pf: remove fastroute tag

The tag fastroute came from ipf and was removed in OpenBSD in 2011. The code
allows to skip the in pfil hooks and completely removes the out pfil invoke,
albeit looking up a route that the IP stack will likely find on its own.
The code between IPv4 and IPv6 is also inconsistent and marked as "XXX"
for years.

Submitted by: Franco Fichtner <franco@opnsense.org>
Differential Revision: https://reviews.freebsd.org/D8058

7 years agoANSIfy inflate.c
emaste [Tue, 4 Oct 2016 17:57:30 +0000 (17:57 +0000)]
ANSIfy inflate.c

Reviewed by: kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D8143

7 years agoRe-apply r306516 (by cem):
kib [Tue, 4 Oct 2016 17:01:24 +0000 (17:01 +0000)]
Re-apply r306516 (by cem):

Reduce the cost of TLB invalidation on x86 by using per-CPU completion flags

Reduce contention during TLB invalidation operations by using a per-CPU
completion flag, rather than a single atomically-updated variable.

On a Westmere system (2 sockets x 4 cores x 1 threads), dtrace measurements
show that smp_tlb_shootdown is about 50% faster with this patch; observations
with VTune show that the percentage of time spent in invlrng_single_page on an
interrupt (actually doing invalidation, rather than synchronization) increases
from 31% with the old mechanism to 71% with the new one.  (Running a basic file
server workload.)

Submitted by: Anton Rang <rang at acm.org>
Reviewed by: cem (earlier version)
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D8041

7 years agoFix indentation.
glebius [Tue, 4 Oct 2016 16:44:40 +0000 (16:44 +0000)]
Fix indentation.

CID: 1363671

7 years ago[geom_redboot] Extend geom_redboot to handle non-zero fis offset.
adrian [Tue, 4 Oct 2016 16:35:38 +0000 (16:35 +0000)]
[geom_redboot] Extend geom_redboot to handle non-zero fis offset.

Submitted by: Mori Hiroki <yamori813@yahoo.co.jp>
Differential Revision: https://reviews.freebsd.org/D7237

7 years agoGELIBoot may attempt to read past the end of the disk
allanjude [Tue, 4 Oct 2016 16:33:03 +0000 (16:33 +0000)]
GELIBoot may attempt to read past the end of the disk

Usually there is some slack after the last partition due to 4k alignment
In the 10.3 EC2 images, there was not. EC2 seems to hang if you try to
read past the end of the disk in the loader, resulting in an unbootable
instance after upgrading to 11.0

PR: 213196
Reported by: Peter Ankerstal <peter@pean.org>
Tested by: cperciva
Reviewed by: tsoome
MFC after: 3 days
Sponsored by: ScaleEngine Inc.
Differential Revision: https://reviews.freebsd.org/D8144

7 years agoAdd AR531x port options.
adrian [Tue, 4 Oct 2016 16:29:26 +0000 (16:29 +0000)]
Add AR531x port options.

Submitted by: Mori Hiroki <yamori813@yahoo.co.jp>
Differential Revision: https://reviews.freebsd.org/D7237

7 years ago[ar531x] add initial port for the AR231x/531x series of SoCs.
adrian [Tue, 4 Oct 2016 16:27:36 +0000 (16:27 +0000)]
[ar531x] add initial port for the AR231x/531x series of SoCs.

These are older MIPS4kc parts from Atheros.  They typically ran at
sub-200MHz and have 11bg, 11a, or 11abg wifi MAC/PHYs integrated.

This port is the initial non-wifi pieces required to bring up the
chip.  I'll commit the redboot and other pieces later, and then
hopefully(!) wifi support will follow.

Submitted by:   Mori Hiroki <yamori813@yahoo.co.jp>
Differential Revision:  https://reviews.freebsd.org/D7237

7 years agoStyle.
kib [Tue, 4 Oct 2016 15:23:03 +0000 (15:23 +0000)]
Style.

Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
MFC after: 3 days

7 years agolibcapsicum: limit stderr
oshogbo [Tue, 4 Oct 2016 13:33:43 +0000 (13:33 +0000)]
libcapsicum: limit stderr

Don't limit stdout twice, instead limit stderr.

Pointed out by: rpokala@

7 years agoSplit CPU_CORTEXA into CPU_CORTEXA8, for the Cortex-A8, and CPU_CORTEXA_MP,
andrew [Tue, 4 Oct 2016 12:25:44 +0000 (12:25 +0000)]
Split CPU_CORTEXA into CPU_CORTEXA8, for the Cortex-A8, and CPU_CORTEXA_MP,
for later Cortex-A CPUs that support the Multiprocessor Extensions. This
will be needed to support both in a single GENERIC kernel while still
being able to only build for a single SoC.

Reviewed by: mmel
Relnotes: yes
Sponsored by: ABT Systems Ltd
Differential Revision: https://reviews.freebsd.org/D8138

7 years agoRead the Multiprocessing Extensions bit from the Multiprocessor Affinity
andrew [Tue, 4 Oct 2016 12:01:08 +0000 (12:01 +0000)]
Read the Multiprocessing Extensions bit from the Multiprocessor Affinity
register.

Sponsored by: ABT Systems Ltd
X-Differential Revision: https://reviews.freebsd.org/D8092

7 years agoMFV r306669:
mm [Tue, 4 Oct 2016 11:56:46 +0000 (11:56 +0000)]
MFV r306669:
Sync libarchive with vendor including security fixes.

Important vendor bugfixes (relevant to FreeBSD):
#747: Out of bounds read in mtree parser
#761: heap-based buffer overflow in read_Header (7-zip)
#784: Invalid file on bsdtar command line results in internal errors (1)

PR: 213092 (1)
MFC after: 1 week

7 years agoUpdate vendor/libarchive to git 024be27d1b299c030e8841bed3002ee07ba9eedc
mm [Tue, 4 Oct 2016 11:44:21 +0000 (11:44 +0000)]
Update vendor/libarchive to git 024be27d1b299c030e8841bed3002ee07ba9eedc

Important vendor bugfixes (relevant to FreeBSD):
#747: Out of bounds read in mtree parser
#761: heap-based buffer overflow in read_Header (7-zip)
#784: Invalid file on bsdtar command line results in internal errors (1)

PR: 213092 (1)
Obtained from: https://github.com/libarchive/libarchive

7 years agoARM: Add mising early clobber modifier in atomic_swap_32().
mmel [Tue, 4 Oct 2016 09:59:37 +0000 (09:59 +0000)]
ARM: Add mising early clobber modifier in atomic_swap_32().

MFC after: 2 weeks

7 years agoARM: Add atomic_swap_64(). It's need by linuxkpi and drm-next-4.7.
mmel [Tue, 4 Oct 2016 09:51:54 +0000 (09:51 +0000)]
ARM: Add atomic_swap_64(). It's need by linuxkpi and drm-next-4.7.

MFC after: 2 weeks

7 years agoTEGRA: Fix PCIe link timeout.
mmel [Tue, 4 Oct 2016 09:14:48 +0000 (09:14 +0000)]
TEGRA: Fix PCIe link timeout.

MFC after: 2 weeks

7 years agozfs: fix a wrong assertion for extended attributes
avg [Tue, 4 Oct 2016 08:09:25 +0000 (08:09 +0000)]
zfs: fix a wrong assertion for extended attributes

For the extended attributes the order between z_teardown_lock and the
vnode lock is different.
The bug was triggered only with DIAGNOSTIC turned on.
This fix is developed in cooperation with avos.

PR: 213112
Reported by: avos
Tested by: avos
MFC after: 1 week

7 years agoClear GT_CTRL_ENABLE to stop the timer.
jmcneill [Mon, 3 Oct 2016 21:42:05 +0000 (21:42 +0000)]
Clear GT_CTRL_ENABLE to stop the timer.

Reviewed by: andrew

7 years agolibcapsicum: introduce Capsicum helpers
oshogbo [Mon, 3 Oct 2016 20:48:18 +0000 (20:48 +0000)]
libcapsicum: introduce Capsicum helpers

Capsicum helpers are a set of inline functions which goal is to reduce
duplicated patterns used to Capsicumize applications.

Reviewed by: cem, AllanJude, bapt, ed, emaste
Differential Revision: https://reviews.freebsd.org/D8013

7 years agoUse the cortex functions when booting on one of the Cortex-A ARMv8 CPUs.
andrew [Mon, 3 Oct 2016 20:05:33 +0000 (20:05 +0000)]
Use the cortex functions when booting on one of the Cortex-A ARMv8 CPUs.
This list is incomplete, however we don't have the ID values for the
missing Cortex-A32 or A35.

Submitted by: loos (Cortex-A53)
Sponsored by: ABT Systems Ltd

7 years agoEnable the TX completion interrupt for the cpsw NIC to assure the free tx
loos [Mon, 3 Oct 2016 19:48:56 +0000 (19:48 +0000)]
Enable the TX completion interrupt for the cpsw NIC to assure the free tx
descriptors are reclaimed as soon as possible.

Without this the free buffers are reclaimed only on watchdog runs or after
trying to enqueue more packets.

Sponsored by: Rubicon Communications, LLC (Netgte)

7 years agoAdd Tegra TK1 DTBs to GENERIC kernel
gonzo [Mon, 3 Oct 2016 19:34:32 +0000 (19:34 +0000)]
Add Tegra TK1 DTBs to GENERIC kernel

Approved by: andrew

7 years agoUpdate arp(4) to document the net.link.ether.inet.garp_rexmit_count sysctl.
vangyzen [Mon, 3 Oct 2016 19:02:22 +0000 (19:02 +0000)]
Update arp(4) to document the net.link.ether.inet.garp_rexmit_count sysctl.

Submitted by: David A. Bright <david.a.bright@dell.com>
Requested by: markj
Reviewed by: markj, badger
MFC after: 4 weeks
X-MFC with: r306577
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D8136

7 years agoRemove setkey(), encrypt(), des_setkey() and des_cipher().
ed [Mon, 3 Oct 2016 18:20:58 +0000 (18:20 +0000)]
Remove setkey(), encrypt(), des_setkey() and des_cipher().

The setkey() and encrypt() functions are part of XSI, not the POSIX base
definitions. There is no strict requirement for us to provide these,
especially if we're only going to keep these around as undocumented
stubs. The same holds for des_setkey() and des_cipher().

Instead of providing functions that only generate warnings when linking,
simply disallow linking against them. The impact of this is relatively
low. It only causes two leaf ports to break. I'll see what I can do to
help out to get those fixed.

PR: 211626

7 years agoAdd the Cortex-A{53,57,72} ID register values. These can all run 32-bit
andrew [Mon, 3 Oct 2016 18:00:10 +0000 (18:00 +0000)]
Add the Cortex-A{53,57,72} ID register values. These can all run 32-bit
code so could run a 32-bit kernel.

Sponsored by: ABT Systems Ltd