]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
7 years agoMFC r310155:
kib [Mon, 19 Dec 2016 00:28:04 +0000 (00:28 +0000)]
MFC r310155:
Fix typo.

git-svn-id: svn://svn.freebsd.org/base/stable/10@310238 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r310013 (by cperciva):
dim [Sun, 18 Dec 2016 14:31:11 +0000 (14:31 +0000)]
MFC r310013 (by cperciva):

Check that blkfront devices have a non-zero number of sectors and a
non-zero sector size.  Such a device would be a virtual disk of zero
bytes; clearly not useful, and not something we should try to attach.

As a fortuitous side effect, checking that these values are non-zero
here results in them not *becoming* zero later on the function.  This
odd behaviour began with r309124 (clang 3.9.0) but is challenging to
debug; making any changes to this function whatsoever seems to affect
the llvm optimizer behaviour enough to make the unexpected zeroing of
the sector_size variable cease.

PR: 215209
Security: The potential for variables to unexpectedly become zero
has worrying consequences for security in general, but
not so much in this particular context.

MFC r310086:

In xbd_connect(), use correct scanf conversion specifiers for the
feature_barrier and feature_flush variables.  Otherwise, adjacent
variables on the stack, such as sector_size, may be overwritten, with
disastrous results.

Note that I did not see a good reason to revert the addition of zero
checks introduced in r310013.  Better safe than sorry.

PR: 215209
Tested by: royger

git-svn-id: svn://svn.freebsd.org/base/stable/10@310228 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r296775 (by gibbs):
kib [Fri, 16 Dec 2016 23:42:49 +0000 (23:42 +0000)]
MFC r296775 (by gibbs):
Provide high precision conversion from ns,us,ms -> sbintime in kevent.

Tested by: ian

git-svn-id: svn://svn.freebsd.org/base/stable/10@310183 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r308806
asomers [Fri, 16 Dec 2016 20:10:55 +0000 (20:10 +0000)]
MFC r308806

Speed up pw operations that edit /etc/group or /etc/passwd

r285050 fixed a bug in pw that could lead to /etc/passwd or /etc/group
corruption on power loss. However, it fixed it by opening those files with
O_SYNC, which is very slow, especially on ZFS. This change replaces O_SYNC
with appropriately placed fsync()s instead, which is much faster. Using a
ZFS tmpdir, the time to run pw's kyua tests drops from 245s to 35s.

git-svn-id: svn://svn.freebsd.org/base/stable/10@310173 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC 309274:
jhb [Fri, 16 Dec 2016 01:14:00 +0000 (01:14 +0000)]
MFC 309274:
Use the correct name for the GCC macro indicating max_align_t is defined.

git-svn-id: svn://svn.freebsd.org/base/stable/10@310134 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC 308690: Sync instruction cache's after writing user breakpoints on MIPS.
jhb [Fri, 16 Dec 2016 01:06:35 +0000 (01:06 +0000)]
MFC 308690: Sync instruction cache's after writing user breakpoints on MIPS.

Add an implementation for pmaps_sync_icache() on MIPS that sync's the
instruction cache on all CPUs via smp_rendezvous() after a debugger
inserts a breakpoint via ptrace(PT_IO).

git-svn-id: svn://svn.freebsd.org/base/stable/10@310133 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFstable/11 r310126:
ngie [Thu, 15 Dec 2016 20:13:40 +0000 (20:13 +0000)]
MFstable/11 r310126:

MFC r309602:

Remove svn[lite]{bench,fsfs} if either MK_SVN == no or MK_SVNLITE == no

git-svn-id: svn://svn.freebsd.org/base/stable/10@310127 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r309676
vangyzen [Thu, 15 Dec 2016 16:52:17 +0000 (16:52 +0000)]
MFC r309676

Export the whole thread name in kinfo_proc

kinfo_proc::ki_tdname is three characters shorter than
thread::td_name.  Add a ki_moretdname field for these three
extra characters.  Add the new field to kinfo_proc32, as well.
Update all in-tree consumers to read the new field and assemble
the full name, except for lldb's HostThreadFreeBSD.cpp, which
I will handle separately.  Bump __FreeBSD_version.

Sponsored by: Dell EMC

git-svn-id: svn://svn.freebsd.org/base/stable/10@310121 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r309709:
kib [Thu, 15 Dec 2016 10:51:35 +0000 (10:51 +0000)]
MFC r309709:
Move map_generation snapshot value into struct faultstate.

git-svn-id: svn://svn.freebsd.org/base/stable/10@310111 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r309708:
kib [Thu, 15 Dec 2016 10:47:35 +0000 (10:47 +0000)]
MFC r309708:
Style.

git-svn-id: svn://svn.freebsd.org/base/stable/10@310110 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC 309714: Fix spa_alloc_tree sorting by offset in r305331.
mav [Thu, 15 Dec 2016 08:11:32 +0000 (08:11 +0000)]
MFC 309714: Fix spa_alloc_tree sorting by offset in r305331.

Original commit "7090 zfs should improve allocation order" declares alloc
queue sorted by time and offset.  But in practice io_offset is always zero,
so sorting happened only by time, while order of writes with equal time was
completely random.  On Illumos this did not affected much thanks to using
high resolution timestamps.  On FreeBSD due to using much faster but low
resolution timestamps it caused bad data placement on disks, affecting
further read performance.

This change switches zio_timestamp_compare() from comparing uninitialized
io_offset to really populated io_bookmark values.  I haven't decided yet
what to do with timestampts, but on simple tests this change gives the
same peformance results by just making code to work as declared.

git-svn-id: svn://svn.freebsd.org/base/stable/10@310106 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r309460
vangyzen [Thu, 15 Dec 2016 01:45:31 +0000 (01:45 +0000)]
MFC r309460

thr_set_name(): silently truncate the given name as needed

