]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
7 years agoMFC r310467:
ngie [Sat, 4 Feb 2017 16:43:35 +0000 (16:43 +0000)]
MFC r310467:

Provide some guidance when dealing with sections and variables contained
within them

For example, using variables designated for %usm requires uncommenting
%usm section header

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

7 years agoMFC r311744,r312328,r312329,r312330:
ngie [Sat, 4 Feb 2017 16:40:28 +0000 (16:40 +0000)]
MFC r311744,r312328,r312329,r312330:

r311744:

Document bsd.snmpmod.mk from a high-level

r312328:

Add a make target (smilint) for running smilint tool against BMIBS

Running smilint against MIB definitions is useful in finding
functional problems with MIB definitions/descriptions.

This is inspired by the smilint targets defined in
usr.sbin/bsnmpd/modules/{snmp_hostres,snmp_mibII}/Makefile

Document all of the variables that are involved in running the
smilint target, as well as all of the prerequisites to running
it.

r312329:

Remove ad hoc smilint targets made standard in bsd.snmpmod.mk in r312328

r312330:

Add smilint target to subdir targets so "make smilint" here will run
the smilint target in subdirs

While here, convert a path that's .CURDIR relative to SRCTOP

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

7 years agoMFC r311394:
ngie [Sat, 4 Feb 2017 16:37:43 +0000 (16:37 +0000)]
MFC r311394:

op_usm_users: don't deref uusers if it's NULL when SETting the value

Add an XXX comment to note that the conditional seems suspect given
how it's handled elsewhere in the SNMP_OP_SET case.

CID: 1008573

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

7 years agoMFC r312332:
ngie [Sat, 4 Feb 2017 16:36:07 +0000 (16:36 +0000)]
MFC r312332:

Use SRCTOP where possible and use :H to manipulate .CURDIR to get rid of
unnecessarily long relative path .PATH values with make

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

7 years agoMFC r311469:
ngie [Sat, 4 Feb 2017 16:34:44 +0000 (16:34 +0000)]
MFC r311469:

Conditionalize wrap(3) use based on MK_TCP_WRAPPERS instead of
always building support into ypserv.

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

7 years agoMFC r312164:
ngie [Sat, 4 Feb 2017 16:31:24 +0000 (16:31 +0000)]
MFC r312164:

Fix -Wformat issue

Use %zu for printing out results from nitems, as it's size_t based

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

7 years agoMFC r312114,r312194:
ngie [Sat, 4 Feb 2017 16:29:23 +0000 (16:29 +0000)]
MFC r312114,r312194:

r312114:

Enable WARNS?= 6 across all of tests/sys

r312194:

Add include Makefiles for tests/sys/{fs,kern,kqueue,mac}/...

The primary goal for doing this is to leverage the work done in r312114
for enabling WARNS to address trivial code quality issues with new tests

Tested with: make tinderbox

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

7 years agoMFC r312110:
ngie [Sat, 4 Feb 2017 16:16:41 +0000 (16:16 +0000)]
MFC r312110:

Fix -Wsign-compare warnings

The loop index (i) doesn't need to be size_t as its comparison is signed

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

7 years agoMFC r312120:
ngie [Sat, 4 Feb 2017 16:15:26 +0000 (16:15 +0000)]
MFC r312120:

Fix warnings

- Staticize test_num
- Promote i to size_t to deal with -Wsign-compare issues

Tested with: clang, gcc, gcc49

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

7 years agoMFC r311972:
ngie [Sat, 4 Feb 2017 16:09:07 +0000 (16:09 +0000)]
MFC r311972:

Add __BIT and __BITS macros from NetBSD to help support new testcases

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

7 years agoMFC r312119,r312216,r312226:
ngie [Sat, 4 Feb 2017 16:02:49 +0000 (16:02 +0000)]
MFC r312119,r312216,r312226:

r312119:

encode_long, encode_timeval: mechanically replace `exp` with `exponent`

This helps fix a -Wshadow issue with exp(3) with tests/sys/acct/acct_test,
which include math.h, which in turn defines exp(3)

Tested with: clang, gcc 4.2.1, gcc 4.9

r312216:

Revert r312119 and reword the intent to fix -Wshadow issues
between exp(3) and `exp` var.

The approach taken previously was not ideal for multiple
functional and stylistic reasons.

Add to existing sed call in Makefile to replace `exp` with
`exponent` instead.

Requested by: bde

r312226:

Fix typo in r312216

I meant to replace "exp" with "exponent", not "expected"

Pointyhat to: ngie

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

7 years agoMFC r311472:
ngie [Sat, 4 Feb 2017 16:00:51 +0000 (16:00 +0000)]
MFC r311472:

Conditionalize wrap(3) use based on MK_TCP_WRAPPERS instead of
always building support into amd(8).

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

7 years agoMFC r311470:
ngie [Sat, 4 Feb 2017 15:55:31 +0000 (15:55 +0000)]
MFC r311470:

Conditionalize wrap(3) use based on MK_TCP_WRAPPERS instead of
always building support into rpcbind.

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

7 years agoMFC r312105,r312162:
ngie [Sat, 4 Feb 2017 15:52:08 +0000 (15:52 +0000)]
MFC r312105,r312162:

