]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agolibelftc: bump version number for r317075
emaste [Mon, 17 Apr 2017 23:57:42 +0000 (23:57 +0000)]
libelftc: bump version number for r317075

7 years agoUpdate ELF Tool Chain to upstream r3520
emaste [Mon, 17 Apr 2017 23:56:48 +0000 (23:56 +0000)]
Update ELF Tool Chain to upstream r3520

Highlights of changes between r3490 and r3520:

- Improve C++ demangling
- Improve compatibility with Binutils tools wrt. error messages
- Handle additional types/sections/etc. in readelf and elfdump
- addr2line, cxxfilt: use setvbuf to set line buffering for filter use

PR: 218395
MFC after: 2 weeks
Relnotes: Yes
Sponsored by: The FreeBSD Foundation

7 years agoImport ELF Tool Chain snapshot at r3520
emaste [Mon, 17 Apr 2017 23:14:26 +0000 (23:14 +0000)]
Import ELF Tool Chain snapshot at r3520

From http://svn.code.sf.net/p/elftoolchain/code/

7 years agoUse kmem_malloc() instead of malloc(9) for the native amd64 filter.
jkim [Mon, 17 Apr 2017 22:02:09 +0000 (22:02 +0000)]
Use kmem_malloc() instead of malloc(9) for the native amd64 filter.

r316767 broke the BPF JIT compiler for amd64 because malloc()'d space is no
longer executable.

Discussed with: kib, alc

7 years agoRemove an unnecessary declaration missed in the previous commit.
jkim [Mon, 17 Apr 2017 21:57:23 +0000 (21:57 +0000)]
Remove an unnecessary declaration missed in the previous commit.

7 years agoMove declarations for a machine-dependent function to the header file.
jkim [Mon, 17 Apr 2017 21:51:26 +0000 (21:51 +0000)]
Move declarations for a machine-dependent function to the header file.

7 years agoReduce diff with amd64 version.
jkim [Mon, 17 Apr 2017 21:46:54 +0000 (21:46 +0000)]
Reduce diff with amd64 version.

7 years agoAdd some new objects to libclang for the MK_CLANG_FULL=yes case.
dim [Mon, 17 Apr 2017 20:14:32 +0000 (20:14 +0000)]
Add some new objects to libclang for the MK_CLANG_FULL=yes case.

7 years agoOptimize pathologic case of telldir() for Samba.
mav [Mon, 17 Apr 2017 19:03:31 +0000 (19:03 +0000)]
Optimize pathologic case of telldir() for Samba.

When application reads large directory, calling telldir() for each entry,
like Samba does, it creates exponential performance drop as number of
entries reach tenths to hundreds of thousands.  It is caused by full search
through the internal list, that never finds matches in that scenario, but
creates O(n^2) delays.  This patch optimizes that search, limiting it to
entries of the same buffer, turning time closer to O(n) in case of linear
directory scan.

PR: 218622
Reviewed by: jhb, jilles
MFC after: 2 weeks
Sponsored by: iXsystems, Inc.
Differential Revision: https://reviews.freebsd.org/D10408

7 years agoRemove trailing whitespace from r317061
emaste [Mon, 17 Apr 2017 18:57:26 +0000 (18:57 +0000)]
Remove trailing whitespace from r317061

7 years ago- Remove 'struct vmmeter' from 'struct pcpu', leaving only global vmmeter
glebius [Mon, 17 Apr 2017 17:34:47 +0000 (17:34 +0000)]
- Remove 'struct vmmeter' from 'struct pcpu', leaving only global vmmeter
  in place.  To do per-cpu stats, convert all fields that previously were
  maintained in the vmmeters that sit in pcpus to counter(9).
- Since some vmmeter stats may be touched at very early stages of boot,
  before we have set up UMA and we can do counter_u64_alloc(), provide an
  early counter mechanism:
  o Leave one spare uint64_t in struct pcpu, named pc_early_dummy_counter.
  o Point counter(9) fields of vmmeter to pcpu[0].pc_early_dummy_counter,
    so that at early stages of boot, before counters are allocated we already
    point to a counter that can be safely written to.
  o For sparc64 that required a whole dummy pcpu[MAXCPU] array.

Further related changes:
- Don't include vmmeter.h into pcpu.h.
- vm.stats.vm.v_swappgsout and vm.stats.vm.v_swappgsin changed to 64-bit,
  to match kernel representation.
- struct vmmeter hidden under _KERNEL, and only vmstat(1) is an exclusion.

This is based on benno@'s 4-year old patch:
https://lists.freebsd.org/pipermail/freebsd-arch/2013-July/014471.html

Reviewed by: kib, gallatin, marius, lidl
Differential Revision: https://reviews.freebsd.org/D10156

7 years agodtc: update to upstream 227d6a3
emaste [Mon, 17 Apr 2017 17:23:19 +0000 (17:23 +0000)]
dtc: update to upstream 227d6a3