Instead of failing with ENAMETOOLONG, which is swallowed by
pthread_set_name_np() anyway, truncate the given name to MAXCOMLEN+1
bytes.  This is more likely what the user wants, and saves the
caller from truncating it before the call (which was the only
recourse).

The man page changes were not merged because thr_set_name.2
does not exist on stable/10.

Sponsored by: Dell EMC

git-svn-id: svn://svn.freebsd.org/base/stable/10@310099 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r309563: pflog: Correctly initialise subrulenr
kp [Wed, 14 Dec 2016 21:30:35 +0000 (21:30 +0000)]
MFC r309563: pflog: Correctly initialise subrulenr

subrulenr is considered unset if it's set to -1, not if it's set to 1.
See contrib/tcpdump/print-pflog.c pflog_print() for a user.

This caused incorrect pflog output (tcpdump -n -e -ttt -i pflog0):
  rule 0..16777216(match)
instead of the correct output of
  rule 0/0(match)

PR: 214832
Submitted by: andywhite@gmail.com

git-svn-id: svn://svn.freebsd.org/base/stable/10@310094 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMerge r309860 from stable/9, as this also applies to stable/10:
dim [Wed, 14 Dec 2016 17:27:44 +0000 (17:27 +0000)]
Merge r309860 from stable/9, as this also applies to stable/10:

Fix libllvmanalysis build failure after r309857: on stable/9, llvm is
compiled by gcc, and without -std=c++11, so the nullptr keyword is
unknown.  Use the old-school plain zero syntax instead.

git-svn-id: svn://svn.freebsd.org/base/stable/10@310082 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r277511: Fix remote DMA based firewire debugging when targeting
avg [Wed, 14 Dec 2016 17:17:07 +0000 (17:17 +0000)]
MFC r277511: Fix remote DMA based firewire debugging when targeting
systems with more than 4GB of physical memory.

git-svn-id: svn://svn.freebsd.org/base/stable/10@310081 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r309119: virtio_pci: fix announcement of MSI-X interrupts for queues
avg [Wed, 14 Dec 2016 16:44:38 +0000 (16:44 +0000)]
MFC r309119: virtio_pci: fix announcement of MSI-X interrupts for queues

git-svn-id: svn://svn.freebsd.org/base/stable/10@310080 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r309093: firewire: initialize tag label to -1 in fw_xfer_alloc()
avg [Wed, 14 Dec 2016 16:43:09 +0000 (16:43 +0000)]
MFC r309093: firewire: initialize tag label to -1 in fw_xfer_alloc()

git-svn-id: svn://svn.freebsd.org/base/stable/10@310078 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r308529: intpm: clean up intsmb_bread and intsmb_pcall
avg [Wed, 14 Dec 2016 16:35:17 +0000 (16:35 +0000)]
MFC r308529: intpm: clean up intsmb_bread and intsmb_pcall

git-svn-id: svn://svn.freebsd.org/base/stable/10@310076 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r309092: fwohci: report whether PhysicalUpperBound register is implemented
avg [Wed, 14 Dec 2016 16:30:53 +0000 (16:30 +0000)]
MFC r309092: fwohci: report whether PhysicalUpperBound register is implemented

git-svn-id: svn://svn.freebsd.org/base/stable/10@310074 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r306589: Implement iicbus_write_ivar and impelemnt the NOSTOP ivar
avg [Wed, 14 Dec 2016 16:21:10 +0000 (16:21 +0000)]
MFC r306589: Implement iicbus_write_ivar and impelemnt the NOSTOP ivar
in both read and write.

git-svn-id: svn://svn.freebsd.org/base/stable/10@310071 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r308985: revert r304520, set canmount=on is not supposed to mount
avg [Wed, 14 Dec 2016 16:11:19 +0000 (16:11 +0000)]
MFC r308985: revert r304520, set canmount=on is not supposed to mount
the filesystem

git-svn-id: svn://svn.freebsd.org/base/stable/10@310069 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r308887,309090: fix unsafe modification of zfs_vnodeops when
avg [Wed, 14 Dec 2016 16:08:35 +0000 (16:08 +0000)]
MFC r308887,309090: fix unsafe modification of zfs_vnodeops when
DIAGNOSTIC is enabled

git-svn-id: svn://svn.freebsd.org/base/stable/10@310067 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r308480: pmc_process_csw_out: ignore deleted counters
avg [Wed, 14 Dec 2016 16:03:23 +0000 (16:03 +0000)]
MFC r308480: pmc_process_csw_out: ignore deleted counters

git-svn-id: svn://svn.freebsd.org/base/stable/10@310063 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agomake smbus_get_addr() an ivar accessor
avg [Wed, 14 Dec 2016 15:38:28 +0000 (15:38 +0000)]
make smbus_get_addr() an ivar accessor

This is a direct commit to this branch.

smbus_get_addr() was declared as a funciton prototype, but the function
was never defined.  read_ivar and write_ivar methods were unused.

This was exposed after jedec_ts driver was imported to this branch
as that driver turned out to be the first user of smbus_get_addr().

This change is a small subset of a larger change in r281985.

Reported by: jhb
Pointyhat to: avg

git-svn-id: svn://svn.freebsd.org/base/stable/10@310062 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFH (r308996, r309051, r309738): refactor, avoid repeating DNS requests
des [Wed, 14 Dec 2016 14:23:25 +0000 (14:23 +0000)]
MFH (r308996, r309051, r309738): refactor, avoid repeating DNS requests

git-svn-id: svn://svn.freebsd.org/base/stable/10@310060 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r309625
vangyzen [Tue, 13 Dec 2016 23:13:03 +0000 (23:13 +0000)]
MFC r309625

This is imported from NetBSD.  The author--Joerg Sonnenberger--agreed
to apply a two-clause BSD license, just so the license was clear.

This source tree location matches NetBSD, and is the first place someone
might look for such a tool.

Obtained from: Joerg Sonnenberger via NetBSD
Sponsored by: Dell EMC

