]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
7 years agoMFC r299339
arybchik [Sat, 4 Jun 2016 14:42:36 +0000 (14:42 +0000)]
MFC r299339

sfxge(4): cleanup: remove obsolete common code module

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC r299338, r299345
arybchik [Sat, 4 Jun 2016 14:41:09 +0000 (14:41 +0000)]
MFC r299338, r299345

sfxge(4): cleanup: fix typos

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC r299337
arybchik [Sat, 4 Jun 2016 14:39:26 +0000 (14:39 +0000)]
MFC r299337

sfxge(4): cleanup efx_check.h comments and error messages

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC r299320-r299328, r299330-r299336
arybchik [Sat, 4 Jun 2016 14:37:36 +0000 (14:37 +0000)]
MFC r299320-r299328, r299330-r299336

sfxge(4): remove EFSYS_OPT_FALCON and related EFSYS_OPT_ options

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC r299402
arybchik [Sat, 4 Jun 2016 14:29:20 +0000 (14:29 +0000)]
MFC r299402

sfxge(4): add TLV format buffer manipulation functions for V3 licensing

The licensing partition for V3 licensing will use the standard TLV format,
so Medford licensing operations on the staging buffer are implemented using
the TLV functions.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC r299319
arybchik [Sat, 4 Jun 2016 14:27:59 +0000 (14:27 +0000)]
MFC r299319

sfxge(4): add TLV item manipulation functions to common code

Add creation, deletion and checksumming operations to the private copy of
TLV functions in the common code.  Functions added in preparation for V3
licensing support, as licensing keys are stored in the TLV format.  Missing
support for multiple segment partitions added. Annotations for Windows code
analysis also updated.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC r299318
arybchik [Sat, 4 Jun 2016 14:26:40 +0000 (14:26 +0000)]
MFC r299318

sfxge(4): restructure TLV buffer validation

Move TLV buffer validation into ef10-specific function and add accessor
function which also converts the partition ID to the internal
representation.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC r299254
arybchik [Sat, 4 Jun 2016 14:23:11 +0000 (14:23 +0000)]
MFC r299254

sfxge(4): remove EFSYS_OPT_PCIE_TUNE

With the removal of Falcon support, this is now dead code.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC r299253
arybchik [Sat, 4 Jun 2016 14:20:45 +0000 (14:20 +0000)]
MFC r299253

sfxge(4): disable common code support for Falcon

This patch ensures that client code will fail to build
with Falcon support. Following patches remove Falcon
support code entirely.

sfxge(4) has never supported Falcon.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC r299252
arybchik [Sat, 4 Jun 2016 14:19:00 +0000 (14:19 +0000)]
MFC r299252

sfxge(4): cleanup: fix obsolete EFSYS_OPT_PHY_BIST option

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC r299251
arybchik [Sat, 4 Jun 2016 14:16:00 +0000 (14:16 +0000)]
MFC r299251

sfxge(4): Siena no longer supports EFSYS_OPT_PCIE_TUNE

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC r299250
arybchik [Sat, 4 Jun 2016 14:13:56 +0000 (14:13 +0000)]
MFC r299250

sfxge(4): remove unused efx_nic_pcie_extended_sync()

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC r301105
arybchik [Sat, 4 Jun 2016 14:11:32 +0000 (14:11 +0000)]
MFC r301105

sfxge(4): cope with code duplication on SW events composition

Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC r301075
arybchik [Sat, 4 Jun 2016 14:09:39 +0000 (14:09 +0000)]
MFC r301075

sfxge(4): avoid code duplication in SW events definition

Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC r301067
arybchik [Sat, 4 Jun 2016 14:07:42 +0000 (14:07 +0000)]
MFC r301067

sfxge(4): move definition of the SW events to sfxge.h

Tx flush done event is defined and Rx-specific header is not a good
place for it.

Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC r301065
arybchik [Sat, 4 Jun 2016 14:06:22 +0000 (14:06 +0000)]
MFC r301065

sfxge(4): zero should be used as RxQ label in SW event

The buggy code was using the rxq index but should use the evq label
associated with the rxq. It was missed in r298735.

Sponsored by:   Solarflare Communications, Inc.

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

7 years agoMFC r300365:
kib [Sat, 4 Jun 2016 10:19:07 +0000 (10:19 +0000)]
MFC r300365:
Remove zero assignments in the cdev allocator.  cdp memory is
requested with M_ZERO.

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

7 years agoMFC r300364:
kib [Sat, 4 Jun 2016 10:16:58 +0000 (10:16 +0000)]
MFC r300364:
Improve handling of rdev->si_mountpt on mount and unmount of FFS
volumes.  Treat the field as a semaphore protecting availability of
the device for mounting.  Do no access devvp->v_rdev without the vnode
lock owned.

Protect change of the devvp->v_bufobj bo_ops vector with the vnode
lock.

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

7 years agoMFC r300376:
pfg [Sat, 4 Jun 2016 04:01:28 +0000 (04:01 +0000)]
MFC r300376:
ndis(4): Better mimic the behavior of rand() on Windows.

In ndis(4) we expose a rand() function that was constantly reseeding
with a time depending function every time it was called. This
essentially broke the reasoning behind seeding, and rendered srand()
a no-op.