- Report missing includes at the correct location.
- Add initial support for the -@ option emitting a symbol table.
- Add support for running tests with and without -@
- Add support for generating __fixups__ and __local_fixups__
- Attach the to-string transform to the node path.

7 years agoTwo more files missed in r317055: these files need sys/vmmeter.h, but now
glebius [Mon, 17 Apr 2017 17:20:48 +0000 (17:20 +0000)]
Two more files missed in r317055: these files need sys/vmmeter.h, but now
they got it implicitly included via sys/pcpu.h.

7 years agodtc: remove unused (since r306806) string.hh
emaste [Mon, 17 Apr 2017 17:18:49 +0000 (17:18 +0000)]
dtc: remove unused (since r306806) string.hh

7 years agoRemove unused assembly symbols pointing to vmmeter.
glebius [Mon, 17 Apr 2017 17:18:07 +0000 (17:18 +0000)]
Remove unused assembly symbols pointing to vmmeter.

7 years agoTypo!
glebius [Mon, 17 Apr 2017 17:07:51 +0000 (17:07 +0000)]
Typo!

7 years agoAll these files need sys/vmmeter.h, but now they got it implicitly
glebius [Mon, 17 Apr 2017 17:07:00 +0000 (17:07 +0000)]
All these files need sys/vmmeter.h, but now they got it implicitly
included via sys/pcpu.h.

7 years agoRemove unneeded include of vm_phys.h.
glebius [Mon, 17 Apr 2017 16:51:04 +0000 (16:51 +0000)]
Remove unneeded include of vm_phys.h.

7 years agobsdgrep: fix zero-length matches without the -o flag
emaste [Mon, 17 Apr 2017 14:59:55 +0000 (14:59 +0000)]
bsdgrep: fix zero-length matches without the -o flag

r316477 broke zero-length matches when not using the -o flag, by
skipping over them entirely.

Add a regression test so that it doesn't break again in the future.

Submitted by: Kyle Evans <kevans91 at ksu.edu>
Reviewed by: cem emaste ngie
Differential Revision: https://reviews.freebsd.org/D10333

7 years agobsdgrep: remove output separators between overlapping segments
emaste [Mon, 17 Apr 2017 13:36:30 +0000 (13:36 +0000)]
bsdgrep: remove output separators between overlapping segments

Make bsdgrep more sensitive to context overlaps.  If it's printing
context that either overlaps or is immediately adjacent to another bit
of context, don't print a separator.

- Non-overlapping segments no longer have two separators between them

- Overlapping segments no longer have separators between them with
  overlapping sections repeated

Submitted by: Kyle Evans <kevans91 at ksu.edu>
Reviewed by: cem
Differential Revision: https://reviews.freebsd.org/D10105

7 years agobsdgrep: for -r, use the working directory if none specified
emaste [Mon, 17 Apr 2017 13:22:39 +0000 (13:22 +0000)]
bsdgrep: for -r, use the working directory if none specified

This is more sensible than the previous behaviour of grepping stdin,
and matches newer GNU grep behaviour.

PR: 216307
Submitted by: Kyle Evans <kevans91 at ksu.edu>
Reviewed by: cem, emaste, ngie
Relnotes: Yes
Differential Revision: https://reviews.freebsd.org/

7 years agobsdgrep: add -z/--null-data support
emaste [Mon, 17 Apr 2017 13:14:18 +0000 (13:14 +0000)]
bsdgrep: add -z/--null-data support

-z treats input and output data as sequences of lines terminated by a
zero byte instead of a newline. This brings it more in line with GNU grep
and brings us closer to passing the current tests with BSD grep.

Submitted by: Kyle Evans <kevans91 at ksu.edu>
Reviewed by: cem
Relnotes: Yes
Differential Revision: https://reviews.freebsd.org/D10101

7 years agoAdd preliminary UPDATING and ObsoleteFiles.inc entries. Also add one
dim [Mon, 17 Apr 2017 12:42:58 +0000 (12:42 +0000)]
Add preliminary UPDATING and ObsoleteFiles.inc entries.  Also add one
new intrinsics header.

7 years agoInitial update of clang/llvm build glue, for building just a minimal
dim [Mon, 17 Apr 2017 11:21:42 +0000 (11:21 +0000)]
Initial update of clang/llvm build glue, for building just a minimal
clang executable.

7 years agocxgbe: Add tunables to control the number of LRO entries and the number
np [Mon, 17 Apr 2017 09:00:20 +0000 (09:00 +0000)]
cxgbe: Add tunables to control the number of LRO entries and the number
of rx mbufs that should be presorted before LRO.  There is no change in
default behavior.

MFC after: 1 week
Sponsored by: Chelsio Communications

7 years agoBelatedly add myself to committers-src.dot file.
ganbold [Mon, 17 Apr 2017 07:27:45 +0000 (07:27 +0000)]
Belatedly add myself to committers-src.dot file.