r312105:

Conditionalize libwrap support into inetd based on MK_TCP_WRAPPERS

This will allow inetd to stand by itself without libwrap.

Relnotes: yes

r312162:

Fix up r312105

- Only #include tcpd.h when LIBWRAP is true to avoid header include errors
- Only define whichaf when LIBWRAP is true to avoid -Wunused warning and
  to avoid issues with structs being defined that should only be defined
  when tcpd.h is included.

Pointyhat to: ngie

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

7 years agoMFC r311263:
ngie [Sat, 4 Feb 2017 15:45:51 +0000 (15:45 +0000)]
MFC r311263:

Use calloc instead of malloc with buffers in snmp_{recv,send}_packet

This doesn't fix the issue noted in the PR, but at the very least it
cleans up the error so it looks a bit more sane, and in the event
that bsnmp did wander off into the weeds, the likelihood of it
crashing with more sensible output is greater, in my opinion

MFC counter set high so I have enough time to resolve the real
underlying bug in bsnmpwalk

PR: 215721

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

7 years agoMFC r312937:
ngie [Sat, 4 Feb 2017 15:44:49 +0000 (15:44 +0000)]
MFC r312937:

Fix typo in lib/Makefile

The SUBDIR_DEPEND variable should be for librpcsec_gss, not
liblibrpc_gss

PR: 216409

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

7 years agoMFC 312906:
jhb [Fri, 3 Feb 2017 23:33:06 +0000 (23:33 +0000)]
MFC 312906:
Unregister CPL handlers for TOE-related messages when unloading TOM.

Sponsored by: Chelsio Communications

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

7 years agoMFC r312001:
pfg [Fri, 3 Feb 2017 16:36:14 +0000 (16:36 +0000)]
MFC r312001:
Remove __nonnull() attributes from x86 machine check architecture.

In this case the attributes serve little purpose as they just don't
enforce run time checks, If anything the attributes would cause NULL pointer
checks to be ignored but there are no such checks so the only effect is
cosmetic.

Reviewed by: jhb, avg

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

7 years agoMFC from r273333 to 307002.
sevan [Fri, 3 Feb 2017 16:15:06 +0000 (16:15 +0000)]
MFC from r273333 to 307002.

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

7 years agoMFC r289894:
kib [Fri, 3 Feb 2017 12:20:44 +0000 (12:20 +0000)]
MFC r289894:
CLFLUSH does not need barriers, the instruction is ordered WRT other writes.
Use CLFLUSHOPT when available.

MFC r312555:
Use SFENCE for ordering CLFLUSHOPT.

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

7 years agoIn v3 UNIX, the kill utility is documented in category 8, not 1.
sevan [Fri, 3 Feb 2017 11:18:34 +0000 (11:18 +0000)]
In v3 UNIX, the kill utility is documented in category 8, not 1.
Add a note of it.
http://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man8/kill.8

PR: 211786
Approved by: bcr (mentor)
Obtained from: TUHS
Differential Revision: https://reviews.freebsd.org/D8105

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

7 years agoMFC r310180, r310327
asomers [Thu, 2 Feb 2017 23:04:01 +0000 (23:04 +0000)]
MFC r310180, r310327

r310180:
Fix panic during lagg destruction with simultaneous status check

If you run "ifconfig lagg0 destroy" and "ifconfig lagg0" at the same time a
page fault may result. The first process will destroy ifp->if_lagg in
lagg_clone_destroy (called by if_clone_destroy). Then the second process
will observe that ifp->if_lagg is NULL at the top of lagg_port_ioctl and
goto fallback: where it will promptly dereference ifp->if_lagg anyway.

The solution is to repeat the NULL check for ifp->if_lagg

MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D8512

r310327:
Remove stray debugging code from r310180

Reported by: rstone
Pointy hat to: asomers
MFC after: 3 weeks
X-MFC-with: 310180
Sponsored by: Spectra Logic Corp

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

7 years agoMFC r311160, r311210, r311288, r311292, r311298, r311340
asomers [Thu, 2 Feb 2017 19:50:28 +0000 (19:50 +0000)]
MFC r311160, r311210, r311288, r311292, r311298, r311340

r311160:
misc minor fixes in mpr(4)

sys/dev/mpr/mpr_sas.c
* Fix a potential null pointer dereference (CID 1305731)
* Check for overrun of the ccb_scsiio.cdb_io.cdb_bytes buffer (CID
  1211934)

sys/dev/mpr/mpr_sas_lsi.c
* Nullify a dangling pointer in mprsas_get_sata_identify
* Fix a memory leak in mprsas_SSU_to_SATA_devices (CID 1211935)

Reported by: Coverity (partially)
CID: 1305731 1211934 1211935
Reviewed by: slm
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D8880

r311210:
Quell Coverity for diskinfo(8)

* CID 1198994: Don't run the speed disk on a disk with no sectors
* CID 1011442: Don't call close(2) if open(2) fails
* CID 1011161: Use snprintf instead of sprintf
* CID 1009825: Check the return value of lseek

Reported by: Coverity
CID: 1198994 1011442 1011161 1009825
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp

r311288:
Delete dead code in chat(8)