Keep it simple, just use random() and srandom() as it's meant to work.
It would have been tempting to just go for arc4random() but we
want to mimic Microsoft, and we don't need crypto-grade randomness
here.

PR: 209616

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

7 years agoMFC r301101:
gjb [Sat, 4 Jun 2016 00:32:26 +0000 (00:32 +0000)]
MFC r301101:
  Turn off nfsv4acls for arm/armv6 builds, which has an impact
  on performance, especially with SD cards on certain SoCs.

Sponsored by: The FreeBSD Foundation

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

7 years agoMFC r294832:
hselasky [Fri, 3 Jun 2016 10:17:19 +0000 (10:17 +0000)]
MFC r294832:
Implement ether_addr_equal(), ether_addr_equal_64bits() and
random_ether_addr() for the LinuxKPI.

Sponsored by: Mellanox Technologies

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

7 years agoMFC r300489:
hselasky [Fri, 3 Jun 2016 09:10:37 +0000 (09:10 +0000)]
MFC r300489:
Use DELAY() instead of _sleep() when SCHEDULER_STOPPED() is set inside
pause_sbt(). This allows pause() to continue working during a panic()
which is not invoking KDB. This is useful when debugging graphics
drivers using the LinuxKPI.

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

7 years agoMFC r300282:
hselasky [Fri, 3 Jun 2016 09:07:40 +0000 (09:07 +0000)]
MFC r300282:
Verify one sysctl parameter at a time. When a mlx5en sysctl parameter
is updated only verify the changed one instead of all.

No functional change.

Sponsored by: Mellanox Technologies
Tested by: Netflix

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

7 years agoMFC r300280:
hselasky [Fri, 3 Jun 2016 09:05:49 +0000 (09:05 +0000)]
MFC r300280:
Optimise use of doorbell and remove redundant NOPs

Store the last doorbell write in the mlx5e_sq structure and write the
doorbell to the hardware when the transmit routine finishes
transmitting all queued mbufs.

Sponsored by: Mellanox Technologies
Tested by: Netflix

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

7 years agoMFC r300277:
hselasky [Fri, 3 Jun 2016 09:03:44 +0000 (09:03 +0000)]
MFC r300277:
Implement TX completion event interleaving.

This patch implements a sysctl which allows setting a factor, N, for
how many work queue elements can be generated before requiring a
completion event. When a completion event happens the code simulates N
completion events instead of only one. When draining a transmit queue,
N-1 NOPs are transmitted at most, to force generation of the final
completion event.  Further a timer is running every HZ ticks to flush
any remaining data off the transmit queue when the tx_completion_fact
> 1.

The goal of this feature is to reduce the PCI bandwidth needed when
transmitting data.

Sponsored by: Mellanox Technologies
Tested by: Netflix

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

7 years agoMFC r301247: MFV r301238:
delphij [Fri, 3 Jun 2016 08:59:21 +0000 (08:59 +0000)]
MFC r301247: MFV r301238:

ntp 4.2.8p8.

Security: CVE-2016-4957, CVE-2016-4953, CVE-2016-4954
Security: CVE-2016-4955, CVE-2016-4956
Security: FreeBSD-SA-16:24.ntp
Relnotes: yes

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

7 years agoMFC r300667:
hselasky [Fri, 3 Jun 2016 08:55:28 +0000 (08:55 +0000)]
MFC r300667:
Check for signals when locking the USB enumeration thread from
userspace, so that USB applications can be killed if an enumeration
thread should be stuck for various reasons.

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

7 years agoMFC r299060:
hselasky [Fri, 3 Jun 2016 08:49:04 +0000 (08:49 +0000)]
MFC r299060:
Extend the UQ_NO_STRINGS quirk to also cover the USB language string
descriptor. This fixes enumeration of some older Samsung Galaxy S3
phones.

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

7 years agoFor EILSEQ case in mbsnrtowcs() and wcsnrtombs() update src to point to
ache [Fri, 3 Jun 2016 07:34:59 +0000 (07:34 +0000)]
For EILSEQ case in mbsnrtowcs() and wcsnrtombs() update src to point to
the character after the one this conversion stopped at.

PR:     209907
Submitted by:   Roel Standaert <roel@abittechnical.com> (partially)

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

7 years agoMFC r300322, 300340:
pfg [Fri, 3 Jun 2016 03:20:54 +0000 (03:20 +0000)]
MFC r300322, 300340:
ed(1): Cleanups for the DES mode.

- Use arc4random_buf(3).
- Prevent a segmentation fault when ed receives a signal
  while being in getpass(). [1]

Obtained from: OpenBSD [1] (CVS Rev. 1.15)

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

7 years agoMFC r300304:
pfg [Fri, 3 Jun 2016 03:12:28 +0000 (03:12 +0000)]
MFC r300304:
gas/config/tc-arm.c: Minor re-sorting to match upstream history.

No functional change.

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

7 years agoMFC r266941, r266955
truckman [Fri, 3 Jun 2016 00:48:50 +0000 (00:48 +0000)]
MFC r266941, r266955

Needed for anticipated dummynet AQM MFC next week.

r266941 | hiren | 2014-06-01 00:28:24 -0700 (Sun, 01 Jun 2014) | 9 lines