7 years agosh: Fix use after free when resetting an in-use alias.
jilles [Sun, 16 Apr 2017 22:10:02 +0000 (22:10 +0000)]
sh: Fix use after free when resetting an in-use alias.

The special case of modifying an existing alias does not work correctly if
the alias is currently in use. Instead, handle this case by unaliasing the
old alias (if any) and then creating a new alias.

7 years agosh: Link the new test to the build.
jilles [Sun, 16 Apr 2017 21:57:25 +0000 (21:57 +0000)]
sh: Link the new test to the build.

7 years agosh: Fix unalias -a while an alias is currently in use.
jilles [Sun, 16 Apr 2017 21:42:43 +0000 (21:42 +0000)]
sh: Fix unalias -a while an alias is currently in use.

It is a rare situation to modify aliases while an alias is currently in use,
but this is handled for plain unalias. Handle it for unalias -a as well.

7 years agolibjail: make allocation in jailparam_all() somewhat more robust.
pfg [Sun, 16 Apr 2017 19:23:10 +0000 (19:23 +0000)]
libjail: make allocation in jailparam_all() somewhat more robust.

Unsign some variables involved in allocation as they will never be
negative anyways. Provide some bounds checking through reallocarray(3).

This is all very unlikely to have any visible effect.

Reviewed by: jamie
MFC after: 3 weeks

7 years agoFix userland tools that don't check the format of routing socket
pkelsey [Sun, 16 Apr 2017 19:17:10 +0000 (19:17 +0000)]
Fix userland tools that don't check the format of routing socket
messages before accessing message fields that may not be present,
removing dead/duplicate/misleading code along the way.

Document the message format for each routing socket message in
route.h.

Fix a bug in usr.bin/netstat introduced in r287351 that resulted in
pointer computation with essentially random 16-bit offsets and
dereferencing of the results.

Reviewed by: ae
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D10330

7 years agoFix strcoll_l disagreeing with strxfrm by reworking the forward order case in
bapt [Sun, 16 Apr 2017 19:12:07 +0000 (19:12 +0000)]
Fix strcoll_l disagreeing with strxfrm by reworking the forward order case in
wcscoll_l().

Illumos fixed this while grabbing back our patches:
https://www.illumos.org/rb/r/402/

This does not 100% fix what postgresql folks reported as there is still a
remaining issue: https://www.illumos.org/issues/7962, it improves the situation

The initial issue was reported in postgresql mailing lists:
https://www.postgresql.org/message-id/flat/111D0E27-A8F3-4A84-A4E0-B0FB703863DF@s24.com#111D0E27-A8F3-4A84-A4E0-B0FB703863DF@s24.com

Submitted by: Yuri Pankov <yuri.pankov@nexenta.com>
Obtained from: Illumos
MFC after: 2 weeks

7 years agoConvert probing to use an ofw_compat_data array, and add imx6ul to the list.
ian [Sun, 16 Apr 2017 17:53:44 +0000 (17:53 +0000)]
Convert probing to use an ofw_compat_data array, and add imx6ul to the list.

7 years agoMerge lldb trunk r300422 and resolve conflicts.
dim [Sun, 16 Apr 2017 16:48:25 +0000 (16:48 +0000)]
Merge lldb trunk r300422 and resolve conflicts.

7 years agoMerge lld trunk r300422 and resolve conflicts.
dim [Sun, 16 Apr 2017 16:35:48 +0000 (16:35 +0000)]
Merge lld trunk r300422 and resolve conflicts.

7 years agoMerge clang trunk r300422 and resolve conflicts.
dim [Sun, 16 Apr 2017 16:31:20 +0000 (16:31 +0000)]
Merge clang trunk r300422 and resolve conflicts.

7 years agoMerge llvm trunk r300422 and resolve conflicts.
dim [Sun, 16 Apr 2017 16:25:46 +0000 (16:25 +0000)]
Merge llvm trunk r300422 and resolve conflicts.

7 years agoVendor import of lldb trunk r300422:
dim [Sun, 16 Apr 2017 16:04:10 +0000 (16:04 +0000)]
Vendor import of lldb trunk r300422:
https://llvm.org/svn/llvm-project/lldb/trunk@300422

7 years agoVendor import of lld trunk r300422:
dim [Sun, 16 Apr 2017 16:03:39 +0000 (16:03 +0000)]
Vendor import of lld trunk r300422:
https://llvm.org/svn/llvm-project/lld/trunk@300422

7 years agoVendor import of clang trunk r300422:
dim [Sun, 16 Apr 2017 16:02:28 +0000 (16:02 +0000)]
Vendor import of clang trunk r300422:
https://llvm.org/svn/llvm-project/cfe/trunk@300422

7 years agoVendor import of llvm trunk r300422:
dim [Sun, 16 Apr 2017 16:01:22 +0000 (16:01 +0000)]
Vendor import of llvm trunk r300422:
https://llvm.org/svn/llvm-project/llvm/trunk@300422