It's always been dead, ever since first import in 1994.  It's still dead in
OpenBSD's version, too.

Reported by: Coverity
CID: 270586
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp

r311292:
Remove dead code in rpc_parse.c

It's been dead ever since it was imported from TI-RPC in 1995.  The dead
code is still present in Illumos today, but was removed from NetBSD in 2006.

Reported by: Coverity
CID: 270097
Obtained from: NetBSD
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp

r311298:
Remove dead code in dhclient(8)

The offending code has been dead ever since the import from OpenBSD in
r195805.  OpenBSD later deleted that entire function.

Reported by: Coverity
CID: 500059
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp

r311340:
Misc Coverity fixes for tail(1)

CID 1006402: Initialize stack variable
CID 271580: Don't leak memory when ENOMEM.

Reported by: Coverity
CID: 271580 1006402
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp

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

7 years agoMFC r312649:
kib [Thu, 2 Feb 2017 13:40:37 +0000 (13:40 +0000)]
MFC r312649:
Document mount option "nonc" for tmpfs.

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

7 years agoMFC r312432:
kib [Thu, 2 Feb 2017 13:39:11 +0000 (13:39 +0000)]
MFC r312432:
Add a mount option for tmpfs(5) to not use namecache.

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

7 years agoMFC r312430:
kib [Thu, 2 Feb 2017 13:38:01 +0000 (13:38 +0000)]
MFC r312430:
Implement VOP_VPTOCNP() for tmpfs.

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

7 years agoMFC r312429:
kib [Thu, 2 Feb 2017 13:37:00 +0000 (13:37 +0000)]
MFC r312429:
VNON nodes cannot exist.

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

7 years agoMFC r312428:
kib [Thu, 2 Feb 2017 13:36:07 +0000 (13:36 +0000)]
MFC r312428:
Refcount tmpfs nodes and mount structures.

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

7 years agoMFC r312728
davidcs [Thu, 2 Feb 2017 00:20:53 +0000 (00:20 +0000)]
MFC r312728
    Added support for if_transmit and if_qflush
    Removed if_start
    updated version to 3.10.33

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

7 years agoMFC 312782
kp [Wed, 1 Feb 2017 21:44:50 +0000 (21:44 +0000)]
MFC 312782

bridge: Release the bridge lock when calling bridge_set_ifcap()

This calls ioctl() handlers for the different interfaces in the bridge.
These handlers expect to get called in an ioctl context where it's safe
for them to sleep. We may not sleep with the bridge lock held.

However, we still need to protect the interface list, to ensure it
doesn't get changed while we iterate over it.
Use BRIDGE_XLOCK(), which prevents bridge members from being removed.
Adding bridge members is safe, because it uses LIST_INSERT_HEAD().

This caused panics when adding xen interfaces to a bridge.

PR: 216304
Reviewed by: ae
Sponsored by: RootBSD
Differential Revision: https://reviews.freebsd.org/D9290

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

7 years agoMFC r312678: Eliminate misleading comments and dead code in
rpokala [Wed, 1 Feb 2017 04:54:23 +0000 (04:54 +0000)]
MFC r312678: Eliminate misleading comments and dead code in
lacp_port_create()

Variables "fast" and "active" are both constant in lacp_port_create(), but
comments mispleadingly suggest that "fast" can be changed via ioctl. The
constant values control the value of "lp->lp_state", so it too is constant,
and the code for assigning different value to it is essentially dead.

Remove both "fast" and "active", and set "lp->lp_state" unconditionally;
that gets rid of the dead code and misleading comments.

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

7 years agoMFC r312531: vmm_dev: work around a bogus error with gcc 6.3.0
avg [Mon, 30 Jan 2017 14:34:04 +0000 (14:34 +0000)]
MFC r312531: vmm_dev: work around a bogus error with gcc 6.3.0

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

7 years agoMFC r312228: Make `camcontrol cmd ... -i ...` return only valid bytes.
mav [Sun, 29 Jan 2017 14:29:02 +0000 (14:29 +0000)]
MFC r312228: Make `camcontrol cmd ... -i ...` return only valid bytes.

Previously code ignored resid field and returned extra zeroes in case of
data underflow.  Now it returns only real bytes received from target.

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

7 years agoMFC r312647:
kib [Sun, 29 Jan 2017 10:36:43 +0000 (10:36 +0000)]
MFC r312647:
Add comments explaining unobvious td_critnest adjustments in
critical_exit().

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

7 years agoMFC r312699:
tijl [Fri, 27 Jan 2017 10:05:17 +0000 (10:05 +0000)]
MFC r312699:

Apply r210555 to 64 bit linux support:

The interpreter name should no longer be treated as a buffer that can be
overwritten.

PR: 216346

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

7 years agoMFH: r310426
julian [Fri, 27 Jan 2017 09:07:11 +0000 (09:07 +0000)]
MFH: r310426

If you are going to be run individually to make a new timezone set
then ensure the destination directories exist.
Especially if you define OLDTIMEZONES because the mtree pass
doesn't do it for you.

MFC after: 1 week
Sponsored by: Panzura

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

7 years agoMFH: r308671
julian [Fri, 27 Jan 2017 09:04:29 +0000 (09:04 +0000)]
MFH: r308671