git-svn-id: svn://svn.freebsd.org/base/stable/10@310043 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r309364 r309367 r309624
vangyzen [Tue, 13 Dec 2016 23:10:35 +0000 (23:10 +0000)]
MFC r309364 r309367 r309624

locale: fix buffer management

Also, handle signed and unsigned chars, and more gracefully handle
invalid input.

locale: enable more warnings; fix them

Do not set WARNS, so it gets the current default of 6.
Fix the warnings by sprinkling static, const, or strdup.
Make some constant data tables const.  Fix whitespace.

Sponsored by: Dell EMC

git-svn-id: svn://svn.freebsd.org/base/stable/10@310041 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r307684, r307747
ken [Mon, 12 Dec 2016 21:54:49 +0000 (21:54 +0000)]
MFC r307684, r307747
  ------------------------------------------------------------------------
  r307684 | ken | 2016-10-20 13:42:26 -0600 (Thu, 20 Oct 2016) | 13 lines

  For CCBs allocated on the stack, we need to clear the entire CCB, not just
  the header.  Otherwise stack garbage can lead to random flags getting set.

  This showed up as 'camcontrol rescan all' failing with EINVAL because the
  address type wasn't CAM_DATA_VADDR.

  sbin/camcontrol/camcontrol.c:
   In rescan_or_reset_bus(), bzero the stack-allocated CCBs before
   use instead of clearing the body.

  Sponsored by: Spectra Logic

  ------------------------------------------------------------------------
  r307747 | ken | 2016-10-21 12:54:56 -0600 (Fri, 21 Oct 2016) | 27 lines

  Fix a problem in camcontrol(8) that cropped up with r307684.

  In r307684, I changed rescan_or_reset_bus() to bzero stack-allocated CCBs
  before sending them to the kernel because there was stack garbage in there
  that wound up meaning that bogus CCB flags were set.

  While this fixed the 'camcontrol rescan all' case (XPT_DEV_MATCH CCBs were
  failing previously), it broke the 'camcontrol rescan 0' (or any other
  number) case when INVARIANTS are turned on.  Rescanning a single bus
  reliably produced an assert in cam_periph_runccb():

  panic: cam_periph_runccb: ccb=0xfffff80044ffe000, func_code=0x708, flags=0xffffdde0

  The flags values don't make sense from the code.  Changing the CCBs in
  rescan_or_reset_bus() from stack to heap allocated avoids the problem.

  It would be better to understand why userland stack allocated CCBs don't
  work properly, since there may be other code that breaks if stack allocated
  CCBs don't work.

  sbin/camcontrol/camcontrol.c:
   In rescan_or_reset_bus(), allocate the CCBs using malloc(3) instead
   of on the stack to avoid an assertion in cam_periph_runccb().

  Sponsored by: Spectra Logic

  ------------------------------------------------------------------------

Sponsored by: Spectra Logic

git-svn-id: svn://svn.freebsd.org/base/stable/10@309956 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r307402: Guard against bad service name argument(s) to load_rc_config()
dteske [Mon, 12 Dec 2016 17:58:43 +0000 (17:58 +0000)]
MFC r307402: Guard against bad service name argument(s) to load_rc_config()

git-svn-id: svn://svn.freebsd.org/base/stable/10@309900 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC: r309060
brueffer [Mon, 12 Dec 2016 11:04:22 +0000 (11:04 +0000)]
MFC: r309060

Fix comment typo.

PR: 208484
Submitted by: madpilot

git-svn-id: svn://svn.freebsd.org/base/stable/10@309885 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r309803:
bapt [Mon, 12 Dec 2016 07:03:10 +0000 (07:03 +0000)]
MFC r309803:

Fix pw groupshow <gid>

PR: 204676
Submitted by: longwitz@incore.de

git-svn-id: svn://svn.freebsd.org/base/stable/10@309881 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r309796:
bapt [Mon, 12 Dec 2016 07:01:05 +0000 (07:01 +0000)]
MFC r309796:

Perl is not available in base fix scripts depending on it to use
the version from ports

PR: 215159
Reported by: Anatoly Kamchatnov <akamch@gmail.com>

git-svn-id: svn://svn.freebsd.org/base/stable/10@309879 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r309795:
bapt [Mon, 12 Dec 2016 06:58:44 +0000 (06:58 +0000)]
MFC r309795:

Update pci ids database to 2016.11.21

git-svn-id: svn://svn.freebsd.org/base/stable/10@309877 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r308350:
markj [Mon, 12 Dec 2016 02:24:46 +0000 (02:24 +0000)]
MFC r308350:
Fix WITNESS hints for pagequeue locks.

git-svn-id: svn://svn.freebsd.org/base/stable/10@309871 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r309241,309243:
delphij [Mon, 12 Dec 2016 02:22:49 +0000 (02:22 +0000)]
MFC r309241,309243:

Plug memory leaks.

git-svn-id: svn://svn.freebsd.org/base/stable/10@309870 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r309238,309239:
delphij [Mon, 12 Dec 2016 02:14:42 +0000 (02:14 +0000)]
MFC r309238,309239:

r309238: Plug a potential memory leak.
r309239: style(9).

git-svn-id: svn://svn.freebsd.org/base/stable/10@309867 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r309232-309234:
delphij [Mon, 12 Dec 2016 00:47:12 +0000 (00:47 +0000)]
MFC r309232-309234:

r309232: Fix an obvious typo.
r309233: Eliminate variables that are computed, assigned but
         never used.
r309234: pages and psize are always assigned, so there is no
         need to initialize them as zero.

git-svn-id: svn://svn.freebsd.org/base/stable/10@309862 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r309722:
dim [Sun, 11 Dec 2016 19:58:13 +0000 (19:58 +0000)]
MFC r309722:

Pull in r281586 from upstream llvm trunk (by Wei Mi):

  Add some shortcuts in LazyValueInfo to reduce compile time of
  Correlated Value Propagation.

  The patch is to partially fix PR10584. Correlated Value Propagation
  queries LVI to check non-null for pointer params of each callsite. If
  we know the def of param is an alloca instruction, we know it is
  non-null and can return early from LVI. Similarly, CVP queries LVI to
  check whether pointer for each mem access is constant. If the def of
  the pointer is an alloca instruction, we know it is not a constant
  pointer. These shortcuts can reduce the cost of CVP significantly.

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

This significantly reduces memory usage and compilation time when
compiling a particular C++ source file of the graphics/colmap port.

PR: 215136

git-svn-id: svn://svn.freebsd.org/base/stable/10@309857 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r308420: MFV r308392: file 5.29.
delphij [Sun, 11 Dec 2016 07:37:20 +0000 (07:37 +0000)]
MFC r308420: MFV r308392: file 5.29.

git-svn-id: svn://svn.freebsd.org/base/stable/10@309848 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r309491: Build smbios.ko as a module for amd64 and i386
rpokala [Sun, 11 Dec 2016 02:01:59 +0000 (02:01 +0000)]
MFC r309491: Build smbios.ko as a module for amd64 and i386

For whatever reason, smapi, smbios, vpd are all under the "bios" directory.
smapi is only for i386, so the entire "bios" directory is only built for
i386. Break smapi out, and make only it i386-specific. Then, build the
"bios" directory for both amd64 and i386.

Because 'sys/modules/Makefile' was refactored after stable/10 was branched,
the diff for that file is different from that of the original commit. They
are functionally equivalent.

git-svn-id: svn://svn.freebsd.org/base/stable/10@309842 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFH (r308297): use what(1) instead of strings(1).
des [Sat, 10 Dec 2016 20:24:22 +0000 (20:24 +0000)]
MFH (r308297): use what(1) instead of strings(1).

PR: 213665
Submitted by: Pawel Worach <pawel.worach@gmail.com>

git-svn-id: svn://svn.freebsd.org/base/stable/10@309830 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFH (r296659): the IPv6 address of the L root changed earlier this year
des [Sat, 10 Dec 2016 20:23:16 +0000 (20:23 +0000)]
MFH (r296659): the IPv6 address of the L root changed earlier this year

git-svn-id: svn://svn.freebsd.org/base/stable/10@309829 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r309544:
bapt [Sat, 10 Dec 2016 11:37:05 +0000 (11:37 +0000)]
MFC r309544:

Import tzdata 2016j

git-svn-id: svn://svn.freebsd.org/base/stable/10@309793 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r309184:
delphij [Sat, 10 Dec 2016 06:27:45 +0000 (06:27 +0000)]
MFC r309184:

style(9) indent changes, no actual code change.

git-svn-id: svn://svn.freebsd.org/base/stable/10@309789 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r309298: libm: remove duplicate version script entries
emaste [Fri, 9 Dec 2016 17:17:37 +0000 (17:17 +0000)]
MFC r309298: libm: remove duplicate version script entries

These symbols already appear in the common lib/msun/Symbol.map.
Duplicate entries produce an error with LLVM's LLD linker.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@309740 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC 309613: cxgbe(4): Update firmwares from version 1.16.12.0 to 1.16.22.0.
jhb [Fri, 9 Dec 2016 01:44:26 +0000 (01:44 +0000)]
MFC 309613: cxgbe(4): Update firmwares from version 1.16.12.0 to 1.16.22.0.

Sponsored by: Chelsio Communications

git-svn-id: svn://svn.freebsd.org/base/stable/10@309724 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoPartial MFC r309300:
mm [Thu, 8 Dec 2016 01:07:00 +0000 (01:07 +0000)]
Partial MFC r309300:

Apply fix for libarchive issue #821:
  "tar -P" cannot extract hardlinks through symlinks

PR: 213255
Reported by: Tijl Coosemans <tilj@FreeBSD.org>

git-svn-id: svn://svn.freebsd.org/base/stable/10@309702 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMerge rr309688: address regressions in SA-16:37.libc.
glebius [Wed, 7 Dec 2016 23:20:26 +0000 (23:20 +0000)]
Merge rr309688: address regressions in SA-16:37.libc.

PR: 215105
Submitted by: <jtd2004a sbcglobal.net>

git-svn-id: svn://svn.freebsd.org/base/stable/10@309690 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoDocument EN-16:19, EN-16:20, EN-16:21, SA-16:36, SA-16:37, SA-16:38.
gjb [Wed, 7 Dec 2016 18:55:55 +0000 (18:55 +0000)]
Document EN-16:19, EN-16:20, EN-16:21, SA-16:36, SA-16:37, SA-16:38.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@309680 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFstable/11 r309661:
ngie [Wed, 7 Dec 2016 00:57:15 +0000 (00:57 +0000)]
MFstable/11 r309661:

MFC r306962:
r306962 (by br):

Ensure data in pipe is available to read.
Useful for latest (5th, direct mode) test only.

git-svn-id: svn://svn.freebsd.org/base/stable/10@309662 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMerge r309640 from head:
glebius [Tue, 6 Dec 2016 18:55:01 +0000 (18:55 +0000)]
Merge r309640 from head:

  Fix possible integer overflow in guest memory bounds checking, which could
  lead to access from the virtual machine to the heap of the bhyve(8) process.

Submitted by: Felix Wilhelm <fwilhelm ernw.de>
Patch by: grehan
Security: FreeBSD-SA-16:38.bhyve

git-svn-id: svn://svn.freebsd.org/base/stable/10@309648 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMerge r309639 from head:
glebius [Tue, 6 Dec 2016 18:53:46 +0000 (18:53 +0000)]
Merge r309639 from head:

  Fix possible buffer overflow(s) in link_ntoa(3).

  A specially crafted sockaddr_dl argument can trigger a static buffer overflow
  in the libc library, with possibility to rewrite with arbitrary data following
  static buffers that belong to other library functions.

Reviewed by: kib
Security: FreeBSD-SA-16:37.libc