7 years agoReplace the RC4 algorithm for generating in-kernel secure random
markm [Sun, 16 Apr 2017 09:11:02 +0000 (09:11 +0000)]
Replace the RC4 algorithm for generating in-kernel secure random
numbers with Chacha20. Keep the API, though, as that is what the
other *BSD's have done.

Use the boot-time entropy stash (if present) to bootstrap the
in-kernel entropy source.

Reviewed by: delphij,rwatson
Approved by: so(delphij)
MFC after: 2 months
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D10048
--This line, and those below, will be ignored--
> Description of fields to fill in above:                     76 columns --|
> PR:                       If and which Problem Report is related.
> Submitted by:             If someone else sent in the change.
> Reported by:              If someone else reported the issue.
> Reviewed by:              If someone else reviewed your modification.
> Approved by:              If you needed approval for this commit.
> Obtained from:            If the change is from a third party.
> MFC after:                N [day[s]|week[s]|month[s]].  Request a reminder email.
> MFH:                      Ports tree branch name.  Request approval for merge.
> Relnotes:                 Set to 'yes' for mention in release notes.
> Security:                 Vulnerability reference (one per line) or description.
> Sponsored by:             If the change was sponsored by an organization.
> Differential Revision:    https://reviews.freebsd.org/D### (*full* phabric URL needed).
> Empty fields above will be automatically removed.

7 years agoUse warnx() to issue error message.
cy [Sun, 16 Apr 2017 04:36:22 +0000 (04:36 +0000)]
Use warnx() to issue error message.

Reported by: cem
MFC after: 1 week
X-MFC with: r316993, r316994

7 years agoAdd imx6ul SoC support, and get the PHY number from the FDT data. If there
ian [Sun, 16 Apr 2017 03:49:14 +0000 (03:49 +0000)]
Add imx6ul SoC support, and get the PHY number from the FDT data.  If there
is no phy-handle property, fall back to using MII_PHY_ANY.

This still doesn't support an mdio bus with multiple PHYs on it, or the
possibility that the PHY being used by this instance of ffec is on the
mdio bus of some other instance (which is now a possibility with imx6ul).
Adding that support will require changes in fdt_get_phyaddr(), which is
currently making some assumptions that don't work with modern fdt data.

7 years agoAdd support for the Micrel KSZ8081 ethernet PHY.
ian [Sun, 16 Apr 2017 01:40:17 +0000 (01:40 +0000)]
Add support for the Micrel KSZ8081 ethernet PHY.

The only thing this phy needs that the ukphy driver doesn't provide is
that the value in the proprietary Phy Control 2 Register must be saved
before doing a soft reset and restored afterwards.  Most modern phys have
"sticky bits" for low-level config that survive a reset, but on this one
the values in all registers go back to defaults, wiping out any board-
specific config set up by the bootloader/bios/whatever.

7 years agoFix CID 1372600, possible NULL pointer dereference should
cy [Sun, 16 Apr 2017 01:15:37 +0000 (01:15 +0000)]
Fix CID 1372600, possible NULL pointer dereference should
reallocarray() fail.

Reported by: Coverity CID 1372600
MFC after: 1 week

7 years agoFix CID 1372601, possible NULL pointer dereference should
cy [Sun, 16 Apr 2017 01:13:47 +0000 (01:13 +0000)]
Fix CID 1372601, possible NULL pointer dereference should
reallocarray() fail.

Reported by: Coverity CID 1372601
MFC after: 1 week

7 years agoClean up extraneous brackets.
cy [Sat, 15 Apr 2017 23:34:05 +0000 (23:34 +0000)]
Clean up extraneous brackets.

7 years agoDue to time constraints remove myself as a vmm(4) maintainer.
neel [Sat, 15 Apr 2017 22:42:23 +0000 (22:42 +0000)]
Due to time constraints remove myself as a vmm(4) maintainer.

7 years agoPull in r300404 from upstream llvm trunk (by me):
dim [Sat, 15 Apr 2017 22:34:22 +0000 (22:34 +0000)]
Pull in r300404 from upstream llvm trunk (by me):

  Use correct registers for "A" inline asm constraint

  Summary:
  In PR32594, inline assembly using the 'A' constraint on x86_64 causes
  llvm to crash with a "Cannot select" stack trace.  This is because
  `X86TargetLowering::getRegForInlineAsmConstraint` hardcodes that 'A'
  means the EAX and EDX registers.

  However, on x86_64 it means the RAX and RDX registers, and on 16-bit
  x86 (ia16?) it means the old AX and DX registers.

  Add new register classes in `X86RegisterInfo.td` to support these
  cases, and amend the logic in `getRegForInlineAsmConstraint` to cope
  with different subtargets.  Also add a test case, derived from
  PR32594.

  Reviewers: craig.topper, qcolombet, RKSimon, ab

  Reviewed By: ab

  Subscribers: ab, emaste, royger, llvm-commits

  Differential Revision: https://reviews.llvm.org/D31902

This should fix crashes when using the 'A' constraint on amd64, for
example as it is being used in Xen.