When you select make OLDTIMEZONES=1 then you need a few added directories
to be made or the command fails

Sponsored by: panzura

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

7 years agoBackport OpenSSL commit 56336b6c7a75ed28067cadedd8ac46572348bc2f:
delphij [Fri, 27 Jan 2017 07:45:06 +0000 (07:45 +0000)]
Backport OpenSSL commit 56336b6c7a75ed28067cadedd8ac46572348bc2f:

    crypto/evp: harden RC4_MD5 cipher.

    Originally a crash in 32-bit build was reported CHACHA20-POLY1305
    cipher. The crash is triggered by truncated packet and is result
    of excessive hashing to the edge of accessible memory (or bogus
    MAC value is produced if x86 MD5 assembly module is involved). Since
    hash operation is read-only it is not considered to be exploitable
    beyond a DoS condition.

    Thanks to Robert ÅšwiÄ™cki for report.

This is a direct commit to stable/10.

Security: CVE-2017-3731

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

7 years agoMFC r312533: Report disk addition errors on `add` or `create` subcommand.
mav [Fri, 27 Jan 2017 05:59:26 +0000 (05:59 +0000)]
MFC r312533: Report disk addition errors on `add` or `create` subcommand.

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

7 years agoDisable assembly sources when compiler/assembler cannot compile certain
jkim [Thu, 26 Jan 2017 23:29:30 +0000 (23:29 +0000)]
Disable assembly sources when compiler/assembler cannot compile certain
instructions.

Note this is a direct commit because head and stable/11 has OpenSSL 1.0.2
branch.  However, it is based on r304320.

Requested by: julian

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

7 years agoMFC r296891 (by imp):
mav [Thu, 26 Jan 2017 21:35:58 +0000 (21:35 +0000)]
MFC r296891 (by imp):
Make sure we check for CAM_CDB_POINTER for all drivers. Also, for the
drivers I've touched, filter out CAM_CDB_PHYS.

Differential Revision: https://reviews.freebsd.org/D5585

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

7 years agoMFC r312232: Add under-/overrun support to IOCTL and CAM SIM frontends.
mav [Thu, 26 Jan 2017 21:21:59 +0000 (21:21 +0000)]
MFC r312232: Add under-/overrun support to IOCTL and CAM SIM frontends.

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

7 years agoMFC r312231: When in kernel, map ctl_scsi_zero_io() to ctl_zero_io().
mav [Thu, 26 Jan 2017 21:08:58 +0000 (21:08 +0000)]
MFC r312231: When in kernel, map ctl_scsi_zero_io() to ctl_zero_io().

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

7 years agoMFC r312026: Improve CAM_CDB_POINTER support.
mav [Thu, 26 Jan 2017 21:07:46 +0000 (21:07 +0000)]
MFC r312026: Improve CAM_CDB_POINTER support.

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

7 years agoMFC r311873: Fix malloc(M_WAITOK) under mutex, introduced at r311787.
mav [Thu, 26 Jan 2017 21:02:06 +0000 (21:02 +0000)]
MFC r311873: Fix malloc(M_WAITOK) under mutex, introduced at r311787.

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

7 years agoMFC r311804: Rewrite CTL statistics in more simple and scalable way.
mav [Thu, 26 Jan 2017 21:00:49 +0000 (21:00 +0000)]
MFC r311804: Rewrite CTL statistics in more simple and scalable way.

Instead of collecting statistics for each combination of ports and logical
units, that consumed ~45KB per LU with present number of ports, collect
separate statistics for every port and every logical unit separately, that
consume only 176 bytes per each single LU/port.  This reduces struct
ctl_lun size down to just 6KB.

Also new IOCTL API/ABI does not hardcode number of LUs/ports, and should
allow handling of very large quantities.

Old API is still enabled in stable branches for compatibility reasons.

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

7 years agoMFC r311787: Allocate memory for prevent flags only for removable LUs.
mav [Thu, 26 Jan 2017 20:57:48 +0000 (20:57 +0000)]
MFC r311787: Allocate memory for prevent flags only for removable LUs.

This array takes 64KB of RAM now, that was more then half of struct ctl_lun
size.  If at some point we support more ports, this may need another tune.

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

7 years agoMFC r311680: Make CTL_GETSTATS ioctl return partial data if buffer is small.
mav [Thu, 26 Jan 2017 20:51:50 +0000 (20:51 +0000)]
MFC r311680: Make CTL_GETSTATS ioctl return partial data if buffer is small.

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

7 years agoMFC r310778, r310782: Improve use of I/O's private area.
mav [Thu, 26 Jan 2017 20:50:01 +0000 (20:50 +0000)]
MFC r310778, r310782: Improve use of I/O's private area.

 - Since I/Os are allocates from per-port pools, make allocations store
pointer to CTL softc there, and use it where needed instead of global.
 - Created bunch of helper macros to access LUN, port and CTL softc.

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

7 years agoMFC r310786, r310803, r310985, r311894
asomers [Thu, 26 Jan 2017 20:10:31 +0000 (20:10 +0000)]
MFC r310786, r310803, r310985, r311894

r310786:
Reduce the runtime of the GELI tests

