]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agohyperv/hn: Suffix NDIS offload size with NDIS version.
sephe [Mon, 10 Oct 2016 06:14:38 +0000 (06:14 +0000)]
hyperv/hn: Suffix NDIS offload size with NDIS version.

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

7 years agohyperv/hn: Generalize RSS capabilities query.
sephe [Mon, 10 Oct 2016 05:59:30 +0000 (05:59 +0000)]
hyperv/hn: Generalize RSS capabilities query.

- Support NDIS < 6.30.
- Stringent response checks.

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

7 years agohyperv/hn: Fix if_hw_tsomax setup.
sephe [Mon, 10 Oct 2016 05:50:01 +0000 (05:50 +0000)]
hyperv/hn: Fix if_hw_tsomax setup.

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

7 years agohyperv/hn: Fix checksum offload settings
sephe [Mon, 10 Oct 2016 05:41:39 +0000 (05:41 +0000)]
hyperv/hn: Fix checksum offload settings

The _correct_ way to identify the supported checksum offloading and
TSO parameters is to query OID_TCP_OFFLOAD_HARDWARE_CAPABILITIES.

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

7 years agoAdd CHIP dts into the build
manu [Mon, 10 Oct 2016 04:53:15 +0000 (04:53 +0000)]
Add CHIP dts into the build

7 years agoSet INLINE_LIMIT in the aarch64 case for gcc.
andrew [Sun, 9 Oct 2016 21:47:20 +0000 (21:47 +0000)]
Set INLINE_LIMIT in the aarch64 case for gcc.

Submitted by: andreast
MFC after: 1 week

7 years agoARM: Remove unused includes.
mmel [Sun, 9 Oct 2016 10:25:47 +0000 (10:25 +0000)]
ARM: Remove unused includes.

MFC after: 1 week

7 years agoARM: Split identify_arm_cpu() into ARMv4 and ARMv6 variant.
mmel [Sun, 9 Oct 2016 10:24:10 +0000 (10:24 +0000)]
ARM: Split identify_arm_cpu() into ARMv4 and ARMv6 variant.
On ARMv6, be more verbose about supported CPU features and/or
optional instructions.

7 years agoiwm: add missing 'Rx errors' counter incrementation.
avos [Sun, 9 Oct 2016 10:21:28 +0000 (10:21 +0000)]
iwm: add missing 'Rx errors' counter incrementation.

7 years agoFix release MSI method for ARM GIC
gonzo [Sun, 9 Oct 2016 04:37:21 +0000 (04:37 +0000)]
Fix release MSI method for ARM GIC

7 years agoFix release MSI method for NVidia Tegra PCI controller
gonzo [Sun, 9 Oct 2016 04:36:40 +0000 (04:36 +0000)]
Fix release MSI method for NVidia Tegra PCI controller

7 years agoFix MSI allocation for NVidia Tegra
gonzo [Sun, 9 Oct 2016 04:29:42 +0000 (04:29 +0000)]
Fix MSI allocation for NVidia Tegra

- Fix range check
- Due to checking found value in for(;;) condition irq after loop was
    always + 1 from actually found slot and wrong entry was marked as
    used which lead to returning slot 0 for all requests.

7 years agoFix spurious white space introduced in r301059
allanjude [Sun, 9 Oct 2016 03:20:58 +0000 (03:20 +0000)]
Fix spurious white space introduced in r301059

r301059 accidently introduced a subtle change for point to point interfaces
where an extra space is inserted before the netmask. This can cause issues
for scripts that parse ifconfig output.

Submitted by: Kevin Bowling <kevin.bowling@kev009.com>
Reviewed by: hiren
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D8199

7 years agowpi: restore frame header before submitting an mbuf to
avos [Sat, 8 Oct 2016 20:41:08 +0000 (20:41 +0000)]
wpi: restore frame header before submitting an mbuf to
ieee80211_tx_complete()

This change allows to pass packet length to rate control modules and
fixes IFCOUNTER_OBYTES calculation.

Tested with Intel 3945BG, STA mode.

7 years agoRemove the WITH_FMAKE option left over from r284464
bapt [Sat, 8 Oct 2016 19:54:01 +0000 (19:54 +0000)]
Remove the WITH_FMAKE option left over from r284464

MFC after: 3 days

7 years agosys/module.h: Unbreak MOD_DPF printf
cem [Sat, 8 Oct 2016 19:40:58 +0000 (19:40 +0000)]
sys/module.h: Unbreak MOD_DPF printf