ECN marking implenetation for dummynet.
Changes include both DCTCP and RFC 3168 ECN marking methodology.

DCTCP draft: http://tools.ietf.org/html/draft-bensley-tcpm-dctcp-00

Submitted by: Midori Kato (aoimidori27@gmail.com)
Worked with: Lars Eggert (lars@netapp.com)
Reviewed by: luigi, hiren

r266955 | hiren | 2014-06-01 13:19:17 -0700 (Sun, 01 Jun 2014) | 5 lines

DNOLD_IS_ECN introduced by r266941 is not required.
DNOLD_* flags are for compat with old binaries.

Suggested by: luigi

Discussed with: hiren
Relnotes: yes

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

7 years agoMFC r299121
asomers [Thu, 2 Jun 2016 17:08:08 +0000 (17:08 +0000)]
MFC r299121

mpr(4) and mps(4) shouldn't indefinitely retry for "terminated ioc" errors

Sponsored by: Spectra Logic Corp

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

7 years agoAdd missing file from r301145
asomers [Thu, 2 Jun 2016 16:40:09 +0000 (16:40 +0000)]
Add missing file from r301145

This is a direct commit to stable/10, because it's fixing a mistake made in
an MFC.  I forgot to commit etc/mtree/BSD.tests.dist.

Pointyhat to: asomers
Sponsored by: Spectra Logic Corp

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

7 years agoMFC r300758:
kib [Thu, 2 Jun 2016 02:39:40 +0000 (02:39 +0000)]
MFC r300758:
Prevent parallel object collapses.

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

7 years agoMFC r300756:
kib [Thu, 2 Jun 2016 02:36:06 +0000 (02:36 +0000)]
MFC r300756:
Style.

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

7 years agoMFC r300705 (compensating for fortune moving from games to usr.bin)
truckman [Wed, 1 Jun 2016 22:39:15 +0000 (22:39 +0000)]
MFC r300705 (compensating for fortune moving from games to usr.bin)

Avoid buffer overflow when copying the input file name and appending .dat.

Check the return value from fread() to be sure that it was successful.

Reported by: Coverity
CID: 10067091009452

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

7 years agoMFC: r300169
rmacklem [Wed, 1 Jun 2016 20:30:31 +0000 (20:30 +0000)]
MFC: r300169
If a local (AF_LOCAL, AF_UNIX) socket creation (bind) is attempted
on a fuse mounted file system, it will crash. Although it may be
possible to make this work correctly, this patch avoids the crash
in the meantime.
I removed the MPASS(), since panicing for the FIFO case didn't make
a lot of sense when it returns an error for the others.

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

7 years agoMFC r300706
truckman [Wed, 1 Jun 2016 17:57:56 +0000 (17:57 +0000)]
MFC r300706

Avoid buffer overflow or truncation when constructing path_zoneinfo_file.

Reported by: Coverity
CID: 1011160

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

7 years agoMFC r300692
truckman [Wed, 1 Jun 2016 17:47:34 +0000 (17:47 +0000)]
MFC r300692

Close the input FILE * in read_file() and the output FILE * in write_file()
if read_stream() or write_stream() fails to avoid leaking the FILE.

Reported by: Coverity
CID: 977702
Reviewed by: pfg
Differential Revision: https://reviews.freebsd.org/D6554

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

7 years agoMFC r300666
truckman [Wed, 1 Jun 2016 17:45:00 +0000 (17:45 +0000)]
MFC r300666

Call closedir() before returning from fetchListFile() to avoid a leak.

Reported by: Coverity
CID: 1016697

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

7 years agoMFC r300665
truckman [Wed, 1 Jun 2016 17:43:04 +0000 (17:43 +0000)]
MFC r300665

Don't leak addrinfo in fetch_bind()

Submitted by: Coverity
CID: 1225038

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

7 years agoMFC r300664
truckman [Wed, 1 Jun 2016 17:41:00 +0000 (17:41 +0000)]
MFC r300664

Fix Coverity CID 978183 Resource leak in rexec().

Close the socket if connect() fails to avoid leaking it.

Reported by: Coverity
CID: 978183

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

7 years agoMFC r300662
truckman [Wed, 1 Jun 2016 17:39:03 +0000 (17:39 +0000)]
MFC r300662

Fix Coverity CID 1016714 Resource leak in process_file_actions_entry()

Don't leak a file descriptor of _dup2() fails (shouldn't happen).

Reported by: Coverity
CID: 1016714

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

7 years agoMFC r300660
truckman [Wed, 1 Jun 2016 17:37:16 +0000 (17:37 +0000)]
MFC r300660

Fix 1016718 Resource leak.

Don't leak a file descriptor if fchdir() fails.

Reported by: Coverity
CID: 1016718

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

7 years agoMFC r300649
truckman [Wed, 1 Jun 2016 17:35:03 +0000 (17:35 +0000)]
MFC r300649

Fix Coverity CID 1019054 (String not null terminated) in setfacl.

Increase the size of buf[] by one to allow room for a NUL character
at the end.

Reported by: Coverity
CID: 1019054

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

7 years agoMFC r300648
truckman [Wed, 1 Jun 2016 17:33:02 +0000 (17:33 +0000)]
MFC r300648