There is no reduction in test coverage.  On my system runtime is reduced
from 38m32s to 6m24s.

tests/sys/geom/class/eli/conf.sh
tests/sys/geom/class/eli/init_a_test.sh
tests/sys/geom/class/eli/init_test.sh
tests/sys/geom/class/eli/integrity_copy_test.sh
tests/sys/geom/class/eli/integrity_data_test.sh
tests/sys/geom/class/eli/integrity_hmac_test.sh
tests/sys/geom/class/eli/onetime_a_test.sh
tests/sys/geom/class/eli/onetime_test.sh
Move the looping code into common functions in conf.sh, and remove
alias ciphers from the list.

tests/sys/geom/class/eli/init_a_test.sh
tests/sys/geom/class/eli/init_test.sh
tests/sys/geom/class/eli/integrity_copy_test.sh
tests/sys/geom/class/eli/integrity_data_test.sh
tests/sys/geom/class/eli/integrity_hmac_test.sh
tests/sys/geom/class/eli/onetime_a_test.sh
Move a few commands that don't need to be in the inner loop out.

tests/sys/geom/class/eli/init_test.sh
tests/sys/geom/class/eli/onetime_a_test.sh
Reduce the sector count

tests/sys/geom/class/eli/Makefile
tests/sys/geom/class/eli/init_alias_test.sh
Add a test for initializing a GELI device using one of the cipher
aliases, and check that the alias is correctly interpreted.

MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D8814

r310803:
ATFify the gnop tests

Also, add test cases for the -p, -P, and -s options to gnop create

Reviewed by: ngie
MFC after: 4 weeks
Differential Revision: https://reviews.freebsd.org/D8892

r310985:
Update ObsoleteFiles.inc for r310803

MFC after: 26 days
X-MFC-with: 310803

r311894:
Fix typo from change 310985 in ObsoleteFiles.inc

MFC after: 16 days
X-MFC-With: 310803
Sponsored by: Spectra Logic Corp

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

7 years agoMFC r312532: don't abort writing of a core dump after EFAULT
avg [Thu, 26 Jan 2017 16:38:53 +0000 (16:38 +0000)]
MFC r312532: don't abort writing of a core dump after EFAULT

Note that this change substantially differs from the change in head
because of an unmerged earlier change that probably can not be merged
for POLA reasons.

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

7 years agoMFC r312423:
kib [Thu, 26 Jan 2017 11:07:36 +0000 (11:07 +0000)]
MFC r312423:
Refresh tmpfs(5) man page.

MFC r312648:
Editing and clarifications for tmpfs(5).

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

7 years agoMFC r312425:
kib [Thu, 26 Jan 2017 11:04:27 +0000 (11:04 +0000)]
MFC r312425:
Make tmpfs directory cursor available outside tmpfs_subr.c.

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

7 years agoMFC r312414:
kib [Thu, 26 Jan 2017 11:00:57 +0000 (11:00 +0000)]
MFC r312414:
Rename tmpfs_mount member allnode_lock to include namespace prefix.

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

7 years agoMFC r312410:
kib [Thu, 26 Jan 2017 10:55:56 +0000 (10:55 +0000)]
MFC r312410:
Rework some tmpfs lock assertions.

MFC r312412:
Protect macro argument.

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

7 years agoMFC r312409:
kib [Thu, 26 Jan 2017 10:49:45 +0000 (10:49 +0000)]
MFC r312409:
Style fixes and comment updates.

MFC r312435:
Remove mistakenly merged field.

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

7 years agoMFC r312407:
kib [Thu, 26 Jan 2017 10:43:36 +0000 (10:43 +0000)]
MFC r312407:
Remove unused union member, fifos on tmpfs are implemented in common code.

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

7 years agoMFC r312124 (by mjg):
kib [Thu, 26 Jan 2017 10:35:04 +0000 (10:35 +0000)]
MFC r312124 (by mjg):
tmpfs: manage tm_pages_used with atomics.

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

7 years agoMFC r311531 (by mjg):
kib [Thu, 26 Jan 2017 10:29:23 +0000 (10:29 +0000)]
MFC r311531 (by mjg):
Perform a lockless check in tmpfs_itimes.

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

7 years agoMFC r311933:
dim [Wed, 25 Jan 2017 20:12:07 +0000 (20:12 +0000)]
MFC r311933:

Use proper prototypes in struct boot_module_t

With clang 4.0.0, we are getting the following warnings about struct
boot_module_t in efi's boot_module.h:

In file included from sys/boot/efi/boot1/ufs_module.c:41:
sys/boot/efi/boot1/boot_module.h:67:14: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
        void (*init)();
                    ^
                     void
sys/boot/efi/boot1/boot_module.h:92:16: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
        void (*status)();
                      ^
                       void
sys/boot/efi/boot1/boot_module.h:95:24: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
        dev_info_t *(*devices)();
                              ^
                               void
3 errors generated.

Fix this by adding 'void' to the parameter lists.  No functional change.

Reviewed by: emaste, imp, smh
Differential Revision: https://reviews.freebsd.org/D9144

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

7 years agoMFC r311932:
dim [Wed, 25 Jan 2017 19:55:35 +0000 (19:55 +0000)]
MFC r311932:

Make EFI_RESERVED_SERVICE a proper prototype

With clang 4.0.0, the EFI API header causes the following warning:

In file included from sys/boot/efi/loader/bootinfo.c:43:
In file included from sys/boot/efi/loader/../include/efi.h:52:
sys/boot/efi/include/efiapi.h:534:32: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
(EFIAPI *EFI_RESERVED_SERVICE) (
                               ^

Add VOID to make it into a real prototype.

Reviewed by: imp, emaste, tsoome
Differential Revision: https://reviews.freebsd.org/D9132

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

7 years agoMFC r311929:
dim [Wed, 25 Jan 2017 19:16:24 +0000 (19:16 +0000)]
MFC r311929:

Don't include <errno.h> in reloc_elf.c, as it includes <stand.h> just
after it, which has a conflicting definition of errno.  This leads to
the following warning with clang 4.0.0:

    In file included from sys/boot/common/reloc_elf32.c:6:
    In file included from sys/boot/common/reloc_elf.c:37:
    /usr/obj/usr/src/tmp/usr/include/stand.h:155:12: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
    extern int errno;
               ^
    sys/sys/errno.h:46:26: note: expanded from macro 'errno'
    #define errno           (* __error())
                                      ^

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

7 years agoMFC r311935: Pretend we support some IOCTLs to not scary upper layers.
mav [Wed, 25 Jan 2017 07:51:53 +0000 (07:51 +0000)]
MFC r311935: Pretend we support some IOCTLs to not scary upper layers.

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

7 years agoMFC r311886:
kib [Tue, 24 Jan 2017 17:30:13 +0000 (17:30 +0000)]
MFC r311886:
Fix acquisition of nested write compat rtld locks.

PR: 215826

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

7 years agoMFC r310025:
bdrewery [Tue, 24 Jan 2017 16:47:06 +0000 (16:47 +0000)]
MFC r310025:

  Take write lock for rtld_bind before modifying obj_list in dl_iterate_phdr().

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

7 years agoMFC r312426: fix a thread preemption regression in schedulers introduced
avg [Mon, 23 Jan 2017 08:34:51 +0000 (08:34 +0000)]
MFC r312426: fix a thread preemption regression in schedulers introduced
in r270423

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

7 years agoMFC r312443:
pfg [Mon, 23 Jan 2017 01:21:39 +0000 (01:21 +0000)]
MFC r312443:
mppc - Finish pluging NETGRAPH_MPPC_COMPRESSION.

There were several places where reference to compression were left
unfinished. Furthermore, KASSERTs contained references to MPPC_INVALID
which is not defined in the tree and therefore were sure to break with
INVARIANTS: comment them out.

Reported by: Eugene Grosbein
PR: 216265

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

7 years agoMFC r312230: skel: Do not set -o emacs in .shrc.
jilles [Sun, 22 Jan 2017 21:34:26 +0000 (21:34 +0000)]
MFC r312230: skel: Do not set -o emacs in .shrc.

sh has defaulted to 'set -o emacs' since FreeBSD 9.0. Therefore, do not set
this again in .shrc, since that only serves to prevent invocations like
'sh -o vi' and 'sh +o emacs' to have the intended effect.

PR: 215958
Submitted by: Andras Farkas

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

7 years agoMFC r311651:
kib [Sat, 21 Jan 2017 12:30:07 +0000 (12:30 +0000)]
MFC r311651:
Export __cxa_thread_atexit_impl as an alias for __cxa_thread_atexit.

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

7 years agoMFC r311892: Do not wait for HA thread shutdown if scheduler is stopped.
mav [Sat, 21 Jan 2017 08:43:41 +0000 (08:43 +0000)]
MFC r311892: Do not wait for HA thread shutdown if scheduler is stopped.

This wait loop made system hang on panic instead of reboot.

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

7 years agoMFC r310649: Allow more efficient use of private area.
mav [Sat, 21 Jan 2017 08:41:00 +0000 (08:41 +0000)]
MFC r310649: Allow more efficient use of private area.

There are 16 bytes of space, so we may store two pointers in one.

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

7 years agoMFC r310646: Do not update "saved" mode page on every MODE SELECT.
mav [Sat, 21 Jan 2017 08:39:39 +0000 (08:39 +0000)]
MFC r310646: Do not update "saved" mode page on every MODE SELECT.

We do not have non-volatile memory to really save those values, so we
neither report nor support this capability.  Also saved mode pages are
not replicated between HA peers now.

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

7 years agoMFC r310644: Fix/synchronize field types in struct ctl_modepage_header.
mav [Sat, 21 Jan 2017 08:37:53 +0000 (08:37 +0000)]
MFC r310644: Fix/synchronize field types in struct ctl_modepage_header.

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

7 years agoMFC r310640, r310643:
mav [Sat, 21 Jan 2017 08:36:05 +0000 (08:36 +0000)]
MFC r310640, r310643:
Add support for revert to defaults (RTD) bit in MODE SELECT.

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

7 years agoMFC r310635: Decouple limits on number of LUNs per port and LUs per CTL.
mav [Sat, 21 Jan 2017 08:34:27 +0000 (08:34 +0000)]
MFC r310635: Decouple limits on number of LUNs per port and LUs per CTL.

Those two values are not directly related, so make them independent.
This does not change any limits immediately, but makes number of LUNs
per port controllable via tunable/sysctl kern.cam.ctl.lun_map_size.
After this change increasing CTL_MAX_LUNS should be pretty cheap,
and even making it tunable should be easy.

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

7 years agoMFC r310575: Fix improperly used nexus.targ_lun.
mav [Sat, 21 Jan 2017 08:32:56 +0000 (08:32 +0000)]
MFC r310575: Fix improperly used nexus.targ_lun.

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

7 years agoMFC r310555: Some random code cleaning.
mav [Sat, 21 Jan 2017 08:31:49 +0000 (08:31 +0000)]
MFC r310555: Some random code cleaning.

 - Reduce indentation.
 - Remove extra braces.
 - Add few missing savety checks.

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

7 years agoMFC r310539: Remove CTL_MAX_LUNS from places where it is not required.
mav [Sat, 21 Jan 2017 08:30:10 +0000 (08:30 +0000)]
MFC r310539: Remove CTL_MAX_LUNS from places where it is not required.

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

7 years agoMFC r311897: Add checks for received mode page length.
mav [Sat, 21 Jan 2017 08:19:42 +0000 (08:19 +0000)]
MFC r311897: Add checks for received mode page length.

If our buffer is too small, we may receive part of the page, and should
not try read/write past the end of the buffer.

Reported by:    Coverity
CID:            13683741368375

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

7 years agoMFC r311636: Make 'camcontrol modepage' support subpages.
mav [Sat, 21 Jan 2017 08:17:30 +0000 (08:17 +0000)]
MFC r311636: Make 'camcontrol modepage' support subpages.

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

7 years agoMFC r311623: Make do_buff_decode() not read past the end of the buffer.
mav [Sat, 21 Jan 2017 08:15:51 +0000 (08:15 +0000)]
MFC r311623: Make do_buff_decode() not read past the end of the buffer.

Abort format processing as soon as we have no enough data.

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

7 years agoMFC r310417
asomers [Fri, 20 Jan 2017 16:04:39 +0000 (16:04 +0000)]
MFC r310417

Add a dumpdev example to /boot/defaults/loader.conf

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

7 years agoMFC r311517: Add some more mode page fields.
mav [Fri, 20 Jan 2017 13:01:25 +0000 (13:01 +0000)]
MFC r311517: Add some more mode page fields.

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

7 years agoMFC r312368:
np [Fri, 20 Jan 2017 10:13:40 +0000 (10:13 +0000)]
MFC r312368:
cxgbe/tom: Fix a case where do_pass_accept_req wasn't properly restoring
the VNET.

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

7 years agoMFC r311504: MFV r311477: xz 5.2.3.
delphij [Fri, 20 Jan 2017 06:40:12 +0000 (06:40 +0000)]
MFC r311504: MFV r311477: xz 5.2.3.

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

7 years agoMFC r312331:
ngie [Fri, 20 Jan 2017 06:24:31 +0000 (06:24 +0000)]
MFC r312331:
r312331 (by glebius):

Fix regression from r310655, which broke operation of bsnmpd if it is bound
to a non-wildcard address.  As documented in ip(4), doing sendmsg(2) with
IP_SENDSRCADDR on a socket that is bound to non-wildcard address is
completely different to using this control message on a wildcard one.

A fix is to add a bool to mark whether we did setsockopt(IP_RECVDSTADDR)
on the socket, and use IP_SENDSRCADDR control message only if we did.

While here, garbage collect absolutely useless udp_recv() function that
establishes some structures on stack to never use them later.

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

7 years agoRevert MFC of 310847 and 310864
jpaetzel [Fri, 20 Jan 2017 00:15:11 +0000 (00:15 +0000)]
Revert MFC of 310847 and 310864

Requested by glebius who had questions about the original
head commit that I didn't see.

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

7 years agoMFC r311963: Remove writability requirement for single-mbuf, contiguous-
rpokala [Thu, 19 Jan 2017 23:44:05 +0000 (23:44 +0000)]
MFC r311963: Remove writability requirement for single-mbuf, contiguous-
range m_pulldown()

m_pulldown() only needs to determine if a mbuf is writable if it is going to
copy data into the data region of an existing mbuf. It does this to create a
contiguous data region in a single mbuf from multiple mbufs in the chain. If
the requested memory region is already contiguous and nothing needs to
change, the mbuf does not need to be writeable.

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

7 years agoMFC 310847 310864
jpaetzel [Thu, 19 Jan 2017 23:42:26 +0000 (23:42 +0000)]
MFC 310847 310864

Harden CARP against network loops.

If there is a loop in the network a CARP that is in MASTER state will see it's
own broadcasts, which will then cause it to assume BACKUP state.  When it
assumes BACKUP it will stop sending advertisements.  In that state it will no
longer see advertisements and will assume MASTER...

We can't catch all the cases where we are seeing our own CARP broadcast, but
we can catch the obvious case.

Unbreak ip_carp with WITHOUT_INET6 enabled by conditionalizing all IPv6
structs under the INET6 #ifdef. Similarly (even though it doesn't seem
to affect the build), conditionalize all IPv4 structs under the INET
#ifdef