MOD_DPF's args parameter already has parentheses around it.  This was broken 14
years ago in r91472.

Sponsored by: Dell EMC Isilon

7 years agogroff is not needed in the bootstrap tools if the system is built
bapt [Sat, 8 Oct 2016 18:57:11 +0000 (18:57 +0000)]
groff is not needed in the bootstrap tools if the system is built
WITHOUT_SHAREDOCS

MFC after: 2 weeks

7 years agoAdd multitouch support for RPi's FT5406
gonzo [Sat, 8 Oct 2016 18:19:52 +0000 (18:19 +0000)]
Add multitouch support for RPi's FT5406

- Add multitouch support (protocol B)
- Report physical size of the screen
- Switch from using busy loop to callbacks
- Enable callbacks only when there is active listener on /dev/input/eventX

Submitted by: Vladimir Kondratiev <wulf@cicgroup.ru>

7 years agoImplement EVDEV_FLAG_MT_AUTOREL flag (autorelease touchpoints)
gonzo [Sat, 8 Oct 2016 17:59:53 +0000 (17:59 +0000)]
Implement EVDEV_FLAG_MT_AUTOREL flag (autorelease touchpoints)

Automaticaly release (send ABS_MT_TRACKING_ID = -1) MT-slots
that has not been listed in current MT protocol type B report.

Slot is counted as listed if corresponding ABS_MT_SLOT event
has been sent regardless of other MT events.

Events are sent on SYN_REPORT event.

Submitted by: Vladimir Kondratiev <wulf@cicgroup.ru>

7 years agoAllow using of driver's mutex instead internal one for evdev locking.
gonzo [Sat, 8 Oct 2016 17:58:26 +0000 (17:58 +0000)]
Allow using of driver's mutex instead internal one for evdev locking.

Add new API call: evdev_register_mtx which takes lock argument that
should be used instead of internal one for evdev locking. Useful for
cases if evdev_push_event() is always called with driver's lock taken
and reduces amount of lock aquisitions. This allows to avoid LOR
between ev_open/ev_close invocations and evdev_push_event() Such LOR
can happen when ev_open/ev_close methods acquire driver lock and
evdev_push_event() is called with this lock taken.

Submitted by: Vladimir Kondratiev <wulf@cicgroup.ru>

7 years agoUpdate pci_vendors to 2016-10-03
bapt [Sat, 8 Oct 2016 17:51:15 +0000 (17:51 +0000)]
Update pci_vendors to 2016-10-03

MFC after: 3 days

7 years agoImport tzdata 2016g
bapt [Sat, 8 Oct 2016 17:46:59 +0000 (17:46 +0000)]
Import tzdata 2016g

MFC after: 3 days

7 years agoIncorporate a change from OpenBSD by millert@OpenBSD.org
bapt [Sat, 8 Oct 2016 17:46:29 +0000 (17:46 +0000)]
Incorporate a change from OpenBSD by millert@OpenBSD.org

Don't warn about valid time zone abbreviations.  POSIX
through 2000 says that an abbreviation cannot start with ':', and
cannot contain ',', '-', '+', NUL, or a digit.  POSIX from 2001
on changes this rule to say that an abbreviation can contain only
'-', '+', and alphanumeric characters from the portable character
set in the current locale.  To be portable to both sets of rules,
an abbreviation must therefore use only ASCII letters."  Adapted
from tzcode2015f.

This is needed to be able to update tzdata to a newer version

MFC after: 3 days

7 years agoAdd description for ifi_oqdrops.
kevlo [Sat, 8 Oct 2016 14:58:26 +0000 (14:58 +0000)]
Add description for ifi_oqdrops.

7 years agoIn case of removal of m_copy() the macro should remain named M_COPY()
kevlo [Sat, 8 Oct 2016 14:57:21 +0000 (14:57 +0000)]
In case of removal of m_copy() the macro should remain named M_COPY()
in ip_compat.h after r305824.  Leaving as vanilla as possible aids in
future maintenance and upgrades.

Suggested by: glebius, cy

7 years agosh: Do not import IFS's value from the environment.
jilles [Sat, 8 Oct 2016 13:40:12 +0000 (13:40 +0000)]
sh: Do not import IFS's value from the environment.

Per Austin group issue #884, always set IFS to $' \t\n'. As before, IFS will
be exported iff it was in the environment.

Most shells (e.g. bash, ksh93 and mksh) already did this. This change
improves predictability, in that scripts can simply rely on the default
value.