Reported by: royger
MFC after: 3 days

7 years agoRemove files which seems to confuse the git converter
bapt [Sat, 15 Apr 2017 21:19:49 +0000 (21:19 +0000)]
Remove files which seems to confuse the git converter

7 years agoInstall the zstdgrep shell wrapper
bapt [Sat, 15 Apr 2017 21:12:11 +0000 (21:12 +0000)]
Install the zstdgrep shell wrapper

7 years agorename zstless into zstdless to be consistent with other zstdcommands
bapt [Sat, 15 Apr 2017 20:55:09 +0000 (20:55 +0000)]
rename zstless into zstdless to be consistent with other zstdcommands

7 years agoAdd forgotten links for zstdcat and unzstd
bapt [Sat, 15 Apr 2017 20:53:51 +0000 (20:53 +0000)]
Add forgotten links for zstdcat and unzstd

7 years ago3BSD-licensed implementation of the chacha20 stream cipher, intended for
des [Sat, 15 Apr 2017 20:51:53 +0000 (20:51 +0000)]
3BSD-licensed implementation of the chacha20 stream cipher, intended for
use by the upcoming arc4random replacement.

7 years agoAdd a new Y flag to newsyslog.conf
bapt [Sat, 15 Apr 2017 20:37:34 +0000 (20:37 +0000)]
Add a new Y flag to newsyslog.conf

This makes newsyslog use zstandard to compress log files.

Given Z is already taken for gzip and zstandard compression level stands in
between gzip and xz (which has the X flag) chosing Y sounds ok :)

7 years agoChange some default to make zstd a dropin replacement for gzip,bzip etc
bapt [Sat, 15 Apr 2017 20:15:44 +0000 (20:15 +0000)]
Change some default to make zstd a dropin replacement for gzip,bzip etc
in most cases

Changes ares:
- quiet by default
- remove the source files one compression completion by default

7 years agoAdd a zstdless equivalent to zless, bzless xzless
bapt [Sat, 15 Apr 2017 20:06:24 +0000 (20:06 +0000)]
Add a zstdless equivalent to zless, bzless xzless

7 years agoImport zstandard 1.1.4 in base
bapt [Sat, 15 Apr 2017 20:05:22 +0000 (20:05 +0000)]
Import zstandard 1.1.4 in base

zstandard is a new compression library/tool which is very fast at
compression/decompression

For now import as a private library

7 years agoAdd a 10x16 mouse cursor and use it in all graphics (strictly, pixel)
bde [Sat, 15 Apr 2017 20:03:50 +0000 (20:03 +0000)]
Add a 10x16 mouse cursor and use it in all graphics (strictly, pixel)
modes if the font size is >= 14.