Fix CID 1011370 (Resource leak) in ps.

There is no need to to call strdup() on the value returned by fmt().
The latter calls fmt_argv() which always returns a dynamically
allocated string, and calling strdup() on that leaks the memory
allocated by fmt_argv().  Wave some const magic on ki_args and
ki_env to make the direct assignment happy.  This requires a tweak
to the asprintf() case to avoid a const vs. non-const mismatch.

Reported by: Coverity
CID: 1011370

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

7 years agoMFC r300643
truckman [Wed, 1 Jun 2016 17:30:50 +0000 (17:30 +0000)]
MFC r300643

Close from_fd if malloc() fails to avoid a file descriptor leak.

Reported by: Coverity
CID: 1007203

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

7 years agoMFC r300642
truckman [Wed, 1 Jun 2016 17:29:15 +0000 (17:29 +0000)]
MFC r300642

Match the descriptions of the \H and \h prompt string sequences to reality.
They were swapped.

X-Confirmed by: jilles

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

7 years agoMFC r298483, r298744, r299085, r299087, and r300747 to usr.sbin/extattr
asomers [Wed, 1 Jun 2016 17:22:15 +0000 (17:22 +0000)]
MFC r298483, r298744, r299085, r299087, and r300747 to usr.sbin/extattr

r300747 | asomers | 2016-05-26 08:26:49 -0600 (Thu, 26 May 2016) | 8 lines

rmextattr(8) man page clarifications regarding -qq

r299087 | asomers | 2016-05-04 15:07:30 -0600 (Wed, 04 May 2016) | 13 lines

Fix "getextattr -x" with non-ascii attribute values

extattr/rmextattr.c
        When printing hex output, treat all attribute values as unsigned
        char arrays instead of sign extending them to 32 bit values.

extattr/tests/extattr_test.sh
        Add a regression test

r299085 | asomers | 2016-05-04 14:20:55 -0600 (Wed, 04 May 2016) | 30 lines

Allow setextattr(8) to take attribute values from stdin

Add the -i option to setextattr. This option allow extended attribute data
to be provided via stdin. Add a -qq option to getextattr, which omits the
trailing newline. Together these options can be used to work with extended
attributes whose values are large and/or binary.

usr.sbin/extattr/Makefile:
        Link against libsbuf which is used for processing stdin data.

usr.sbin/extattr/rmextattr.8:
        Document setextattr's -i option, getextattr's -qq option, and remove
        the BUG about setextattr only being useful for strings.

usr.sbin/extattr/rmextattr.c:
        For setextattr operations, buffer attribute data in an sbuf. If -i
        is specified, pull the data from stdin, otherwise from the
        appropriate argurment.

        Update usage text and argument validation code for setextattr's -i
        option.

usr.sbin/extattr/tests/extattr_test.sh
        Add tests for -q and -i.

r298744 | asomers | 2016-04-28 09:13:50 -0600 (Thu, 28 Apr 2016) | 11 lines

Add PACKAGE fields to usr.sbin/extattr/tests/Makefile

usr.sbin/extattr/tests/Makefile
        Add boiler plate required by 298107 but omitted by 298483.  These
        two changes passed through CR in parallel.  I think this should get
        the full test suite running in Jenkins again.

r298483 | asomers | 2016-04-22 11:02:47 -0600 (Fri, 22 Apr 2016) | 10 lines

Add ATF tests for usr.sbin/extattr

Add ATF tests for the existing behavior of setextattr, rmextattr, lsextattr,
and getextattr.

Sponsored by: Spectra Logic Corp

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

7 years agoMFC r300636
truckman [Wed, 1 Jun 2016 17:20:36 +0000 (17:20 +0000)]
MFC r300636

Delay calling yp_malloc_dnsent() until after some additional sanity
checks to avoid leaking memory on error returns.

Reported by: Coverity
CID: 1007416

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

7 years agoMFC r300635
truckman [Wed, 1 Jun 2016 17:18:35 +0000 (17:18 +0000)]
MFC r300635

Call free(cur) if strdup(dirp->d_name) fails to avoid a memory leak.

Reported by: Coverity
CID: 1007414

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

7 years agoMFC r300633
truckman [Wed, 1 Jun 2016 17:16:35 +0000 (17:16 +0000)]
MFC r300633

Fix acpidb CIDs 1011279 (Buffer not null terminated) and 978405 and
1199380 (Resource leak).

load_dsdt() calls strncpy() to copy a filename and Coverity warns
that the destination buffer may not be NUL terminated.  Fix this
by using strlcpy() instead.  If silent truncation occurs, then the
filename was not valid anyway.

load_dsdt() leaks an fd (CID 978405) and a memory region allocated
using mmap() (CID 1199380) when it returns.  Fix these by calling
close() and munmap() as appropriate.

Don't bother fixing the minor memory leak "list", allocated by
AcGetAllTablesFromFile() (CID 1355191).

Check for truncation when creating the temp file name.

Set a flag to indicate that the temp file should be unlinked.
Relying on a strcmp() test could delete the input file in contrived
cases.

Reported by: Coverity
CID: 1011279, 978405, 1199380
Reviewed by: jkim
Differential Revision: https://reviews.freebsd.org/D6368

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