However, the effect on security is little, since applications should not be
calling the shell with attacker-controlled environment variable names in the
first place and other security-sensitive variables such as PATH should be
and are imported by the shell.

When using a new sh with an old (before 10.2) libc wordexp(), IFS is no
longer passed on. Otherwise, wordexp() continues to pass along IFS from the
environment per its documentation.

Discussed with: pfg
Relnotes: yes

7 years agovfs: assert empty tmp free list on unmount
mjg [Sat, 8 Oct 2016 13:38:05 +0000 (13:38 +0000)]
vfs: assert empty tmp free list on unmount

7 years agovfs: clear the tmp free list flag before taking the free vnode list lock
mjg [Sat, 8 Oct 2016 13:36:59 +0000 (13:36 +0000)]
vfs: clear the tmp free list flag before taking the free vnode list lock

Safe access is already guaranteed because of the mnt_listmx lock.

7 years agoSort SEE ALSO section sequentially.
sevan [Sat, 8 Oct 2016 12:53:23 +0000 (12:53 +0000)]
Sort SEE ALSO section sequentially.
Highlighted by mandoc -Tlint

PR: 212440
Approved by: imp
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D8192

7 years agoMinor optimizations to dTSEC glue code
jhibbits [Sat, 8 Oct 2016 05:26:45 +0000 (05:26 +0000)]
Minor optimizations to dTSEC glue code

Don't call pmap_kextract() multiple times, it wastes CPU cycles, which in a high
performance environment can be very expensive.

Inline XX_FindTracker() to allow more optimizations as well.

7 years agoAdjust copyright date. No real work was done on it until 2016.
jhibbits [Sat, 8 Oct 2016 01:18:01 +0000 (01:18 +0000)]
Adjust copyright date.  No real work was done on it until 2016.

7 years ago[net80211] extend the ieee80211_rx_stats struct to include more information.
adrian [Sat, 8 Oct 2016 01:12:29 +0000 (01:12 +0000)]
[net80211] extend the ieee80211_rx_stats struct to include more information.

There are a variety of more interesting RX statistics that we should
keep track of but we don't.  This is a starting point for adding more
information.

Specifically:

* now the RX rate information and some of the packet status is
  passed up;
* The 32 bit or 64 bit TSF is passed up;
* the PHY mode is passed up;
* the "I'm decap'ed AMSDU!" state is passed up;
* number of RX chains is bumped to 4.

This is all mostly a placeholder for getting the data into the RX status
before we pass it up to net80211 - unfortunately we don't yet enforce
that drivers provide it, nor do we pass the provided info back up the
stack so anyone can use the data.

We're going to need to use some of this data moving forward.
Notably, now that some hardware can do AMSDU decap for us (the intel iwm
driver can do it when we flip it on; the ath10k port I'm doing does
it for us) then we need to pass it up through the stack so the duplicate
RX sequence numbers and crypto/IV details don't cause the packet to
be dropped and/or counted against a replay counter.

It's also the beginning of being able to do more interesting node
accounting in net80211.  Specifically, once drivers start populating
per-packet rate information, AMPDU information, timestamps, etc,
we can start providing histograms of rate-versus-RSSI, account
for receive time spent per node and other such interesting things.

(Note: I'm also hoping to include ranging and RTT information for
future chipset support; and it's likely going to include it in
this kind of fashion.)

7 years ago[ifconfig] correctly display RSSI.
adrian [Sat, 8 Oct 2016 01:00:31 +0000 (01:00 +0000)]
[ifconfig] correctly display RSSI.

7 years agoAdditional cleanup of the arp(4) man page after r306652
vangyzen [Fri, 7 Oct 2016 22:17:25 +0000 (22:17 +0000)]
Additional cleanup of the arp(4) man page after r306652

Submitted by: David A. Bright <david.a.bright@dell.com>
Requested by: wblock
Reviewed by: wblock
MFC after: 23 days
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D8183

7 years agoLock the ND prefix list and add refcounting for prefixes.
markj [Fri, 7 Oct 2016 21:10:53 +0000 (21:10 +0000)]
Lock the ND prefix list and add refcounting for prefixes.

This change extends the nd6 lock to protect the ND prefix list as well
as the list of advertising routers associated with each prefix. To handle
cases where the nd6 lock must be dropped while iterating over either the
prefix or default router lists, a generation counter is used to track
modifications to the lists. Additionally, a new mutex is used to serialize
prefix on-link/off-link transitions. This mutex must be acquired before
the nd6 lock and is held while updating the routing table in
nd6_prefix_onlink() and nd6_prefix_offlink().