git-svn-id: svn://svn.freebsd.org/base/stable/10@309645 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMerge r309638 from head:
glebius [Tue, 6 Dec 2016 18:52:18 +0000 (18:52 +0000)]
Merge r309638 from head:

  When telnetd(8) composes argument list for login(1), an unexpected sequence
  of memory allocation failures combined with insufficient error checking
  could result in the construction and execution of an argument sequence that
  was not intended.

  Fix that treating malloc(3) failures as fatal condition.

Submitted by: brooks
Security: FreeBSD-SA-16:36.telnetd

git-svn-id: svn://svn.freebsd.org/base/stable/10@309642 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r309282: Explicitly initialize cdai.flags.
mav [Tue, 6 Dec 2016 17:10:17 +0000 (17:10 +0000)]
MFC r309282: Explicitly initialize cdai.flags.

In SES driver uninitialized value caused unreliable physpath reporting.

git-svn-id: svn://svn.freebsd.org/base/stable/10@309629 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r309332:
dim [Tue, 6 Dec 2016 07:33:49 +0000 (07:33 +0000)]
MFC r309332:

Cleanup old debug dirs in delete-old-dirs target

Any .debug or .symbols files under /usr/lib/debug which correspond to
OLD_FILES entries in ObsoleteFiles.inc are also automatically cleaned up
by the delete-old target.  Make this also apply to any OLD_DIRS entries.

Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D8683

git-svn-id: svn://svn.freebsd.org/base/stable/10@309605 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFstable/11 r309600:
ngie [Tue, 6 Dec 2016 04:38:08 +0000 (04:38 +0000)]
MFstable/11 r309600:

MFC r307220:
r307220 (by br):

Fix typos: use correct string format and value to compare.

git-svn-id: svn://svn.freebsd.org/base/stable/10@309601 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC 308066: cxgbe(4): Accurate statistics for all chip settings.
jhb [Mon, 5 Dec 2016 23:55:53 +0000 (23:55 +0000)]
MFC 308066: cxgbe(4): Accurate statistics for all chip settings.

There are 4 independent knobs in T5+ chips to include or exclude PAUSE
frames from the "total frames" and "multicast frames" counters in either
direction.  This change lets the driver deal with any combination of
these settings.

git-svn-id: svn://svn.freebsd.org/base/stable/10@309580 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC 307876:
jhb [Mon, 5 Dec 2016 23:46:21 +0000 (23:46 +0000)]
MFC 307876:
cxgbe(4): Fix bug in the calculation of the number of physically
contiguous regions in an mbuf chain.

If the payload of an mbuf ends at a page boundary count_mbuf_nsegs would
incorrectly consider the next mbuf's payload physically contiguous based
solely on a KVA comparison.

git-svn-id: svn://svn.freebsd.org/base/stable/10@309579 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC 307759: cxgbe(4): Dump any mailbox command that times out.
jhb [Mon, 5 Dec 2016 23:35:37 +0000 (23:35 +0000)]
MFC 307759: cxgbe(4): Dump any mailbox command that times out.

git-svn-id: svn://svn.freebsd.org/base/stable/10@309578 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC 307233:
jhb [Mon, 5 Dec 2016 23:25:49 +0000 (23:25 +0000)]
MFC 307233:
cxgbe(4): Allow the interface MTU to be set as high as the actual
hardware limit.

git-svn-id: svn://svn.freebsd.org/base/stable/10@309575 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC 306821,306823: Permit updating firmware config file in flash.
jhb [Mon, 5 Dec 2016 23:02:26 +0000 (23:02 +0000)]
MFC 306821,306823: Permit updating firmware config file in flash.

306821:
cxgbe(4): Add an ioctl to copy a firmware config file to the card's flash.

306823:
cxgbetool: Add a loadcfg subcommand to allow a user to upload a firmware
configuration file to the card.

git-svn-id: svn://svn.freebsd.org/base/stable/10@309569 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC 306277:
jhb [Mon, 5 Dec 2016 22:13:09 +0000 (22:13 +0000)]
MFC 306277:
cxgbe(4): Make the location/length of all descriptor rings available in
the sysctl MIB.

git-svn-id: svn://svn.freebsd.org/base/stable/10@309564 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC 305695,305696,305699,305702,305703,305713,305715,305827,305852,305906,
jhb [Mon, 5 Dec 2016 20:43:25 +0000 (20:43 +0000)]
MFC 305695,305696,305699,305702,305703,305713,305715,305827,305852,305906,
305908,306062,306063,306137,306138,306206,306216,306273,306295,306301,
306465,309302:
Add support for adapters using the Terminator T6 ASIC.

305695:
cxgbe(4): Set up fl_starve_threshold2 accurately for T6.

305696:
cxgbe(4): Use correct macro for header length with T6 ASICs.  This
affects the transmit of the VF driver only.

305699:
cxgbe(4): Update the pad_boundary calculation for T6, which has a
different range of boundaries.

305702:
cxgbe(4): Use smaller min/max bursts for fl descriptors with a T6.

305703:
cxgbe(4): Deal with the slightly different SGE_STAT_CFG in T6.

305713:
cxgbe(4): Add support for additional port types and link speeds.

305715:
cxgbe(4): Catch up with the rename of tlscaps -> cryptocaps.  TLS is one
of the capabilities of the crypto engine in T6.

305827:
cxgbe(4): Use the interface's viid to calculate the PF/VF/VFValid fields
to use in tx work requests.

305852:
cxgbe(4): Attach to cards with the Terminator 6 ASIC.  T6 cards will
come up as 't6nex' nexus devices with 'cc' ports hanging off them.

The T6 firmware and configuration files will be added as soon as they
are released.  For now the driver will try to work with whatever
firmware and configuration is on the card's flash.

305906:
cxgbe/t4_tom: The SMAC entry for a VI is at a different location in the T6.

305908:
cxgbe/t4_tom: Update the active/passive open code to support T6.  Data
path works as-is.