7 years agoMFC r300632
truckman [Wed, 1 Jun 2016 17:13:43 +0000 (17:13 +0000)]
MFC r300632

Fix acpidump CID 1011278 (Buffer not null terminated) and other issues

Coverity reports that a buffer used for temporary file generation
might not be NUL terminated by strncpy().  This is probably not
true because the input gets passed through realpath(), but if the
path name is sufficiently long the name could be truncated and cause
other problems.  The code for generating the temp file names is
also overly complex.  Instead of a bunch of calls to strncpy() and
and strncat(), simplify the code by using snprintf() and add checks
for unexpected truncation.

The output file created by iasl -d is predictable.  Fix this by
using  mkdtemp() to create a directory to hold the iasl input and
output files.

Check the return values of more syscalls.

Reported by: Coverity
CID: 1011278
Reviewed by: jkim
Differential Revision: https://reviews.freebsd.org/D6360

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

7 years agoMFC r300442
truckman [Wed, 1 Jun 2016 17:09:50 +0000 (17:09 +0000)]
MFC r300442

Hopefully fix Coverity CID 1008328 (Out-of-bounds write) in /bin/sh.

Replace the magic constant 127 in the loop interation count with
"PROMPTLEN - 1".

gethostname() is not guaranteed to NUL terminate the destination
string if it is too short. Decrease the length passed to gethostname()
by one, and add a NUL at the end of the buffer to make sure the
following loop to find the end of the name properly terminates.

The default: case is the likely cause of Coverity CID 1008328.  If
i is 126 at the top of the loop interation where the default case
is triggered, i will be incremented to 127 by the default case,
then incremented to 128 at the top of the loop before being compared
to 127 (PROMPTLENT - 1) and terminating the loop. Then the NUL
termination code after the loop will write to ps[128].  Fix by
checking for overflow before incrementing the index and storing the
second character in the buffer.

These fixes are not guaranteed to satisfy Coverity. The code that
increments i in the 'h'/'H' and 'w'/'W' cases may be beyond its
capability to analyze, but the code appears to be safe.

Reported by: Coverity
CID: 1008328
Reviewed by: jilles, cem
Differential Revision: https://reviews.freebsd.org/D6482

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

7 years agoMFC 300670 (slightly adapted for 10-STABLE):
n_hibma [Wed, 1 Jun 2016 15:08:27 +0000 (15:08 +0000)]
MFC 300670 (slightly adapted for 10-STABLE):

Change net.link.log_promisc_mode_change to a read-only tunable.

PR: 166255
Submitted by: eugen.grosbein.net
Obtained from: hselasky

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

7 years agoMFC r300180:
cy [Wed, 1 Jun 2016 07:03:07 +0000 (07:03 +0000)]
MFC r300180:

Update leap-seconds to leap-seconds.3661459200.
NO leap second will be introduced at the end of June 2016.

Obtained from: ftp://tycho.usno.navy.mil/pub/ntp/.
See also: http://www.iers.org/SharedDocs/News/EN/BulletinC.html

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

7 years agoMFC r300142:
kib [Wed, 1 Jun 2016 04:07:33 +0000 (04:07 +0000)]
MFC r300142:
Ensure that ftruncate(2) is performed synchronously when file is
opened in O_SYNC mode, at least for UFS.

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

7 years agoMFC r300622:
kib [Wed, 1 Jun 2016 04:03:55 +0000 (04:03 +0000)]
MFC r300622:
In vm_page_cache(), only drop the vnode after radix insert failure
for empty page cache when the object type is OBJT_VNODE.

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

7 years agoMFC r300596:
kib [Wed, 1 Jun 2016 04:01:48 +0000 (04:01 +0000)]
MFC r300596:
In vm_page_alloc_contig(), on vm_page_insert() failure, mark each
freed page as VPO_UNMANAGED.  Otherwise vm_pge_free_toq() insists on
owning the page lock.

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

7 years agoFixup botched merge in rev. r300488.
n_hibma [Tue, 31 May 2016 21:21:32 +0000 (21:21 +0000)]
Fixup botched merge in rev. r300488.

This commit only updates mergeinfo, not sys/net/if.c.

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