Reviewed by: ae, tuexen (SCTP bits)
Tested by: Jason Wolfe <jason@llnw.com>,
Larry Rosenman <ler@lerctr.org>
MFC after: 2 months
Differential Revision: https://reviews.freebsd.org/D8125

7 years agoReduce the number of conditional statements in nd6_prefix_onlink().
markj [Fri, 7 Oct 2016 21:03:18 +0000 (21:03 +0000)]
Reduce the number of conditional statements in nd6_prefix_onlink().

MFC after: 1 week

7 years agoJust remove freeing memory in pmcstat_cleanup, since we only clean up
stevek [Fri, 7 Oct 2016 21:03:12 +0000 (21:03 +0000)]
Just remove freeing memory in pmcstat_cleanup, since we only clean up
when we are exiting anyway.

Add NULL checks for all malloc and strdup returns.

Reviewed by: gnn
Approved by: sjg (mentor)
Obtained from: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D8002

7 years agoCombine several checks in nd6_prefix_offlink() into one.
markj [Fri, 7 Oct 2016 21:02:30 +0000 (21:02 +0000)]
Combine several checks in nd6_prefix_offlink() into one.

MFC after: 1 week

7 years agoportsnap: use lam on the known good hash list
emaste [Fri, 7 Oct 2016 20:01:59 +0000 (20:01 +0000)]
portsnap: use lam on the known good hash list

This change is equivalent to the approach committed in r306417, but if
sed has a bug it could be exploited by the untrusted tar file. Instead,
generate the expected tar content and compare that with find's output.

convert the expected hash list to the expected tar content filesystem
layout, and compare that with find's output.

Submitted by: cperciva (in review D8052)
Reviewed by: oshogbo
MFC after: 2 weeks

7 years agocxgbetool: Add a loadcfg subcommand to allow a user to upload a firmware
np [Fri, 7 Oct 2016 19:13:29 +0000 (19:13 +0000)]
cxgbetool: Add a loadcfg subcommand to allow a user to upload a firmware
configuration file to the card.

7 years agomakefs: diff reduction with NetBSD
emaste [Fri, 7 Oct 2016 19:12:15 +0000 (19:12 +0000)]
makefs: diff reduction with NetBSD

Obtained from: NetBSD usr.sbin/makefs/cd9660.c 1.33

7 years agocxgbe(4): Add an ioctl to copy a firmware config file to the card's flash.
np [Fri, 7 Oct 2016 19:02:39 +0000 (19:02 +0000)]
cxgbe(4): Add an ioctl to copy a firmware config file to the card's flash.

7 years agoRestrict stdin if it's not in use.
oshogbo [Fri, 7 Oct 2016 19:02:13 +0000 (19:02 +0000)]
Restrict stdin if it's not in use.

Reviewed by: emaste, cem
Differential Revision: https://reviews.freebsd.org/D8184

7 years agoRemove the duplicated code using Capsicum helpers.
oshogbo [Fri, 7 Oct 2016 17:56:57 +0000 (17:56 +0000)]
Remove the duplicated code using Capsicum helpers.

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

7 years agoThe bootloader self relocation code was slightly wrong for the
andrew [Fri, 7 Oct 2016 16:17:51 +0000 (16:17 +0000)]
The bootloader self relocation code was slightly wrong for the
R_AARCH64_RELATIVE relocation found on arm64. It would try to add the
contents of the memory location being relocated to the base address and
the relocation addend. This worked when the contents was zero, however
this now seems to be set to the value of the addend so we add this twice.
Fix this by just setting the memory to the computed value.

Reviewed by: emaste
MFC after: 1 week
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D8177

7 years agoIn order to allow mkimg(1) (and other tools) to become a build tool
marcel [Fri, 7 Oct 2016 15:42:20 +0000 (15:42 +0000)]
In order to allow mkimg(1) (and other tools) to become a build tool
that can be compiled on various OSes (including on older versions
of FreeBSD), make it possible to have it include the partitioning
scheme definitions without pulling in FreeBSD specifics.
In particular this means:
 o  move the scheme definitions iand related defines to header files
    under sys/disk,
 o  make them (more) portable by using uint#_t (where applicable)
    and renaming defines so that they at least have a good prefix,
 o  make the new headers stand-alone so that they don't need FreeBSD
    definitions, like struct uuid(*)
 o  keep the original headers for compatibility, but rewrite them to
    get the scheme definitions from <sys/disk/$scheme.h>.