This is the X cursor XC_left_ptr (#68) (glyph #45 in an X cursor font).
Also found in vt.  The old 9x13 cursor is the 10x16 one trimmed not very
well.

8x8 fonts need a smaller cursor instead of a larger one, except when
the pixel size is small.  Text mode is still limited to width and height
1 more than the font (so the 9x13 is already 4 pixels too high for it).

7 years agoImport zstd 1.1.4
bapt [Sat, 15 Apr 2017 19:47:16 +0000 (19:47 +0000)]
Import zstd 1.1.4

7 years agoStructure the mouse cursor data so that it is easier to switch, and
bde [Sat, 15 Apr 2017 19:27:39 +0000 (19:27 +0000)]
Structure the mouse cursor data so that it is easier to switch, and
access it via pointers (still to only 1 instance, now with a less
generic name).

Restructure the "and" and "or" masks as border and interior masks
(where the "and" mask was for the union of the border and the interior).
"and" and "or" were only a detail in a not very good implementation,
and after fixing that the union was only used to calculate the border
at runtime.

Use the metric data in more places to clip to active pixels earlier.

7 years agoFix another logic bug that came out of recent syslogd refactoring and exposed by
sobomax [Sat, 15 Apr 2017 18:20:11 +0000 (18:20 +0000)]
Fix another logic bug that came out of recent syslogd refactoring and exposed by
the r316874: don't call shutdown(2) on all sockets, but only net ones, which seems
to be the behaviour existed before that refactoring. Also don't call listen(2)
in datagram sockets and fix misplaced debug messages while I am here.

Reported by: peter

7 years agoAdd support for the imx6ul SoC.
ian [Sat, 15 Apr 2017 17:02:32 +0000 (17:02 +0000)]
Add support for the imx6ul SoC.

7 years agocxgbe: Add a tunable to configure the SGE time scaler, which is
np [Sat, 15 Apr 2017 17:00:50 +0000 (17:00 +0000)]
cxgbe: Add a tunable to configure the SGE time scaler, which is
available starting with T6.  The values in the timer holdoff registers
are multiplied by the scaling factor before use.

dev.<nexus>.<n>.holdoff_timers shows the final values of the
timers in microseconds.

MFC after: 1 week
Sponsored by: Chelsio Communications

7 years agoClean up headers declaration
bapt [Sat, 15 Apr 2017 13:57:35 +0000 (13:57 +0000)]
Clean up headers declaration

7 years agoUpdate to 2017.04.03
bapt [Sat, 15 Apr 2017 09:56:42 +0000 (09:56 +0000)]
Update to 2017.04.03

7 years agoSwitch back to non-IEC units for 1024 bytes
ngie [Sat, 15 Apr 2017 06:53:07 +0000 (06:53 +0000)]
Switch back to non-IEC units for 1024 bytes

I was swayed a little too quickly when I saw the wiki page discussing
kB vs KiB. Switch back as none of the code in base openly uses
IEC units via humanize_number(3) (which was my next step), and there's
a large degree of dislike with IEC vs more SI-like units.

MFC after: 7 weeks
Submitted by: jhb, rgrimes
Sponsored by: Dell EMC Isilon

7 years agoLatest version, we need to realpath anyway to check if an obj
sjg [Sat, 15 Apr 2017 03:28:13 +0000 (03:28 +0000)]
Latest version, we need to realpath anyway to check if an obj
dependency is also a src dependency.

7 years agoSince shutdown(2) on datagram socket is no longer a NOP after rev 316874
sobomax [Sat, 15 Apr 2017 02:24:22 +0000 (02:24 +0000)]
Since shutdown(2) on datagram socket is no longer a NOP after rev 316874
don't bother to select/recv on that socket. This prevents syslogd(8)
from spinning endlessly when started with the -s option (default).

Reported by: peter

7 years agoUpdate to latest, handle case of __objdir=obj
sjg [Sat, 15 Apr 2017 01:52:49 +0000 (01:52 +0000)]
Update to latest, handle case of __objdir=obj

7 years agoUpdate to bmake 20170413
sjg [Sat, 15 Apr 2017 01:44:45 +0000 (01:44 +0000)]
Update to bmake 20170413

7 years agoReorder Makefile entries from r316945
asomers [Sat, 15 Apr 2017 00:39:45 +0000 (00:39 +0000)]
Reorder Makefile entries from r316945

PR: 176049
Reported by: Oliver Pinter
MFC after: 3 weeks
X-MFC-With: 316945

7 years agoAdd 410.status-mfi, a periodic script for mfi(4) arrays
asomers [Fri, 14 Apr 2017 22:59:14 +0000 (22:59 +0000)]
Add 410.status-mfi, a periodic script for mfi(4) arrays

PR: 176049
Submitted by: doconnor@gsoft.com.au
Reviewed by: scottl, Larry Rosenman <ler@lerctr.org>
MFC after: 3 weeks
Relnotes: yes

7 years agoDon't try to write out bufs that have already failed with ENXIO.
trasz [Fri, 14 Apr 2017 20:15:34 +0000 (20:15 +0000)]
Don't try to write out bufs that have already failed with ENXIO.
This fixes some panics after disconnecting mounted disks.

Submitted by: imp (slightly different version, which I've then lost)
Reviewed by: kib, imp, mckusick
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D9674

7 years agocxgbe/iw_cxgbe: Report the actual values of various parameters as
np [Fri, 14 Apr 2017 20:15:17 +0000 (20:15 +0000)]
cxgbe/iw_cxgbe: Report the actual values of various parameters as
configured by the firmware.

MFC after: 3 days
Sponsored by: Chelsio Communications

7 years ago[lib80211] fix a missing cleanup path.
adrian [Fri, 14 Apr 2017 20:10:18 +0000 (20:10 +0000)]
[lib80211] fix a missing cleanup path.

PR: lib/218655
Reported by: <valentin.vergez@stormshield.eu>

7 years agosavecore: fix space calculation with respect to `minfree` in check_space(..)
ngie [Fri, 14 Apr 2017 19:41:48 +0000 (19:41 +0000)]
savecore: fix space calculation with respect to `minfree` in check_space(..)

- Use strtoll(3) instead of atoi(3), because atoi(3) limits the
  representable data to INT_MAX. Check the values received from
  strtoll(3), trimming trailing whitespace off the end to maintain
  POLA.
- Use `KiB` instead of `kB` when describing free space, total space,
  etc. I am now fully aware of `KiB` being the IEC standard for 1024
  bytes and `kB` being the IEC standard for 1000 bytes.
- Store available number of KiB in `available` so it can be more
  easily queried and compared to ensure that there are enough KiB to
  store the dump image on disk.
- Print out the reserved space on disk, per `minfree`, so end-users
  can troubleshoot why check_space(..) is reporting that there isn't
  enough free space.

MFC after: 7 weeks
Reviewed by: Anton Rang <rang@acm.com> (earlier diff), cem (earlier diff)
Tested with: positive/negative cases (see review); make tinderbox
Sponsored by: Dell EMC Isilon
Differential Revision: D10379

7 years agocxgbe/iw_cxgbe: Report accurate page_size_cap in ib_query_device.
np [Fri, 14 Apr 2017 19:18:50 +0000 (19:18 +0000)]
cxgbe/iw_cxgbe: Report accurate page_size_cap in ib_query_device.

MFC after: 3 days
Sponsored by: Chelsio Communications

7 years agocxgbe/iw_cxgbe: hw supports 64K (not 32K) Protection Domains.
np [Fri, 14 Apr 2017 19:15:31 +0000 (19:15 +0000)]
cxgbe/iw_cxgbe: hw supports 64K (not 32K) Protection Domains.

MFC after: 3 days
Sponsored by: Chelsio Communications

7 years agoOops, the previous revision was missing the update of the shift variable.
bde [Fri, 14 Apr 2017 17:38:43 +0000 (17:38 +0000)]
Oops, the previous revision was missing the update of the shift variable.

7 years agoRestore ability to shutdown DGRAM sockets, still forcing ENOTCONN to be returned
sobomax [Fri, 14 Apr 2017 17:23:28 +0000 (17:23 +0000)]
Restore ability to shutdown DGRAM sockets, still forcing ENOTCONN to be returned
by the shutdown(2) system call. This ability has been lost as part of the svn
revision 285910.

Reviewed by: ed, rwatson, glebius, hiren
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D10351

7 years agoRename two gmirror state flags to make their meanings slightly clearer.
markj [Fri, 14 Apr 2017 17:13:57 +0000 (17:13 +0000)]
Rename two gmirror state flags to make their meanings slightly clearer.

No functional change.

MFC after: 2 weeks
Sponsored by: Dell EMC Isilon

7 years agoDon't set the mirror GEOM softc to NULL in g_mirror_destroy().
markj [Fri, 14 Apr 2017 17:08:37 +0000 (17:08 +0000)]
Don't set the mirror GEOM softc to NULL in g_mirror_destroy().

At this point we have not rendezvous'ed with the mirror worker thread, and
I/O may still be in flight. Various I/O completion paths expect to be able
to obtain a reference to the mirror softc from the GEOM, so setting it to
NULL may result in various NULL pointer dereferences if the mirror is
stopped with -f or the kernel is shut down while a mirror is
synchronizing. The worker thread will clear the softc pointer before
exiting.

Tested by: pho
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon

7 years agoCheck for a provider error before enqueuing mirror I/O.
markj [Fri, 14 Apr 2017 17:03:32 +0000 (17:03 +0000)]
Check for a provider error before enqueuing mirror I/O.

We are otherwise susceptible to a race with a concurrent teardown of the
mirror provider, causing the I/O to be left uncompleted after the mirror
started withering.

Tested by: pho
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon

7 years agoAdjust shifting so that cursor widths up to 17 (was 9) work in vga planar
bde [Fri, 14 Apr 2017 17:02:24 +0000 (17:02 +0000)]
Adjust shifting so that cursor widths up to 17 (was 9) work in vga planar
mode.

Direct mode always supported widths up to 32, except for its hard-coded
16s matching the pixmap size.  Text mode is still limited to 9 its 2x2
character cell method and missing adjustments for the gap between
characters, if any.

Cursor heights can be almost anything in graphics modes.

7 years agoStop mirror synchronization before draining the I/O queue.
markj [Fri, 14 Apr 2017 16:54:50 +0000 (16:54 +0000)]
Stop mirror synchronization before draining the I/O queue.

Regular I/O requests may be blocked by concurrent synchronization requests
targeted to the same LBAs, in which case they are moved to a holding queue
until the conflicting I/O completes. We therefore want to stop
synchronization before completing pending I/O in g_mirror_destroy_provider()
since this ensures that blocked I/O requests are completed as well.

Tested by: pho
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon

7 years agoMFV 316855
asomers [Fri, 14 Apr 2017 16:30:37 +0000 (16:30 +0000)]
MFV 316855

7900 zdb shouldn't print the path of a znode at verbosity < 5

Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Alan Somers <asomers@freebsd.org>

illumos/illumos-gate@e548d2fa41d1baa06662ed9abbb8bcec86e27dd9
https://www.illumos.org/issues/7900

MFC after: 3 weeks
Sponsored by: Spectra Logic Corp

7 years agorename vfs.zfs.debug_flags to vfs.zfs.debugflags
avg [Fri, 14 Apr 2017 15:35:07 +0000 (15:35 +0000)]
rename vfs.zfs.debug_flags to vfs.zfs.debugflags

While the former name is easier to read, the "_flags" suffix has a special
meaning for loader(8) and, thus, it was impossible to set the knob via
loader.conf(5).  The loader interpreted the setting as flags that should
be passed to a kernel module named "vfs.zfs.debug".

Discussed with: smh
MFC after: 2 weeks

7 years agodtrace: fix normalization of stddev aggregation
avg [Fri, 14 Apr 2017 15:31:04 +0000 (15:31 +0000)]
dtrace: fix normalization of stddev aggregation

To be upstreamed.

Discussed with: Bryan Cantrill <bryancantrill@gmail.com>
MFC after: 2 weeks
Sponsored by: Panzura

7 years agoIn fsck_ffs pass1, prevent the inosused variable from wrapping.
kib [Fri, 14 Apr 2017 15:22:00 +0000 (15:22 +0000)]
In fsck_ffs pass1, prevent the inosused variable from wrapping.

The loop that scans the used inode map when soft updates is in use
assumes that the inosused variable is signed.  However, ino_t is
unsigned, so the loop invariant is incorrect and the check for
inosused wrapping to < 0 can never be true.

Instead of checking for wrap after the fact just prevent it from
happening in the first place.

PR: 218592
Submitted by: Todd Miller <todd.miller@courtesan.com>
Reviewed by: mckusick
MFC after: 1 week

7 years agoCorrect calculation of the entry->free_down in the invariants-checking
kib [Fri, 14 Apr 2017 15:16:41 +0000 (15:16 +0000)]
Correct calculation of the entry->free_down in the invariants-checking
code.

Reported by: maxim
Found by: PVS studio scan
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoRemove RTL8153 quirk since ure(4) supports this chip.
kevlo [Fri, 14 Apr 2017 14:38:27 +0000 (14:38 +0000)]
Remove RTL8153 quirk since ure(4) supports this chip.

7 years agoOptimize drawing of the mouse cursor in vga planar mode almost as
bde [Fri, 14 Apr 2017 14:00:13 +0000 (14:00 +0000)]
Optimize drawing of the mouse cursor in vga planar mode almost as
much as possible, by avoiding null ANDs and ORs to the frame buffer.

Mouse cursors are fairly sparse, especially for their frame.  Pixels
are written in groups of 8 in planar mode and the per-group sparseness
is not as large, but it still averages about 40% with the current
9x13 mouse cursor.  The average drawing time is reduced by about this
amount (from 22 usec constant to 12.5 usec average on Haswell).

This optimization is relatively larger with larger cursors.  Width 10
requires 6 frame buffer accesses per line instead of 4 if not done
sparsely, but rarely more than 4 if done sparsely.

7 years agoRemove unused "cred" argument to ncl_flush().
rmacklem [Fri, 14 Apr 2017 13:25:45 +0000 (13:25 +0000)]
Remove unused "cred" argument to ncl_flush().

The "cred" argument of ncl_flush() is unused and it was confusing to have
the code passing in NULL for this argument in some cases. This patch deletes
this argument.
There is no semantic change because of this patch.

MFC after: 2 weeks

7 years agoCorrect minor grammos; minor white-space fixes.
schweikh [Fri, 14 Apr 2017 12:54:39 +0000 (12:54 +0000)]
Correct minor grammos; minor white-space fixes.

7 years agoFurther unobfuscate the method of drawing the mouse cursor in vga planar
bde [Fri, 14 Apr 2017 12:03:34 +0000 (12:03 +0000)]
Further unobfuscate the method of drawing the mouse cursor in vga planar
mode.

Don't manually unroll the 2 inner loops.  On Haswell, doing so gave a
speedup of about 0.5% (about 4 cycles per iteration out of 1400), but
hard-coded a limit of width 9 and made better better optimizations
harder to see.  gcc-4.2.1 -O does the unrolling anyway, unless tricked
with a volatile hack.  gcc's unrolling is not very good and gives a
a speedup of about half as much (about 2 cycles per iteration).  (All
timing on i386.)

Manual unrolling was only feasible because the inner loop only iterates
once or twice.  Usually twice, but a dynamic check is needed to decide,
and was not moved from the second-innermost loop manually or by gcc.
This commit basically adds another dynamic check in the inner loop.

Cursor widths of 10-17 require 3 iterations in the inner loop and this
is not so easy to unroll -- even gcc stops at 2.

7 years agoAvoid undefined behavior.
ae [Fri, 14 Apr 2017 11:58:41 +0000 (11:58 +0000)]
Avoid undefined behavior.

The 'pktid' variable is modified while being used twice between
sequence points, probably due to htonl() is macro.

Reported by: PVS-Studio
MFC after: 1 week

7 years agoUse address of specific union member instead of whole union address to
ae [Fri, 14 Apr 2017 11:41:09 +0000 (11:41 +0000)]
Use address of specific union member instead of whole union address to
fix PVS-Studio warnings.

MFC after: 1 week

7 years agoThe rule field in the ipfw_dyn_rule structure is used as storage
ae [Fri, 14 Apr 2017 11:19:09 +0000 (11:19 +0000)]
The rule field in the ipfw_dyn_rule structure is used as storage
to pass rule number and rule set to userland. In r272840 the kernel
internal rule representation was changed and the rulenum field of
struct ip_fw_rule got the type uint32_t, but userlevel representation
still have the type uint16_t. To not overflow the size of pointer
on the systems with 32-bit pointer size use separate variable to
copy rulenum and set.

Reported by: PVS-Studio
MFC after: 1 week