This also unbreaks the LINT-NOINET6 tinderbox target on amd64; I have not
verified other MACHINE/TARGET pairs (e.g. armv6/arm).

Submitted by: torek
Obtained from: FreeNAS
Pointyhat fix: ngie

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

7 years agoMFC 311122
jpaetzel [Thu, 19 Jan 2017 17:58:08 +0000 (17:58 +0000)]
MFC 311122

Workaround NFS bug with readdirplus when there are greater than 1 billion files in a filesystem.

Reviewed by: kib

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

7 years agoMFC r311971: Report random flash storage as non-rotating to GEOM_DISK.
mav [Thu, 19 Jan 2017 11:17:09 +0000 (11:17 +0000)]
MFC r311971: Report random flash storage as non-rotating to GEOM_DISK.

While doing it, introduce respective constants in geom_disk.h.

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

7 years agoMFC r293040,293341,293435:
delphij [Thu, 19 Jan 2017 07:29:52 +0000 (07:29 +0000)]
MFC r293040,293341,293435:

Reduce libstand Makefile duplication.

PR: 216251

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

7 years agoMFC r311984:
kib [Thu, 19 Jan 2017 06:48:03 +0000 (06:48 +0000)]
MFC r311984:
For the main binary, postpone enforcing relro read-only protection
until copy relocations are done.

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