7 years agoMFC r297323,r297324, r297325, r297326:
ian [Tue, 31 May 2016 17:15:57 +0000 (17:15 +0000)]
MFC r297323,r297324, r297325, r297326:

  Set only one default route for nfsroot mount, the one associated with the
  interface that will be used to mount the rootfs (and never a self-ip proxy
  arp route).  Made up of the following related changes...

  Set ifctx->gotrootpath=1 only when the root path came from the dhcp/bootp
  server (and not when it came from a fallback method such as the ROOTDEVNAME
  option).  This makes the code in bootpc_init() choose the first interface
  that provided a rootpath name.  Previously it was choosing the first
  interface that got an IP address, which could be on a different and
  potentially unreachable subnet than the server providing the rootfs.

  If the rootpath name actually does come from a fallback source, then the
  code continues to use the first interface in the list that got configured.
  Note that this wasn't directly reported in the PR cited below, but was
  discovered while working on that PR.

  Switch bootpc_adjust_interface() from returning int to void.  Its one caller
  doesn't check for errors, and all the errors that can happen result in it
  calling panic anyway, except for one that's really more of a warning (and
  is going to disappear on an upcoming commit anyway).

  Stop setting the default route to the IP of the interface itself when the
  bootp/dhcp server doesn't provide a router option.  Doing so prevents
  setting defaultrouter=<ip> in rc.conf (it fails because there's already
  a bogus default route installed by bootpc_init).

  When an admin wants to use this style of proxy arp on an interface, the
  proper mechanism is to set the "use-lease-addr-for-default-route" flag
  in the dhcp server config.  That causes the lease address to be delivered
  in the routers option, and the normal handling of the routers option will
  then install the self-ip as the default route.

  Do not try to install a default route for each interface found, because
  only the first one will actually work and all the others just result in
  errors (which would get printed but otherwise ignored).

  Instead, wait until we make a choice of which interface will be used to
  mount the rootfs, and install the default route associated with it (if any).
  After doing the md_mount() call to obtain the needed info, remove the
  default route again, and transcribe the route info into the nfs_diskless
  structure.  If the system eventually chooses to mount the nfs rootfs, the
  default route will be installed again when the nfs_diskless code
  re-initializes the interface.

PR: 187094

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

7 years agoMFC r297147, r297148, r297149, r297150, r297151:
ian [Tue, 31 May 2016 17:01:54 +0000 (17:01 +0000)]
MFC r297147, r297148, r297149, r297150, r297151:

  Make both the loader and kernel use the interface-mtu option if the
  dhcp server provides it.  Made up of these (semi-)related changes...

  [kernel...] If the dhcp server provides an interface-mtu option, parse
  the value and set that mtu on the interface.

  [libstand...]

  Garbage collect the bswap routines from libstand, use sys/endian.h.

  If the dhcp server delivers an interface-mtu option, parse it and store
  the value in a new global intf_mtu for use by the application.

  [loader...]

  If the dhcp server provided an interface-mtu option, transcribe the value
  to the boot.netif.mtu env var, which will be picked up by pre-existing code
  in nfs_mountroot() and used to configure the interface accordingly.

PR: 187094

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

7 years agoMerge r301053:
glebius [Tue, 31 May 2016 16:57:42 +0000 (16:57 +0000)]
Merge r301053:

  Fix kernel stack disclosures in the Linux and 4.3BSD compat layers.

Security: SA-16:20
Security: SA-16:21

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

7 years agoMFC 300501, 300508
kp [Mon, 30 May 2016 01:21:44 +0000 (01:21 +0000)]
MFC 300501, 300508

pf: Fix ICMP translation

Fix ICMP source address rewriting in rdr scenarios.

pf: Fix more ICMP mistranslation

In the default case fix the substitution of the destination address.

PR: 201519
Submitted by: Max <maximos@als.nnov.ru>

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

7 years agoMFC: r299872
rmacklem [Sun, 29 May 2016 23:30:36 +0000 (23:30 +0000)]
MFC: r299872
Fix fuse for "cp" of a mode 0444 file to the file system.

When "cp" of a file with read-only (mode 0444) to a fuse mounted
file system was attempted it would fail with EACCES. This was because
fuse would attempt to open the file WRONLY and the open would fail.
This patch changes the fuse_vnop_open() to test for an extant read-write
open and use that, if it is available.
This makes the "cp" of a read-only file to the fuse mounted file system
work ok.
There are simpler ways to fix this than adding the fuse_filehandle_validrw()
function, but this function is useful for future patches related to
exporting a fuse filesystem via NFS.

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

7 years agoMFC: r299816
rmacklem [Sun, 29 May 2016 23:05:14 +0000 (23:05 +0000)]
MFC: r299816
Fix fuse so that stale buffer cache data isn't read.

When I/O on a file under fuse is switched from buffered to DIRECT_IO,
it was possible to read stale (before a recent modification) data from
the buffer cache. This patch invalidates the buffer cache for the
file to fix this.

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

7 years agoMFC r300378:
pfg [Sun, 29 May 2016 16:32:21 +0000 (16:32 +0000)]
MFC r300378:
libc/regex: fix two buffer underruns.

Fix some rather complex regex issues found on OpenBSD as part of some
ongoing work to fix a sed(1) bug.

Curiously the OpenBSD tests don't trigger segfaults on FreeBSD but the
bugs were confirmed by running a port of FreeBSD's regex under OpenBSD's
malloc. Huge thanks to Ingo for confirming the behavior.

Obtained from: OpenBSD (CVS 1.20, 1.21)

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

7 years agoMFC r300420: vfork(2): Mention some risks of calling vfork() from
jilles [Sun, 29 May 2016 12:16:58 +0000 (12:16 +0000)]
MFC r300420: vfork(2): Mention some risks of calling vfork() from
application code.

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

7 years agoMFC r300258:
jah [Sun, 29 May 2016 07:14:51 +0000 (07:14 +0000)]
MFC r300258:

iic_rdwr_data->nmsgs is uint32_t, so limit the allowable number of messages to
prevent memory exhaustion and short allocations on 32-bit systems. Since
iicrdwr is intended to be a workalike of a Linux i2c-dev call, use the same
limit of 42 that Linux uses.