306062:
cxgbe(4): Show wcwr_stats for T6 cards.

306063:
cxgbe(4): Setup congestion response for T6 rx queues.

306137:
cxgbetool: Add T6 support to the SGE context decoder.

306138:
Fix typo.

306206:
cxgbe(4): Catch up with the different layout of WHOAMI in T6.

Note that the code moved below t4_prep_adapter() as part of this change
because now it needs a working chip_id().

306216:
cxgbe(4): Fix the output of the "tids" sysctl on T6.

306273:
cxgbe(4): Fix netmap with T6, which doesn't encapsulate SGE_EGR_UPDATE
message inside a FW_MSG.  The base NIC already deals with updates in
either form.

306295:
cxgbe(4): Support SIOGIFXMEDIA so that ifconfig displays correct media
for 25Gbps and 100Gbps ports.   This should have been part of r305713,
which is when the driver first started reporting extended media types.

306301:
cxgbe(4): Use the port's top speed to figure out whether it is "high
speed" or not (for the purpose of calculating the number of queues etc.)
This does the right thing for 25Gbps and 100Gbps ports.

306465:
cxgbe(4): Claim the T6 -DBG card.

309302:
cxgbe(4): Include firmware for T6 cards in the driver.  Update all
firmwares to 1.16.12.0.

Sponsored by: Chelsio Communications

git-svn-id: svn://svn.freebsd.org/base/stable/10@309560 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC 305667:
jhb [Mon, 5 Dec 2016 19:37:15 +0000 (19:37 +0000)]
MFC 305667:
cxgbe(4): Avoid a NULL dereference in the clearstats ioctl handler.
Port softc's are not initialized when the adapter is in recovery mode.

git-svn-id: svn://svn.freebsd.org/base/stable/10@309559 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC 305652: cxgbe(4): Do not prescreen frames before attempting LRO.
jhb [Mon, 5 Dec 2016 19:34:52 +0000 (19:34 +0000)]
MFC 305652: cxgbe(4): Do not prescreen frames before attempting LRO.

git-svn-id: svn://svn.freebsd.org/base/stable/10@309558 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC 305433:
jhb [Mon, 5 Dec 2016 19:32:06 +0000 (19:32 +0000)]
MFC 305433:
cxgbe/t4_tom: toepcb should be all-zero on allocation because the code
that cleans up on failure assumes that non-NULL values indicate
initialized items.

git-svn-id: svn://svn.freebsd.org/base/stable/10@309557 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC 303688,303750,305166,305167: Centralize and rework page pod handling.
jhb [Mon, 5 Dec 2016 19:16:46 +0000 (19:16 +0000)]
MFC 303688,303750,305166,305167: Centralize and rework page pod handling.

Note that the TOE DDP code in 10 is different from 11 and later and
had to be updated directly.

303688:
cxgbe/t4_tom: Read the chip's DDP page sizes and save them in a
per-adapter data structure.  This replaces a global array with hardcoded
page sizes.

303750:
cxgbe/t4_tom: The page pod arena allocates from pod address space and
not index space.  The minimum valid allocation out of this arena is the
size of a single page pod.

305166:
cxgbe/t4_tom: Add general purpose routines to deal with page pod regions
and allocations within them.  Switch to these routines to manage the TOE
DDP region.

305167:
cxgbe/t4_tom: Two new routines to allocate and write page pods for a
buffer in the kernel's address space.

Sponsored by: Chelsio Communications

git-svn-id: svn://svn.freebsd.org/base/stable/10@309556 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r309026: open(2): Clarify non-POSIX error when opening a symlink with
jilles [Sun, 4 Dec 2016 16:00:25 +0000 (16:00 +0000)]
MFC r309026: open(2): Clarify non-POSIX error when opening a symlink with
O_NOFOLLOW.

We return [EMLINK] instead of [ELOOP] when trying to open a symlink with
O_NOFOLLOW, so that the original case of [ELOOP] can be distinguished. Code
like cmp -h and xz takes advantage of this.

PR: 214633

git-svn-id: svn://svn.freebsd.org/base/stable/10@309536 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r309209:
kib [Sun, 4 Dec 2016 13:56:15 +0000 (13:56 +0000)]
MFC r309209:
Do not enable nullfs vnode caching over nfs v4 mounts.

git-svn-id: svn://svn.freebsd.org/base/stable/10@309530 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoAdd sys/systm.h to have critical_enter() defined, required by
kib [Sun, 4 Dec 2016 13:53:06 +0000 (13:53 +0000)]
Add sys/systm.h to have critical_enter() defined, required by
machine/counter.h on i386.

This is a direct commit to stable/10.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@309529 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC: r308871
rmacklem [Sat, 3 Dec 2016 21:56:46 +0000 (21:56 +0000)]
MFC: r308871
Modify umount so that it does not do an Unmount RPC for NFSv4 mounts
and uses TCP for the Unmount RPC if the mount is over TCP.
Without this patch, umount does an Unmount RPC over UDP for all NFS mounts.

git-svn-id: svn://svn.freebsd.org/base/stable/10@309518 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r309356: svn 1.9.4 -> 1.9.5
peter [Sat, 3 Dec 2016 20:30:25 +0000 (20:30 +0000)]
MFC r309356: svn 1.9.4 -> 1.9.5

git-svn-id: svn://svn.freebsd.org/base/stable/10@309512 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r301761:
trasz [Sat, 3 Dec 2016 20:01:12 +0000 (20:01 +0000)]
MFC r301761:

Fix frexpl() declaration to not include the field name.

git-svn-id: svn://svn.freebsd.org/base/stable/10@309510 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r308206:
trasz [Sat, 3 Dec 2016 19:55:55 +0000 (19:55 +0000)]
MFC r308206:

Make autounmountd(8) not die when traced with "truss -p".