7 years agoMFC: r273180, r283754, r297329, r299414, r300707, r310309, r310340 (partial),
marius [Wed, 18 Jan 2017 23:26:10 +0000 (23:26 +0000)]
MFC: r273180, r283754, r297329, r299414, r300707, r310309, r310340 (partial),
     r310341, r311664, r311793-311794

o Use correct response bits for MMC_RSP_R4-R7 types

o Make sdhci(4) work after suspend/resume for chipsets that require
  the frequency quirk. This makes it work on eg ThinkPad T420.

o Add a convenience macro that masks all the bits related to clock divisors
  in all versions of the sdhci spec (the HI bits are just unused reserved
  bits in earlier versions).

o sdhci/mmc: Minor whitespace cleanups

o Add Braswell PCI IDs for Intel Cherryview

o mmc: Accept even lower voltage for Cherryview

  And HP x2 210, per DragonFlyBSD 240bd9cd58f8259c12c14a8006837e698.

o In mmcsd_task(), bio_resid was not being set to 0 on a successful read
  or write, resulting in random short-read and short-write returns for
  requests. Fixing this fixes nominal block I/O via mmcsd(4).

  Obtained from: DragonFlyBSD (fd4b97583be1a1e57234713c25f6e81bc0411cb0)

o Add support for Intel Apollo Lake and Bay Trail eMMC PCI controllers.

o Flesh out the support for Intel Braswell eMMC controllers further.

o In sdhci_init_slot(), use the right capability field for determining
  the announced bus width based on MMC_CAP_*_BIT_DATA.

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

7 years agoMFC: r296135
marius [Wed, 18 Jan 2017 23:23:46 +0000 (23:23 +0000)]
MFC: r296135

Replace several bus_alloc_resource() calls with bus_alloc_resource_any()

Most of these are BARs, and we allocate them in their entirety. The one
outlier in this is amdsbwd(4), which calls bus_set_resource() prior.

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

7 years agoMFC 310028: Use db_lookup_proc() in the DDB 'show procvm' command.
jhb [Wed, 18 Jan 2017 22:40:22 +0000 (22:40 +0000)]
MFC 310028: Use db_lookup_proc() in the DDB 'show procvm' command.

This allows processes to be identified by PID as well as a pointer address.

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

7 years agoMFC r311947, r311981:
pfg [Wed, 18 Jan 2017 15:23:40 +0000 (15:23 +0000)]
MFC r311947, r311981:

rpcgen(1): Avoid unused variable warning on generated code.

Avoid "unused variable 'i'" warnings in generated .c files by only
emitting the "int i;" for non-opaque arrays. Opaque arrays use
xdr_opaque() rather than iterating over the array.

Obtained from: OpenBSD (CVS rev 1.28)

rpcgen(1): Check getrlimit() return for generated code.

Obtained from: NetBSD (CVS rev 1.27, 1.28)

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

7 years agoMFC r310630: libkvm: support access to vmm guest memory, allow writes to
avg [Wed, 18 Jan 2017 14:14:00 +0000 (14:14 +0000)]
MFC r310630: libkvm: support access to vmm guest memory, allow writes to
fwmem and vmm

Sponsored by:  Panzura

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

7 years agoMFC r311275: Restructure libz.
delphij [Wed, 18 Jan 2017 08:20:36 +0000 (08:20 +0000)]
MFC r311275: Restructure libz.

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

7 years agoMFC r309527-309528:
yongari [Wed, 18 Jan 2017 02:57:22 +0000 (02:57 +0000)]
MFC r309527-309528:
r309527:
  Recognize RealTek ALC1150 7.1 channel HD audio codec.

r309528:
  Fix too low volume on MSI H170 GAMING M3 board by poking vendor
  specific COEF.

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