Also check the return value of copyin(9) to prevent unnecessary allocation in
the failure case.

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

7 years agoMFC: r300397
ache [Sun, 29 May 2016 06:46:17 +0000 (06:46 +0000)]
MFC: r300397

1) POSIX prohibits printing errors to stderr here and require
returning NULL:

"Upon successful completion, initstate() and setstate() shall return a
pointer to the previous state array; otherwise, a null pointer shall
be returned.

Although some implementations of random() have written messages to
standard error, such implementations do not conform to POSIX.1-2008."

2) Move error detections earlier to prevent state modifying.

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

7 years agoMFC: r299753
rmacklem [Sat, 28 May 2016 22:42:56 +0000 (22:42 +0000)]
MFC: r299753
Fix fuse to use DIRECT_IO when required.

When a file is opened write-only and a partial block was written,
buffered I/O would try and read the whole block in. This would
result in a hung thread, since there was no open (fuse filehandle)
that allowed reading. This patch avoids the problem by forcing
DIRECT_IO for this case.
It also sets DIRECT_IO when the file system specifies the FN_DIRECTIO
flag in its reply to the open.

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

7 years agoMFC r298192,299234,299238,299736:
delphij [Sat, 28 May 2016 06:17:35 +0000 (06:17 +0000)]
MFC r298192,299234,299238,299736:

file 5.27.

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

7 years agoMFC r300638:
cy [Sat, 28 May 2016 03:33:06 +0000 (03:33 +0000)]
MFC r300638:

Use the expiry date to determine whether to replace the DB copy of
leapfile instead of using the leapfile serial number (create
timestamp).

PR: 209577

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

7 years agoMFC: r299514
rmacklem [Thu, 26 May 2016 21:32:16 +0000 (21:32 +0000)]
MFC: r299514
Fix use-after-free in NFS4 lock test service.

Trivial use-after-free where stp was freed too soon in the non-error path.
To fix, simply move its release to the end of the routine.

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

7 years agoMFC r299666 - r299672
kadesai [Thu, 26 May 2016 12:00:14 +0000 (12:00 +0000)]
MFC r299666 - r299672

r299666: Takes care of any firmware command timeout scenarios by initiating OCR.
r299667: Similar to RAID map for Logical Drives, now JBOD map has been introduced
r299668: This patch implements driver support for 1MB IO size.
r299669: Implemented interrupt Config Hook in mrsas(4) to defer some of the tasks, like:
registering AEN, creating cdev.
r299670: Added support for Avago Intruder controller.
r299671: bugs fixed as part of this patch in kdump and some NULL pointer dereference
r299672: Version update patch.

Sponsored by:   AVAGO Technologies/ Broadcom Limited

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

7 years agoMFC r284872 - 284873
kadesai [Thu, 26 May 2016 11:01:25 +0000 (11:01 +0000)]
MFC r284872 - 284873

r284872: Kernel panic may be observed by user, if MR controller is under Chip reset (OCR)

r284873: Counter part of mfi driver commit in mrsas  gracefully fail,
         if the /dev/megaraid_sas_ioctl_node symlink already exists

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

7 years agoMFC r300327:
ken [Wed, 25 May 2016 15:10:07 +0000 (15:10 +0000)]
MFC r300327:

  ------------------------------------------------------------------------
  r300327 | ken | 2016-05-20 13:30:52 -0600 (Fri, 20 May 2016) | 11 lines

  Add the density code for LTO-7 to libmt and the mt(1) man page.

  The density code and bits per mm values were obtained from an
  actual drive density report.

  The number of tracks were obtained from an LTO-7 hardware
  announcement on IBM's web site.
  ------------------------------------------------------------------------
Sponsored by: Spectra Logic

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

7 years agoMFC r300224:
ken [Wed, 25 May 2016 14:30:33 +0000 (14:30 +0000)]
MFC r300224:

  ------------------------------------------------------------------------
  r300224 | ken | 2016-05-19 13:13:43 -0600 (Thu, 19 May 2016) | 12 lines

  Adjust a couple of error cases in camdd(8).

  usr.sbin/camdd/camdd.c:
   In camdd_probe_file(), fix an error case after fstat where
   we were bailing out and leaving two lines of cleanup code
   unexecuted.  Instead, just goto bailout_error.

   In camdd_probe_pass(), fail if the sector size is 0.
  ------------------------------------------------------------------------

Sponsored by: Spectra Logic

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

7 years agoMFC r300432:
kib [Wed, 25 May 2016 10:04:53 +0000 (10:04 +0000)]
MFC r300432:
Giant is dropped by mi_startup() before passing the control to swapper.

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

7 years agoFix build on stable/10.
mav [Wed, 25 May 2016 08:09:14 +0000 (08:09 +0000)]
Fix build on stable/10.

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

7 years agoAdd ioat.4 missed in r300661.
mav [Wed, 25 May 2016 07:14:52 +0000 (07:14 +0000)]
Add ioat.4 missed in r300661.

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

7 years agoMFC ioat(4) driver in its present state.
mav [Wed, 25 May 2016 07:09:54 +0000 (07:09 +0000)]
MFC ioat(4) driver in its present state.

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