git-svn-id: svn://svn.freebsd.org/base/stable/10@309509 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r264196:
ngie [Sat, 3 Dec 2016 19:52:33 +0000 (19:52 +0000)]
MFC r264196:
r264196 (by theraven):

Move definitions out of rpc_com so that the linker doesn't complain about
multiple definitions.

git-svn-id: svn://svn.freebsd.org/base/stable/10@309507 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r301770:
ngie [Sat, 3 Dec 2016 19:21:35 +0000 (19:21 +0000)]
MFC r301770:
r301770 (by pfg):

rpcbind(8): Make use of some xdr_* macros.

xdr_rpcproc, xdr_rpcprog and xdr_rpcvers were broken in older
versions of FreeBSD but fixed in r296394.  Give them some use
hoping they help make the code somewhat more readable.

git-svn-id: svn://svn.freebsd.org/base/stable/10@309506 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r298183,r304226:
ngie [Sat, 3 Dec 2016 19:15:26 +0000 (19:15 +0000)]
MFC r298183,r304226:

r298183 (by araujo):

Use NULL for pointers.

strrchr(3) will return NULL if the character does not appears in
the string.

r304226 (by araujo):

Use nitems() from sys/param.h.

git-svn-id: svn://svn.freebsd.org/base/stable/10@309505 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r297975:
ngie [Sat, 3 Dec 2016 19:03:25 +0000 (19:03 +0000)]
MFC r297975:
r297975 (by pfg):

RPC: for pointers replace 0 with NULL.

These are mostly cosmetical, no functional change.

Found with devel/coccinelle.

git-svn-id: svn://svn.freebsd.org/base/stable/10@309503 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r296133:
ngie [Sat, 3 Dec 2016 18:56:28 +0000 (18:56 +0000)]
MFC r296133:
r296133 (by pfg):

RPC: update the getrpcbyname() definition to include a const qualifier.

Add const qualifier making getrpcbyname() and getrpcbyname_r()
prototypes match those used in latest Sun RPC code (TI-RPC 2.3).

Obtained from: NetBSD

git-svn-id: svn://svn.freebsd.org/base/stable/10@309502 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r301734:
ngie [Sat, 3 Dec 2016 18:53:03 +0000 (18:53 +0000)]
MFC r301734:
r301734 (by kevlo):

Fix the rpcb_getaddr() definition to match its declaration.

git-svn-id: svn://svn.freebsd.org/base/stable/10@309501 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r296404:
ngie [Sat, 3 Dec 2016 18:48:39 +0000 (18:48 +0000)]
MFC r296404:
r296404 (by pfg):

Stray tabs and spaces.

No functional change.

git-svn-id: svn://svn.freebsd.org/base/stable/10@309500 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r287353:
ngie [Sat, 3 Dec 2016 18:45:12 +0000 (18:45 +0000)]
MFC r287353:
r287353 (by rodrigc):

Use unsigned variable.

Eliminates gcc 4.9 compiler warning.

git-svn-id: svn://svn.freebsd.org/base/stable/10@309499 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r296386:
ngie [Sat, 3 Dec 2016 18:40:39 +0000 (18:40 +0000)]
MFC r296386:
r296386 (by pfg):

Work around aliasing issues detected in modern GCC.