(*) since UUID/GUID type definitions are non-portable and the GPT
scheme uses them, make it possible to have the scheme definitions
use an external type by allowing consumers of the header to set
GPT_UUID_TYPE. When GPT_UUID_TYPE has not been defined, the header
will use it's own type definition, which is the same as struct uuid.
The gpt_uuid_t typedef is created to abstract the details and allows
consumers to refer to a single type.

There is not conflict between the partitioning scheme headers and
what is defined in them. All headers can be included in the same
source files.

Note: consumers of the old headers have not been changed yet. Such
will be done if and when needed/beneficial.

Reviewed by: imp, jhb
MFC after: 1 month
Sponsored by: Bracket Computing

7 years agoAdd verbosity around failed reboot(2) call.
kib [Fri, 7 Oct 2016 13:43:38 +0000 (13:43 +0000)]
Add verbosity around failed reboot(2) call.

Sponsored by: The FreeBSD Foundation
MFC after: 3 weeks

7 years agoWhen making a pause after detecting hard kill of the single-user
kib [Fri, 7 Oct 2016 13:41:28 +0000 (13:41 +0000)]
When making a pause after detecting hard kill of the single-user
shell, ensure that we do sleep for at least the specified time, in
presence of signals.

Interrupted sleep(3) is followed by _exit(), which might cause 'Going
nowhere without my init' panic if init(8) exits before the reboot(2)
really started, or before SIGTSTP stopped init(8) (both events are
initiated by the parallel reboot(8) operation).

I do not see other calls to sleep(STALL_TIMEOUT) as having the same
disasterous consequences and kept them as is until the similar change
is proven required.

Reported and tested by: Andy Farkas <chuzzwassa@gmail.com>
Sponsored by: The FreeBSD Foundation
MFC after: 3 weeks

7 years agoImprovements to BSD-licensed DTC.
emaste [Fri, 7 Oct 2016 12:57:35 +0000 (12:57 +0000)]
Improvements to BSD-licensed DTC.

- Numerous crash and bug fixes
- Improved warning and error messages
- Permit multiple labels on nodes and properties
- Fix node@address references
- Add support for /delete-node/
- Consume whitespace after a node
- Read the next token before the second /memreserve/
- Fix parsing of whitespace
- Clean up /delete-node/ and add support for /delete-property/
- Handle /delete-node/ specifying a unit address

Obtained from: https://github.com/davidchisnall/dtc @df5ede4

7 years agoLimit scope of the optimization in r306608 to dounmount() caller only.
kib [Fri, 7 Oct 2016 11:38:28 +0000 (11:38 +0000)]
Limit scope of the optimization in r306608 to dounmount() caller only.
Other uses of cache_purgevfs() do rely on the cache purge for correct
operations, when paths are invalidated without unmount.

Reported and tested by: jkim
Discussed with: mjg
Sponsored by: The FreeBSD Foundation

7 years agoimplement zfs_vptocnp() using z_parent property
avg [Fri, 7 Oct 2016 06:29:24 +0000 (06:29 +0000)]
implement zfs_vptocnp() using z_parent property

This should allow vn_fullpath() to work even when vfs name cache is
disabled for zfs, which is the case when zfs properties like
casesensitivity and normalization are set non-default values.

The new code should be 100% reliable for directories and "mostly"
reliable for files, that is, when hardlinks across directories are
not used.

Reported by: Frederic Chardon <chardon.frederic@gmail.com>
Reviewed by: kib (vfs contract)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D8146

7 years agoFix whitespace around prototypes in nd6_rtr.c.
markj [Fri, 7 Oct 2016 00:36:18 +0000 (00:36 +0000)]
Fix whitespace around prototypes in nd6_rtr.c.

MFC after: 1 week

7 years agoFix a typo.
markj [Fri, 7 Oct 2016 00:35:28 +0000 (00:35 +0000)]
Fix a typo.

MFC after: 1 week

7 years agoShorten and simplify some of the loops in pfxlist_onlink_check().
markj [Fri, 7 Oct 2016 00:34:57 +0000 (00:34 +0000)]
Shorten and simplify some of the loops in pfxlist_onlink_check().

No functional change intended.

MFC after: 1 week

7 years agoUse a const reference to prefixes in nd6_is_new_addr_neighbor().
markj [Fri, 7 Oct 2016 00:26:36 +0000 (00:26 +0000)]
Use a const reference to prefixes in nd6_is_new_addr_neighbor().

MFC after: 1 week

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