7 years agoMFC r299505
sephe [Wed, 25 May 2016 06:15:26 +0000 (06:15 +0000)]
MFC r299505

hyperv/stor: Enable INQUIRY result check only on WIN10 like host systems

On WIN8 like host systems, when rescan happens, the already installed
disks seem to return random invalid results for INQUIRY.

More investigation is under way to figure out why random invalid INQUIRY
results are delivered to VM on WIN8 like host systems.

Submitted by: Hongjiang Zhang <honzhan microsoft com>
Reviewed by: sephe
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6316

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

7 years agoMFC r300177 and r300179: fix two typos in man page.
cy [Wed, 25 May 2016 01:48:44 +0000 (01:48 +0000)]
MFC r300177 and r300179: fix two typos in man page.

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

7 years agoMFC 299310:
jhb [Tue, 24 May 2016 23:04:16 +0000 (23:04 +0000)]
MFC 299310:
Don't store generated firmware object files in the source directory.

Trim the leading directory of a firmware source file from the resulting
target object file name so the object file is stored in the object
directory. Previously, using 'FIRMWS= /path/to/fw.bin:fw.bin' would
store the generated 'fw.bin.fwo' file in the /path/to directory. Now
it stores it in the object directory of the kernel module being built.

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

7 years agoMFC r300084:
kib [Tue, 24 May 2016 10:46:23 +0000 (10:46 +0000)]
MFC r300084:
Do enable io accounting for read-only mounts and mounts which are
remounted to writeable after initial read-only.  Assign to
dev->si_mountpt earlier to account the accesses done at the mount
time.

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

7 years agoMFC r300083:
kib [Tue, 24 May 2016 10:41:34 +0000 (10:41 +0000)]
MFC r300083:
If IO_SYNC was passed to ffs_truncate(), request synchronous inode
update from the final ffs_update().

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

7 years agoMFC r300082:
kib [Tue, 24 May 2016 10:39:55 +0000 (10:39 +0000)]
MFC r300082:
For async UFS mounts, shrink the directory asynchronously, at least do
not pass IO_SYNC to ffs_truncate() unneccessary.

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

7 years agoMFC r300030:
kib [Tue, 24 May 2016 10:36:33 +0000 (10:36 +0000)]
MFC r300030:
Fix comments.

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

7 years agoMFC r300027:
kib [Tue, 24 May 2016 10:34:24 +0000 (10:34 +0000)]
MFC r300027:
Fix typo in the message.

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

7 years agoMFC r299373: Allow sleepable allocations in enclosure daemon threads.
mav [Tue, 24 May 2016 07:21:23 +0000 (07:21 +0000)]
MFC r299373: Allow sleepable allocations in enclosure daemon threads.

There were at least two places where M_NOWAIT was used without NULL check.
This change should fix NULL-dereference panic there and possibly improve
operation in other ways under memory pressure.

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

7 years agoMFC r299347, r299348: Validate XCOPY range offsets and lengths.
mav [Tue, 24 May 2016 07:19:52 +0000 (07:19 +0000)]
MFC r299347, r299348: Validate XCOPY range offsets and lengths.

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

7 years agoMFC r299346: More XCOPY parameters validation.
mav [Tue, 24 May 2016 07:19:00 +0000 (07:19 +0000)]
MFC r299346: More XCOPY parameters validation.

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

7 years agoMFC r299329: Improve validation of some POPULATE TOKEN parameters.
mav [Tue, 24 May 2016 07:18:22 +0000 (07:18 +0000)]
MFC r299329: Improve validation of some POPULATE TOKEN parameters.

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

7 years agoMFC r300072: Fix NULL-dereference panic if VESA reports zero modes.
mav [Tue, 24 May 2016 07:17:09 +0000 (07:17 +0000)]
MFC r300072: Fix NULL-dereference panic if VESA reports zero modes.

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

7 years agoMFC r300218: Add proper reporting for early task management errors.
mav [Tue, 24 May 2016 07:15:53 +0000 (07:15 +0000)]
MFC r300218: Add proper reporting for early task management errors.

This covers unknown requests and requests to unknown virtual ports.
Previously it "worked" only because of timeout handling on initiator.

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

7 years agoMFC r300217: Add IOCB debugging for ISPCTL_RESET_DEV and ISPCTL_ABORT_CMD.
mav [Tue, 24 May 2016 07:15:10 +0000 (07:15 +0000)]
MFC r300217: Add IOCB debugging for ISPCTL_RESET_DEV and ISPCTL_ABORT_CMD.

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

7 years agoMFC r300157: Unify Multi ID target code by reusing isp_find_chan_by_did().
mav [Tue, 24 May 2016 07:14:24 +0000 (07:14 +0000)]
MFC r300157: Unify Multi ID target code by reusing isp_find_chan_by_did().

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

7 years agoMFC r300058: Make RQCS_PORT_LOGGED_OUT for ZOMBIE ports retriable.
mav [Tue, 24 May 2016 07:13:42 +0000 (07:13 +0000)]
MFC r300058: Make RQCS_PORT_LOGGED_OUT for ZOMBIE ports retriable.

It is normal for ZOMBIE ports to be logged out.  This status is not really
an error until Gone Device Timeout expires, so make CAM retry after delay.

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