Avoid casting gymnastics that lead to pointer aliasing by introducing an
inline function as done in NetBSD (but without #if0'd WIP code).

Obtained from: NetBSD (CVS Rev. 1.24, 1.25)

git-svn-id: svn://svn.freebsd.org/base/stable/10@309498 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r278039:
ngie [Sat, 3 Dec 2016 18:26:41 +0000 (18:26 +0000)]
MFC r278039:
r278039 (by pfg):

Resource leak

CID: 1016703

git-svn-id: svn://svn.freebsd.org/base/stable/10@309497 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r288017:
ngie [Sat, 3 Dec 2016 18:25:23 +0000 (18:25 +0000)]
MFC r288017:
r288017 (by rodrigc):

Use ANSI C prototypes.

Eliminates gcc 4.9 warnings.

git-svn-id: svn://svn.freebsd.org/base/stable/10@309496 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r288995:
ngie [Sat, 3 Dec 2016 18:21:28 +0000 (18:21 +0000)]
MFC r288995:
r288995 (by rodrigc):

Use proper function prototypes.
Eliminates -Wstrict-prototypes warning

git-svn-id: svn://svn.freebsd.org/base/stable/10@309495 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r287347:
ngie [Sat, 3 Dec 2016 18:17:06 +0000 (18:17 +0000)]
MFC r287347:
r287347 (by rodrigc):

Use ANSI C prototypes.

Eliminates gcc 4.9 warnings.

git-svn-id: svn://svn.freebsd.org/base/stable/10@309494 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r301754,r301769:
ngie [Sat, 3 Dec 2016 18:14:29 +0000 (18:14 +0000)]
MFC r301754,r301769:

r301754 (by pfg):

libc/rpc: Make use of some xdr_* macros.

xdr_rpcprog and xdr_rpcvers were broken in older versions of FreeBSD
but were fixed in r296394. Give them some use hoping they help make
the code somewhat more readable.

r301769 (by pfg):

libc/rpc: Make use of some xdr_* macros. (part 2)

xdr_rpcproc, xdr_rpcprog and xdr_rpcvers were broken in older
versions of FreeBSD but fixed in r296394.  Give them some use
hoping they help make the code somewhat more readable.

git-svn-id: svn://svn.freebsd.org/base/stable/10@309493 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r278041:
ngie [Sat, 3 Dec 2016 18:08:49 +0000 (18:08 +0000)]
MFC r278041:
r278041 (by pfg):

rpc: Uninitialized pointer read

Initialize *xprt to avoid exposing a random value
in cleanup_svc_vc_create.

CID: 1018723
Phabric: D1749

git-svn-id: svn://svn.freebsd.org/base/stable/10@309492 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r287341,r287342,r287348:
ngie [Sat, 3 Dec 2016 17:40:58 +0000 (17:40 +0000)]
MFC r287341,r287342,r287348:

r287341 (by rodrigc):

Use ANSI C prototypes.

Eliminates gcc 4.9 warnings.

r287342 (by rodrigc):

Mark unused parameters to reduce gcc 4.9 warnings.

r287348 (by rodrigc):

Use correct function prototype for signal handler.

Eliminates gcc 4.9 warning.

git-svn-id: svn://svn.freebsd.org/base/stable/10@309489 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r288113:
ngie [Sat, 3 Dec 2016 17:27:28 +0000 (17:27 +0000)]
MFC r288113:
r288113 (by rodrigc):

Use ANSI C prototypes.  Eliminates -Wold-style-definition warnings.

git-svn-id: svn://svn.freebsd.org/base/stable/10@309487 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r297790:
ngie [Sat, 3 Dec 2016 17:17:42 +0000 (17:17 +0000)]
MFC r297790:
r297790 (by pfg):

libc: replace 0 with NULL for pointers.

While here also cleanup some surrounding code; particularly
drop some malloc() casts.

Found with devel/coccinelle.

git-svn-id: svn://svn.freebsd.org/base/stable/10@309485 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r287350:
ngie [Sat, 3 Dec 2016 17:10:37 +0000 (17:10 +0000)]
MFC r287350:
r287350 (by rodrigc):

Use ANSI C prototypes.

Eliminates gcc 4.9 warnings.

git-svn-id: svn://svn.freebsd.org/base/stable/10@309484 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r299704:
ngie [Sat, 3 Dec 2016 16:52:40 +0000 (16:52 +0000)]
MFC r299704:
r299704 (by vangyzen):

iconvctl(3): remove superfluous NULL pointer tests

convname and dst are guaranteed to be non-NULL by iconv_open(3).
src is an array. Remove these tests for NULL pointers.
While I'm here, eliminate a strlcpy with a correct but suspicious-looking
calculation for the third parameter (i.e. not a simple sizeof).
Compare the strings in-place instead of copying.

Found by: bdrewery
Found by: Coverity
CID: 11300501130056

git-svn-id: svn://svn.freebsd.org/base/stable/10@309482 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC 303348:
jhb [Sat, 3 Dec 2016 01:10:45 +0000 (01:10 +0000)]
MFC 303348:
cxgbe(4): Initialize the adapter queues (fwq and mgmtq) instead of
returning EAGAIN if they aren't available when the user tries to program
a filter.  Do this after validating the filter so that the driver
doesn't bring up the queues if it doesn't have to.

git-svn-id: svn://svn.freebsd.org/base/stable/10@309459 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC 302440,304873,305704,305985,306787,307531: Fixes for sysctls.
jhb [Sat, 3 Dec 2016 01:04:59 +0000 (01:04 +0000)]
MFC 302440,304873,305704,305985,306787,307531: Fixes for sysctls.

302440:
cxgbe(4): Add sysctl to display the RSS indirection table size for an
interface.

dev.cxl.<n>.rss_size
dev.vcxl.<n>.rss_size

304873:
cxgbe(4): Provide more details about the card in the sysctl MIB.

dev.t5nex.0.%desc: Chelsio T580-CR
dev.t5nex.0.hw_revision: 1
dev.t5nex.0.sn: PT13140042
dev.t5nex.0.pn: 110117150A0
dev.t5nex.0.ec: 0000000000000000
dev.t5nex.0.na: 0007432AF490
dev.t5nex.0.vpd_version: 3
dev.t5nex.0.scfg_version: 53255
dev.t5nex.0.bs_version: 1.1.0.0
dev.t5nex.0.er_version: 1.0.0.68
dev.t5nex.0.tp_version: 0.1.4.9
dev.t5nex.0.firmware_version: 1.16.2.0

305704:
cxgbe(4): Rename the debug_flags driver tunable/sysctl to dflags.
Tunables that end with _flags are special.

305985:
cxgbe(4): Fixes to wrq stats.

- Increment tx_wrs_copied in the correct place.
- Add tx_wrs_sspace to the sysctl MIB.

306787:
cxgbe(4): Fix whitespace in the pm_stats display.

307531:
cxgbe(4): Adjust whitespace to line up the column titles in cim_qcfg
with the values displayed.

Sponsored by: Chelsio Communications

git-svn-id: svn://svn.freebsd.org/base/stable/10@309458 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r309179:
pfg [Sat, 3 Dec 2016 00:45:13 +0000 (00:45 +0000)]
MFC r309179:
ext2fs: avoid possible overflow when calculating malloc size.

This is inspired on r308064 for the case of mounting UFS.

git-svn-id: svn://svn.freebsd.org/base/stable/10@309456 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFstable/11 r309453:
ngie [Sat, 3 Dec 2016 00:40:08 +0000 (00:40 +0000)]
MFstable/11 r309453:

MFC r307700:

Only build lib/libc/tests/iconv if MK_ICONV != no

git-svn-id: svn://svn.freebsd.org/base/stable/10@309454 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC 304854: cxgbe/iw_cxgbe: Various fixes to the iWARP driver.
jhb [Sat, 3 Dec 2016 00:18:38 +0000 (00:18 +0000)]
MFC 304854: cxgbe/iw_cxgbe: Various fixes to the iWARP driver.

- Return appropriate error code instead of ENOMEM when sosend() fails in
  send_mpa_req.
- Fix for problematic race during destroy_qp.
- Abortive close in the failure of send_mpa_reject() instead of normal close.
- Remove the unnecessary doorbell flowcontrol logic.

Sponsored by: Chelsio Communications

git-svn-id: svn://svn.freebsd.org/base/stable/10@309450 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC 303859,305851: Fix a typo and some whitespace nits.
jhb [Fri, 2 Dec 2016 23:05:14 +0000 (23:05 +0000)]
MFC 303859,305851: Fix a typo and some whitespace nits.

git-svn-id: svn://svn.freebsd.org/base/stable/10@309449 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f