]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/log
FreeBSD/stable/9.git
8 years agoMFC r289315 (reprise)
vangyzen [Sun, 20 Dec 2015 20:58:49 +0000 (20:58 +0000)]
MFC r289315 (reprise)

MFC the man page change from r289315.  Thanks for the
attention to detail, Jeremy.

Pointed out by: Jeremy Chadwick <jdc@koitsu.org>
Sponsored by: Dell Inc.

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

8 years agoMFstable/10 r292481:
ngie [Sun, 20 Dec 2015 00:45:34 +0000 (00:45 +0000)]
MFstable/10 r292481:

MFC r292153:

Add -static to CFLAGS to unbreak the tests by using a libc.a with
the xlocale private symbols exposed which aren't exposed publicly
via the DSO

PR: 191354
Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r289315,r292216
vangyzen [Sat, 19 Dec 2015 02:49:59 +0000 (02:49 +0000)]
MFC r289315,r292216

resolver: automatically reload /etc/resolv.conf

On each resolver query, use stat(2) to see if the modification time
of /etc/resolv.conf has changed.  If so, reload the file and reinitialize
the resolver library.  However, only call stat(2) if at least two seconds
have passed since the last call to stat(2), since calling it on every
query could kill performance.

This new behavior is enabled by default.  Add a "reload-period" option
to disable it or change the period of the test.

Document this behavior and option in resolv.conf(5).

Polish the man page just enough to appease igor.

Relnotes:       yes
Sponsored by:   Dell Inc.

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

8 years agoMFC r289837
vangyzen [Sat, 19 Dec 2015 02:47:05 +0000 (02:47 +0000)]
MFC r289837

resolver: abuse _res a little less

In the past, _res was a global variable.  Now, it's multiple function calls.
Several functions in the resolver use _res multiple times and therefore
call the function(s) far more than necessary.

Fix those callers to store the result of _res in a local variable.

Add __noinline to the definition of res_init() to avoid the code bloat
that these changes would have otherwise incurred.  Thanks to jilles
for noticing this.

Sponsored by:   Dell Inc.

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

8 years agoMFC r292129:
ume [Sat, 19 Dec 2015 01:24:07 +0000 (01:24 +0000)]
MFC r292129:
  RFC 3493 requires ignoring the loopback address for AI_ADDRCONFIG.
  Since it breaks certain jail setup, we ignore just 127.0.0.1
  instead of whole loopback address range.

PR: 192014
Reviewed by: hrs

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

8 years agoMFstable/10 r292430:
ngie [Fri, 18 Dec 2015 07:00:42 +0000 (07:00 +0000)]
MFstable/10 r292430:

MFC r292250:

Allow users override `DEBUG` on the command line via DEBUG_FLAGS="-DDEBUG" with
lib/libc/resolv by conditionalizing its definition

Reviewed by: ume, vangyzen
Differential Revision: https://reviews.freebsd.org/D4519

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

8 years agoMFC 292038:
jhb [Fri, 18 Dec 2015 01:03:34 +0000 (01:03 +0000)]
MFC 292038:
Fix a copy and paste bug when this page was first written by copying from
BUS_BIND_INTR.9.

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

8 years agoMFC 290429:
jhb [Fri, 18 Dec 2015 00:40:19 +0000 (00:40 +0000)]
MFC 290429:
When dumping an rman in DDB, include the RID of each resource.

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

8 years agoMFC r292277:
jamie [Fri, 18 Dec 2015 00:33:03 +0000 (00:33 +0000)]
MFC r292277:

  Fix jail name checking that disallowed anything that starts with '0'.
  The intention was to just limit leading zeroes on numeric names.  That
  check is now improved to also catch the leading spaces and '+' that
  strtoul can pass through.

PR: 204897

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

8 years agoMFC r292059:
ume [Thu, 17 Dec 2015 16:09:15 +0000 (16:09 +0000)]
MFC r292059:
  The calls to RES_SET_H_ERRNO() macro on error paths wind up
  dereferencing an uninitialized res.

PR: 202142
Submitted by: Sean Boudreau

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

8 years agoMFstable/10 r292395:
ngie [Thu, 17 Dec 2015 06:35:31 +0000 (06:35 +0000)]
MFstable/10 r292395:

MFC r292048:

Don't leak rsector/sector in mp_label(..)

Use calloc instead of malloc + memset(.., 0, ..) when allocating sector

Differential Revision: https://reviews.freebsd.org/D4450
Reported by: cppcheck
Reviewed by: mav
Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFV r292314:
delphij [Wed, 16 Dec 2015 06:10:05 +0000 (06:10 +0000)]
MFV r292314:

Update BIND to 9.9.8-P2.

See release notes for notable changes:
https://kb.isc.org/article/AA-01326

Note this is a direct commit to stable/9 as BIND is no longer in head.

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

8 years agoMFstable/10 r292280:
ngie [Tue, 15 Dec 2015 18:02:56 +0000 (18:02 +0000)]
MFstable/10 r292280:

MFC r271401:
r271401 (by asomers):

Conditionalize build of etcupdate(8) on MK_RCS. Since etcupdate calls
merge(1), which is part of the RCS package, it must not be installed if
WITHOUT_RCS update is set. Otherwise, it will produce confusing errors.

CR: https://reviews.freebsd.org/D691
Sponsored by: Spectra Logic

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

8 years agoMFstable/10 r292251:
ngie [Tue, 15 Dec 2015 05:47:56 +0000 (05:47 +0000)]
MFstable/10 r292251:

MFC r291982:

Skip the MAC portacl tests if MAC_PORTACL support is missing instead of
marking them failed

Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFH: r291957
brueffer [Mon, 14 Dec 2015 11:39:46 +0000 (11:39 +0000)]
MFH: r291957

Fix a comment typo in the code example.

PR: 203497
Submitted by: chadf@triularity.org

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

8 years agoMFH: r291954
brueffer [Mon, 14 Dec 2015 11:36:01 +0000 (11:36 +0000)]
MFH: r291954

Add an MLINK for m_collapse.

PR: 204205
Submitted by: avos

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

8 years agoMFC r290003:
hselasky [Mon, 14 Dec 2015 10:04:57 +0000 (10:04 +0000)]
MFC r290003:
Add support for binding IRQs to CPUs in the LinuxKPI. The new function
added is for BSD only and does not exist in Linux.

Sponsored by: Mellanox Technologies

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

8 years agoMFC r291703:
hselasky [Mon, 14 Dec 2015 09:53:18 +0000 (09:53 +0000)]
MFC r291703:
Regenerate usb.conf .

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

8 years agoMFC r263985, r275646, r281745, r287575 and r289028:
hselasky [Mon, 14 Dec 2015 09:42:39 +0000 (09:42 +0000)]
MFC r263985, r275646, r281745, r287575 and r289028:
Add more USB IDs.

PR: 199522
PR: 188046

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

8 years agoMFstable/10 r292170:
ngie [Sun, 13 Dec 2015 21:15:56 +0000 (21:15 +0000)]
MFstable/10 r292170:

MFC r291837:

split.ih:
- Create automatically generated include header for split.c

main.c:
- Use function definitions from debug.ih and split.ih instead of externs

Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFstable/10 r291602:
ngie [Sun, 13 Dec 2015 06:54:53 +0000 (06:54 +0000)]
MFstable/10 r291602:

MFC r285140:
r285140 (by oshogbo):

Add fdclose(3) function.

This function is equivalent to fclose(3) function except that it
does not close the underlying file descriptor.
fdclose(3) is step forward to make FILE structure private.

Reviewed by: wblock, jilles, jhb, pjd
Approved by: pjd (mentor)
Differential Revision: https://reviews.freebsd.org/D2697

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

8 years agoMFstable/10 r292150:
ngie [Sun, 13 Dec 2015 04:24:59 +0000 (04:24 +0000)]
MFstable/10 r292150:

MFC r292013:

Use stdint.h instead of inttypes.h as the latter pollutes namespace more

Submitted by: bde
Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFstable/10 r292144:
ngie [Sun, 13 Dec 2015 03:53:18 +0000 (03:53 +0000)]
MFstable/10 r292144:

MFC r291832,r291833,r291834,r291835,r291836,r291838:

r291832:

Fix -Wformat warnings by using the correct format qualifiers

Sponsored by: EMC / Isilon Storage Division

r291833:

- Use ANSI C function prototypes/definitions instead of K&R style ones
- Add a missing return type for main(..)

Sponsored by: EMC / Isilon Storage Division

r291834:

Add missing headers and sort #includes per style(9)

Sponsored by: EMC / Isilon Storage Division

r291835:

Use ANSI C function prototypes/definitions instead of K&R style ones

Sponsored by: EMC / Isilon Storage Division

r291836:

Use `==` instead of `=` in the function comment above split(..) so mkh -p
exposes split(..).

Sponsored by: EMC / Isilon Storage Division

r291838:

Fix -Wformat issues and minor whitespace issues in surrounding areas

Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFstable/10 r292142:
ngie [Sun, 13 Dec 2015 03:47:56 +0000 (03:47 +0000)]
MFstable/10 r292142:

MFC r291983,r291984:

r291983:

Fix compilation warnings by adding unistd.h #include and missing return
statements

Sponsored by: EMC / Isilon Storage Division

r291984:

Add missing stdlib.h header

Apply some minor style(9) fixes

Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFstable/10 r292140:
ngie [Sun, 13 Dec 2015 03:41:50 +0000 (03:41 +0000)]
MFstable/10 r292140:

MFC r292004:

Fix compilation when -DDEBUG is defined by adding inttypes.h #include
for intmax_t

Differential Revision: https://reviews.freebsd.org/D4434
Reported by: cppcheck
Reviewed by: jhb
Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFstable/10 r292138:
ngie [Sun, 13 Dec 2015 03:38:19 +0000 (03:38 +0000)]
MFstable/10 r292138:

MFC r291979:

Unbreak compiling getnetgrent.c with -DDEBUG after r236402 by adding a
missing "}"

Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFstable/10 r292136:
ngie [Sun, 13 Dec 2015 03:35:54 +0000 (03:35 +0000)]
MFstable/10 r292136:

MFC r291753:

Fix scope of bridge_header and bridge_pcix_cap in mthca_reset(..)

They're only used in the __linux__ case

Differential Revision: https://reviews.freebsd.org/D4332
Reported by: cppcheck
Reviewed by: hselasky
Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r283612, r290710, r291694, r291699 and r291793:
hselasky [Fri, 11 Dec 2015 18:28:20 +0000 (18:28 +0000)]
MFC r283612, r290710, r291694, r291699 and r291793:
- Add SIOCGI2C ioctl support to the driver. Would work only on ConnectX-3
  with fresh firmware. The low level code is based on code provided by
  Mellanox.
- Fix print formatting compile warnings for Sparc64 and PowerPC platforms.
- Updated the mlx4 and mlxen drivers to the latest version, v2.1.6:
  - Added support for dumping the SFP EEPROM content to dmesg.
  - Fixed handling of network interface capability IOCTLs.
  - Fixed race when loading and unloading the mlxen driver by applying
    appropriate locking.
  - Removed two unused C-files.
- Convert the mlxen driver to use the BUSDMA(9) APIs instead of
  vtophys() when loading mbufs for transmission and reception. While at
  it all pointer arithmetic and cast qualifier issues were fixed, mostly
  related to transmission and reception.
- Fix i386 build WITH_OFED=YES. Remove some redundant KASSERTs.

Sponsored by: Mellanox Technologies
Differential Revision: https://reviews.freebsd.org/D4283
Differential Revision: https://reviews.freebsd.org/D4284

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

8 years agoMFC r291693:
hselasky [Fri, 11 Dec 2015 14:56:19 +0000 (14:56 +0000)]
MFC r291693:
Add some structures and defines which will be used when decoding small
form factor, SFF, standards compliant ethernet EEPROMs.

Obtained from: Linux
Sponsored by: Mellanox Technologies

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

8 years agoMFC r291690:
hselasky [Fri, 11 Dec 2015 14:53:40 +0000 (14:53 +0000)]
MFC r291690:
Remove incorrect defines. The proper version of these macros is
defined in linux/etherdevice.h.

Sponsored by: Mellanox Technologies

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

8 years agoMFC r291579:
ae [Tue, 8 Dec 2015 07:47:01 +0000 (07:47 +0000)]
MFC r291579:
  In the same way fix the problem described in r291578 for IGMPv3.

  In case when router has a lot of multicast groups, the reply can take
  several packets due to MTU limitation.
  Also we have a limit IGMP_MAX_RESPONSE_BURST == 4, that limits the number
  of packets we send in one shot. Then we recalculate the timer value and
  schedule the remaining packets for sending.
  The problem is that when we call igmp_v3_dispatch_general_query() to send
  remaining packets, we queue new reply in the same mbuf queue. And when
  number of packets is bigger than IGMP_MAX_RESPONSE_BURST, we get endless
  reply of IGMPv3 reports.
  To fix this, add the check for remaining packets in the queue.

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

8 years agoMFC r291578:
ae [Tue, 8 Dec 2015 07:36:26 +0000 (07:36 +0000)]
MFC r291578:
  mld_v2_dispatch_general_query() is used by mld_fasttimo_vnet() to send
  a reply to the MLDv2 General Query. In case when router has a lot of
  multicast groups, the reply can take several packets due to MTU limitation.
  Also we have a limit MLD_MAX_RESPONSE_BURST == 4, that limits the number
  of packets we send in one shot. Then we recalculate the timer value and
  schedule the remaining packets for sending.
  The problem is that when we call mld_v2_dispatch_general_query() to send
  remaining packets, we queue new reply in the same mbuf queue. And when
  number of packets is bigger than MLD_MAX_RESPONSE_BURST, we get endless
  reply of MLDv2 reports.
  To fix this, add the check for remaining packets in the queue.

  PR: 204831

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

8 years agoMFC r291226:
bdrewery [Tue, 8 Dec 2015 00:25:00 +0000 (00:25 +0000)]
MFC r291226:

  Fix ld not respecting --sysroot.

Relnotes: yes

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

8 years agoDocument SA-15:26
gjb [Mon, 7 Dec 2015 19:19:51 +0000 (19:19 +0000)]
Document SA-15:26

Sponsored by: The FreeBSD Foundation

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

8 years agoMFstable/10 r291871:
ngie [Sun, 6 Dec 2015 00:27:35 +0000 (00:27 +0000)]
MFstable/10 r291871:

MFC r291296:

Link localeconv(3) to localeconv_l(3)

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

8 years agoMFstable/10 r250883,r251314:
ngie [Sat, 5 Dec 2015 22:56:57 +0000 (22:56 +0000)]
MFstable/10 r250883,r251314:

r250883 (by ed):

Add <uchar.h>.

The <uchar.h> header, part of C11, adds a small number of utility
functions for 16/32-bit "universal" characters, which may or may not be
UTF-16/32. As our wchar_t is already ISO 10646, simply add light-weight
wrappers around wcrtomb() and mbrtowc().

While there, also add (non-yet-standard) _l functions, similar to the
ones we already have for the other locale-dependent functions.

Reviewed by: theraven

r251314 (by ed):

Add libiconv based versions of *c16*() and *c32*().

I initially thought wchar_t was locale independent, but this seems to be
only the case on Linux. This means that we cannot depend on the *wc*()
routines to implement *c16*() and *c32*(). Instead, use the Citrus
libiconv that is part of libc.

I'll see if there is anything I can do to make the existing functions
somewhat useful in case the system is built without libiconv in the
nearby future. If not, I'll simply remove the broken implementations.

Reviewed by: jilles, gabor

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

8 years agoMFC r291026:
bdrewery [Fri, 4 Dec 2015 18:48:51 +0000 (18:48 +0000)]
MFC r291026:

  Remove unneeded libmd from bootstrap-tools (reverting r246784).

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

8 years agoMFC r291081:
bdrewery [Fri, 4 Dec 2015 18:41:35 +0000 (18:41 +0000)]
MFC r291081:

  Rename checked-in 'includes' to 'includes.sh' to avoid colliding with
  share/mk target 'make includes'.

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

8 years agoMFC r290812:
bdrewery [Fri, 4 Dec 2015 18:33:38 +0000 (18:33 +0000)]
MFC r290812:

  Avoid setting schg in the objtree for lib32 build.

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

8 years agoMFC r290435:
bdrewery [Fri, 4 Dec 2015 18:32:55 +0000 (18:32 +0000)]
MFC r290435:

  Don't allow environment-set options to bleed into src.conf.5 generation.

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

8 years agoMFC r290170:
bdrewery [Fri, 4 Dec 2015 18:26:01 +0000 (18:26 +0000)]
MFC r290170:

  Remove unneeded NULL as this is initialized with M_ZERO.

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

8 years agoMFC r290169:
bdrewery [Fri, 4 Dec 2015 18:24:51 +0000 (18:24 +0000)]
MFC r290169:

  Use memmove(3) to avoid overlapping copy.

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

8 years agoMFC r290374:
bdrewery [Fri, 4 Dec 2015 18:23:50 +0000 (18:23 +0000)]
MFC r290374:

  Remove unneeded mutex.h include, missed in r287155.

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

8 years agoMFC r290084:
bdrewery [Fri, 4 Dec 2015 18:22:54 +0000 (18:22 +0000)]
MFC r290084:

  Remove unneeded NAME override.

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

8 years agoMFC r289872:
bdrewery [Fri, 4 Dec 2015 18:04:45 +0000 (18:04 +0000)]
MFC r289872:

  Replace gcc reference with 'cc' and document the default ${CC}.

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

8 years agoMFC r289870,r289871:
bdrewery [Fri, 4 Dec 2015 18:03:42 +0000 (18:03 +0000)]
MFC r289870,r289871:

  r289870:
    Add bsd.crunchgen.mk to bsd.README.
  r289871:
    Sort properly.

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

8 years agoMFC r289736:
bdrewery [Fri, 4 Dec 2015 18:01:14 +0000 (18:01 +0000)]
MFC r289736:

  Document that we use {} for variable expansion.

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

8 years agoMFC r289375:
bdrewery [Fri, 4 Dec 2015 17:58:25 +0000 (17:58 +0000)]
MFC r289375:

  Fix wrong use of .for; the iteration variable is not used in the loop.

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

8 years agoMFC r289374:
bdrewery [Fri, 4 Dec 2015 17:57:41 +0000 (17:57 +0000)]
MFC r289374:

  Remove excess .else

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

8 years agoMFC r284105,r284106,r284163:
bdrewery [Fri, 4 Dec 2015 17:49:05 +0000 (17:49 +0000)]
MFC r284105,r284106,r284163:

  r284105:
    Cleanup some indentation issues.
  r284106:
    Implement '-s' to copy as symlink, similar to the current -l link(2)
    handling.
  r284163:
    Cleanup some style(9) issues.

Relnotes: yes

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

8 years agoMFC r245832:
bdrewery [Fri, 4 Dec 2015 17:48:11 +0000 (17:48 +0000)]
MFC r245832:

  Return "failure" as we do for 'cp -i' and a "n" answer.

Relnotes: yes

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

8 years agoMFC r291001:
bdrewery [Fri, 4 Dec 2015 17:34:42 +0000 (17:34 +0000)]
MFC r291001:

  ipfw: Fix dynamic IPv6 rules showing junk for non-specified address masks.

Relnotes: yes

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

8 years agoMFstable/10 r291758:
ngie [Fri, 4 Dec 2015 10:02:14 +0000 (10:02 +0000)]
MFstable/10 r291758:

MFC r291358:

Remove cnftp.bjpu.edu.cn (it no longer resolves)
Add localhost to resolv/mach for parity with nss/mach

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

8 years agoMFstable/10 r243346,r291761:
ngie [Fri, 4 Dec 2015 09:27:56 +0000 (09:27 +0000)]
MFstable/10 r243346,r291761:

r243346 (by emaste):

Non-void function should return a value.

Found by: clang

r291761:

MFC r291359,r291362:

r291359:

Skip over lines that start with # (comments)

r291362:

r291359 was incorrect. Skip over tokens that start with `#' as fgetln can
return more than one '\n' delimited line in a buffer

Handle empty lines too, just in case

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

8 years agoMFstable/10 r291759:
ngie [Fri, 4 Dec 2015 09:18:59 +0000 (09:18 +0000)]
MFstable/10 r291759:

MFC r291363:

Clean up trailing whitespace

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

8 years agoMFstable/10 r291754:
ngie [Fri, 4 Dec 2015 09:08:39 +0000 (09:08 +0000)]
MFstable/10 r291754:

MFC r284527,r284528,r284608,r285219,r291166,r291167:

r284527 (by imp):

Update style.9 to reflect consensus on developer's mailing list
allowing redundant braces.

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

r284528 (by imp):

Bump date.

Submitted by: Xin Li

r284608 (by imp):

Back out contested change until dispute is resolved. This proved to be
more contentious than I expected.

r285219 (by imp):

The results of the vote are in. This reflects that vote. Single
line statements inside of braces is recognized as an acceptable
style.
http://reviews.freebsd.org/V3
As always, this isn't license for wholesale change, etc.

r291166:

Recommend cc -Wall instead of gcc -Wall

r291167:

Bump .Dd

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

8 years agoMFstable/10 r291573:
ngie [Fri, 4 Dec 2015 09:07:54 +0000 (09:07 +0000)]
MFstable/10 r291573:

MFC r278932:
r278932 (by pfg):

libc: clean some set-but-not-used errors.

These were found by gcc 5.0 on Dragonfly BSD, however I
made no attempt to silence the false positives.

Obtained from: DragonFly (cf515c3a6f3a8964ad592e524442bc628f8ed63b)

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

8 years agoMerge OpenSSL 0.9.8zh.
jkim [Thu, 3 Dec 2015 21:24:40 +0000 (21:24 +0000)]
Merge OpenSSL 0.9.8zh.

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

8 years agoMFC: r291035
rmacklem [Wed, 2 Dec 2015 21:56:01 +0000 (21:56 +0000)]
MFC: r291035
The problem report was for a crash that happened when smbfs was
trying to do a mount. Given the backtrace,
it appears that the crash occurred when smb_vc_create() failed and then
called smb_vc_put() with vcp->vc_iod == NULL. smb_vc_put() subsequently
called smb_vc_disconnect() with vcp->vc_iod == NULL, causing the crash.
This patch adds a check for vcp->vc_iod != NULL in smb_vc_disconnect() to
avoid the crash. It also fixes the case in smb_vc_create() where
kproc_create() fails so that it destroys the mutexes and sets
vcp->vc_iod == NULL before free()'ing the iod structure.

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

8 years agoUpdate addresses for H root.
erwin [Wed, 2 Dec 2015 11:11:58 +0000 (11:11 +0000)]
Update addresses for H root.

Sponsored by: DK Hostmaster A/S

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

8 years agoMFstable/10 r291572:
ngie [Tue, 1 Dec 2015 07:33:30 +0000 (07:33 +0000)]
MFstable/10 r291572:

MFC r269326:
r269326 (by n_hibma):

Fix the example: free the memory that was allocated by getline().

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

8 years agoMFstable/10 r291336:
ngie [Tue, 1 Dec 2015 06:51:59 +0000 (06:51 +0000)]
MFstable/10 r291336:

MFC r288006,r288031,r288032,r288033:

r288006 (by rodrigc):

Add declarations to eliminate -Wmissing-prototypes warnings

r288031 (by rodrigc):

Remove names from some prototypes

r288032 (by rodrigc):

Remove names from some prototypes

r288033 (by rodrigc):

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

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

8 years agoMFC: r290970
rmacklem [Tue, 1 Dec 2015 02:35:12 +0000 (02:35 +0000)]
MFC: r290970
mnt_stat.f_iosize (which is used to set bo_bsize) must be set to
the largest size of buffer cache block or the mapping of the buffer
is bogus. When a mount with rsize=4096,wsize=4096 was done, f_iosize
would be set to 4096. This resulted in corrupted directory data, since
the buffer cache block size for directories is NFS_DIRBLKSIZ (8192).
This patch fixes the code so that it always sets f_iosize to at least
NFS_DIRBLKSIZ.

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

8 years agoMFC: r290959
rmacklem [Mon, 30 Nov 2015 14:35:35 +0000 (14:35 +0000)]
MFC: r290959
When the smbfs iod thread (smb_iod_thread()) is shutting down, smb_iod_destroy()
would call smb_iod_request(). This call could return as soon as the
wakeup(evp) in smb_iod_main() call is done and then could destroy
the mutexes. This caused a race with the rest of smb_iod_main()s
use of these mutexes.
A crash reported on freebsd-stable@ by Christian Kratzer was
diagnosed as a use of one of these mutexes after it was destroyed.
This patch moves destruction of the mutexes from smb_iod_destroy()
to the end of smb_iod_thread(), so that they aren't destroyed before
the thread is done with them. Christian comfirmed that the patch
stopped the crashes from happening.

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

8 years agoMFC r283679
arybchik [Mon, 30 Nov 2015 13:20:49 +0000 (13:20 +0000)]
MFC r283679

sfxge: do not use DEBUG_FLAGS to enable extra debug checks

DEBUG_FLAGS are set to DEBUG option value when kernel is built.
For example, it is -g in GENERIC config to have debug symbols.
Also DEBUG_FLAGS are used to determine if ctfconvert should keep
debug symbols.
Since we redefined DEBUG_FLAGS, debug symbols were always missing.
ctfconvert complains about it during kernel build.
It is incorrect to append DEBUG_FLAGS, since if DEBUG has no -g (or
similar), we'll have no debug symbols and ctfconvert will complain.
If it incorrect to always have -g in our DEBUG_FLAGS, since debug
symbols presence should be controllable by kernel config.
So, just add disabled by default addition of -DDEBUG=1 to CFLAGS.

PR:             163775
Sponsored by:   Solarflare Communications, Inc.

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

8 years agoMFC r290855: Increase reset assertion time from 10 to 100us.
mav [Sun, 29 Nov 2015 17:14:46 +0000 (17:14 +0000)]
MFC r290855: Increase reset assertion time from 10 to 100us.

On my own tests I see no effect from this change, but I also can't
reproduce the reported problem in general.

PR:             127391
PR:             204554
Submitted by:   satz@iranger.com

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

8 years agoMFC r291061: Improve locking of sg_threadcount.
mav [Fri, 27 Nov 2015 14:40:59 +0000 (14:40 +0000)]
MFC r291061: Improve locking of sg_threadcount.

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

8 years agoMFstable/10 r291294:
ngie [Wed, 25 Nov 2015 09:19:32 +0000 (09:19 +0000)]
MFstable/10 r291294:

MFC r258245:
r258245 (by eadler):

Add missing include files for the printf_l and scanf_l man pages.

Reported by: swildner@dragonflybsd.org

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

8 years agoMFC r291146:
hselasky [Tue, 24 Nov 2015 12:30:21 +0000 (12:30 +0000)]
MFC r291146:
Add support for Kana and Eisu keys to the USB keyboard driver.

PR: 204709

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

8 years agoMFC r290326:
hselasky [Tue, 24 Nov 2015 12:19:20 +0000 (12:19 +0000)]
MFC r290326:
Relax the BUS_DMA_KEEP_PG_OFFSET requirement to allow optimising
allocation of DMA bounce buffers.

Discussed with: ian @

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

8 years agoMFC r277974:
hselasky [Mon, 23 Nov 2015 13:48:28 +0000 (13:48 +0000)]
MFC r277974:
Fix a bunch of -Wcast-qual warnings in sys/dev/usb/input/uhid.c, by
using __DECONST.  No functional change.

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

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

8 years agoMFC r284722 and r284724:
hselasky [Mon, 23 Nov 2015 13:38:46 +0000 (13:38 +0000)]
MFC r284722 and r284724:
Fix endless recursion in ti(4)'s ti_ifmedia_upd(), found by clang 3.7.0.

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

8 years agoMFstable/10 r291185:
ngie [Mon, 23 Nov 2015 09:36:25 +0000 (09:36 +0000)]
MFstable/10 r291185:

MFC r291047:

Don't leak work if __mlx4_register_vlan(..) fails in
mlx4_master_immediate_activate_vlan_qos(..)

Differential Revision: https://reviews.freebsd.org/D4203
Submitted by: Miles Olrich <miles.olrich@isilon.com>
Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC 290416:
jhb [Thu, 19 Nov 2015 19:40:30 +0000 (19:40 +0000)]
MFC 290416:
Chelsio T5 chips do not properly echo the No Snoop and Relaxed Ordering
attributes when replying to a TLP from a Root Port.  As a workaround,
disable No Snoop and Relaxed Ordering in the Root Port of each T5 adapter
during attach so that CPU-initiated requests do not contain these flags.

Note that this affects CPU-initiated requests to all devices under this
root port.

Sponsored by: Chelsio

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

8 years agoMFC r290639:
hselasky [Thu, 19 Nov 2015 10:01:50 +0000 (10:01 +0000)]
MFC r290639:
Update the wsp driver to support newer touch pads, like found in
MacBookPro11,4 and MacBook12,1. This update adds support for the
force touch parameter.

PR: 204420

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

8 years agoMFC r290489:
hselasky [Thu, 19 Nov 2015 09:54:28 +0000 (09:54 +0000)]
MFC r290489:
Add helper function to check if a USB page cache buffer is properly
aligned to reduce the use of bounce buffers in PIO mode.

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

8 years agoMFstable/10 r290899:
ngie [Thu, 19 Nov 2015 03:53:31 +0000 (03:53 +0000)]
MFstable/10 r290899:

MFC r290253:

Remove unnecessary `if (x)` tests before calling `free(x)`; free(3)
already employs this check

Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFstable/10 r291042:
ngie [Thu, 19 Nov 2015 00:19:09 +0000 (00:19 +0000)]
MFstable/10 r291042:

MFC r290645:

Fix some trivial warnings with bootparamd/main.c

- Convert K&R to something a bit less ancient
- Remove an incorrect, duplicate prototype for bootparamprog_1(..)

PR: 71667
Submitted by: bcran
Sponsored by: EMC / Isilon Storage Division

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

8 years agoDocument EN-15:19.kqueue, EN-15:20.vm, SA-15:25.ntp
gjb [Tue, 17 Nov 2015 18:22:56 +0000 (18:22 +0000)]
Document EN-15:19.kqueue, EN-15:20.vm, SA-15:25.ntp

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r290452: zfsboottest: catch up with r241289, call zfs_spa_init() for
avg [Tue, 17 Nov 2015 15:18:59 +0000 (15:18 +0000)]
MFC r290452: zfsboottest: catch up with r241289, call zfs_spa_init() for
all found pools

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

8 years agoMFC r290451: zfsboottest: build as a 32 bit application
avg [Tue, 17 Nov 2015 15:14:16 +0000 (15:14 +0000)]
MFC r290451: zfsboottest: build as a 32 bit application

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

8 years agoMFC r290191: l2arc: do not call trim_map_free() for blocks with zero b_asize
avg [Tue, 17 Nov 2015 15:10:24 +0000 (15:10 +0000)]
MFC r290191: l2arc: do not call trim_map_free() for blocks with zero b_asize

The code in this branch has become quite outdated, so the change had to be
applied by hand.

PR: 203473

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

8 years agoMFstable/10 r290890:
ngie [Sun, 15 Nov 2015 21:58:04 +0000 (21:58 +0000)]
MFstable/10 r290890:

MFC r283245:

r283245 (by imp):

Remove stray DEBUG_FLAGS=-g that snuck in with r184761.

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

8 years agoMFstable/10 r290882,r290884,r290885:
ngie [Sun, 15 Nov 2015 21:44:10 +0000 (21:44 +0000)]
MFstable/10 r290882,r290884,r290885:

r290882:

MFC r290260,r290262:

r290260:

Document undocumented long options for -t cd9660

Note which options have been implemented and which options haven't
been implemented

Submitted as the following NetBSD PRs: bin/50390 and bin/50392

Sponsored by: EMC / Isilon Storage Division

r290262:

Fix spelling of `isolevel` cd9660 option

Sponsored by: EMC / Isilon Storage Division

r290884:

MFC r290259,r290601:

r290259:

Sync makefs(8) content a bit with src/usr.sbin/makefs/makefs.8@1.53

Sections involving unimplemented filesystems (chfs, msdosfs, udf, v7fs) and
options have been omitted.

Obtained from: NetBSD
Sponsored by: EMC / Isilon Storage Division

r290601:

Follow up to r290259 dealing with makefs(8)

- Don't use contractions (don't -> do not)
- Change "throw away" to "discard" when describing the -o keep-bad-images option
- Revert author e-mail split I brought over from NetBSD, effectively reverting
  the change bapt made in r267668

Submitted by: bjk
Sponsored by: EMC / Isilon Storage Division

r290885:

Bump .Dd

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

8 years agoMFstable/10 r249373:
ngie [Sun, 15 Nov 2015 21:41:51 +0000 (21:41 +0000)]
MFstable/10 r249373:

r249373 (by joel):

Remove contractions.

Command used:
$ svn merge --accept mine-full -c r249373 ^/stable/10

Conflicts:
share/man/man9/locking.9
share/man/man9/zone.9
usr.bin/patch

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

8 years agoMFstable/10 r231564:
ngie [Sun, 15 Nov 2015 21:27:50 +0000 (21:27 +0000)]
MFstable/10 r231564:
r231564 (by ed):

Globally replace u_int*_t from (non-contributed) man pages.

The reasoning behind this, is that if we are consistent in our
documentation about the uint*_t stuff, people will be less tempted to
write new code that uses the non-standard types.

I am not going to bump the man page dates, as these changes can be
considered style nits. The meaning of the man pages is unaffected.

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

8 years agoMFstable/10 r233422:
ngie [Sun, 15 Nov 2015 21:16:13 +0000 (21:16 +0000)]
MFstable/10 r233422:

r233422 (by joel):

Remove superfluous paragraph macro.

Command used:
$ svn merge --accept mine-conflict -c 233422 ^/stable/10

Conflicts:
share/man/man4/netmap.4
share/man/man9/locking.9 (

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

8 years agoMFstable/10 r290879:
ngie [Sun, 15 Nov 2015 20:25:26 +0000 (20:25 +0000)]
MFstable/10 r290879:

MFC r290659,r290660:

r290659:

- Move ng_bluetooth.4 under MK_BLUETOOTH != no
- Move all section 5 bluetooth manpages under MK_BLUETOOTH != no

PR: 193260
Reported by: Philippe Michel <philippe.michel7@sfr.fr>
Sponsored by: EMC / Isilon Storage Division

r290660:

Move the MK_BLUETOOTH block down below the architecture specific sections by the
other generic options

PR: 193260
Sponsored by: EMC / Isilon Storage Divisions

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

8 years agoMFstable/10 r290877:
ngie [Sun, 15 Nov 2015 20:20:03 +0000 (20:20 +0000)]
MFstable/10 r290877:

MFC r289896:

Make vers.c creation atomic by using a temporary file, then moving
the temporary file to vers.c at the end of the script

The previous logic wrote out to vers.c multiple times, so the file
could be incorrectly interpreted as being completely written out
after one of the echo calls with recursive make, when in reality it
was only partially written.

Also, in the event the build was interrupted when creating vers.c
(small race window), it would have a leftover file that needed to
be cleaned up before resuming the build.

Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r290428:
bdrewery [Sat, 14 Nov 2015 17:32:38 +0000 (17:32 +0000)]
MFC r290428:

  remove \, it confuses things.

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

8 years agoMFC 290414,290415:
jhb [Sat, 14 Nov 2015 01:06:45 +0000 (01:06 +0000)]
MFC 290414,290415:
Additional PCI helper functions.

290414:
Add helper routines for PCI device drivers to read, write, and modify
PCI-Express capability registers (that is, PCI config registers in the
standard PCI config space belonging to the PCI-Express capability
register set).

Note that all of the current PCI-e registers are either 16 or 32-bits,
so only widths of 2 or 4 bytes are supported.

290415:
Add a new helper function for PCI devices to locate the upstream
PCI-express root port of a given PCI device.

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

8 years agoMFC 232472 (partial):
jhb [Sat, 14 Nov 2015 00:04:42 +0000 (00:04 +0000)]
MFC 232472 (partial):
Cache the starting location of the PCI-express capability for PCI-express
devices in PCI device ivars.

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

8 years agoMFC 290412:
jhb [Fri, 13 Nov 2015 22:33:51 +0000 (22:33 +0000)]
MFC 290412:
Note if relaxed ordering or no snoop is enabled for each PCI-express device.

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

8 years agoMFC 284325:
jhb [Fri, 13 Nov 2015 00:50:34 +0000 (00:50 +0000)]
MFC 284325:
Report the values of x86 segment registers to remote debuggers.

While here, also report %eflags from the i386 trapframe.

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

8 years agoFix i386 build. stable/9 does not have XSAVE support.
jhb [Fri, 13 Nov 2015 00:47:44 +0000 (00:47 +0000)]
Fix i386 build.  stable/9 does not have XSAVE support.

Pointy hat to: jhb

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

8 years agoMFC 285783:
jhb [Thu, 12 Nov 2015 23:49:47 +0000 (23:49 +0000)]
MFC 285783:
Various changes to the registers displayed in DDB for x86.
- Fix segment registers to only display the low 16 bits.
- Remove unused handlers and entries for the debug registers.
- Display xcr0 (if valid) in 'show sysregs'.
- Add '0x' prefix to MSR values to match other values in 'show sysregs'.
- MFamd64: Display various MSRs in 'show sysregs'.
- Add a 'show dbregs' to display the value of debug registers.
- Dynamically size the column width for register values to properly
  align columns on 64-bit platforms.
- Display %gs for i386 in 'show registers'.

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

8 years agoMFC 285773,285775,285776:
jhb [Thu, 12 Nov 2015 22:45:51 +0000 (22:45 +0000)]
MFC 285773,285775,285776:
Various fixes for stack unwinding in DDB on x86.

285773:
Remove some dead code from DDB's amd64 stack unwinder.

The amd64 port copied some code from i386 to fetch function arguments and
display them in backtraces. However, it was commented out and can't easily
be implemented since the function arguments are passed in
registers rather than on the stack in amd64. Remove it in preparation for
some bug fixes in this area.

285775:
Improve stack unwinding on i386 and amd64 after an IP fault.

If we can't find a symbol corresponding to the faulting instruction, assume
that the previously-executed function is a call and attempt to find the
calling function using the return address on the stack. Otherwise we end
up associating the last stack frame with the current call, which is
incorrect and causes the unwinder to skip printing of the calling function,
resulting in a confusing backtrace.

285776:
Let the unwinder handle faults during function prologues or epilogues.

The i386 and amd64 DDB stack unwinders contain code to detect and handle
the case where the first frame is not completely set up or torn down. This
code was accidentally unused however, since db_backtrace() was never called
with a non-NULL trap frame. This change fixes that.

Also remove get_rsp() from the amd64 code. It appears to have come from
i386, which needs to take into account whether the exception triggered a
CPL switch, since SS:ESP is only pushed onto the stack if so. On amd64,
SS:RSP is pushed regardless, so get_rsp() was doing the wrong thing for
kernel-mode exceptions. As a result, we can also remove custom print
functions for these registers.

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

8 years agoMFC of 290697,tzdata9:
edwin [Thu, 12 Nov 2015 03:28:32 +0000 (03:28 +0000)]
MFC of 290697,tzdata9:

Update to tzdata2015g:

Turkey's 2015 fall-back transition is scheduled for Nov. 8, not Oct. 25.

Norfolk moves from +1130 to +1100 on 2015-10-04 at 02:00 local time.

Fiji's 2016 fall-back transition is scheduled for January 17, not 24.

Fort Nelson, British Columbia will not fall back on 2015-11-01.  It has
effectively been on MST (-0700) since it advanced its clocks on 2015-03-08.
New zone America/Fort_Nelson.

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

8 years agoMFC 284324,290164:
jhb [Wed, 11 Nov 2015 01:32:35 +0000 (01:32 +0000)]
MFC 284324,290164:
Workaround debuggers that try to read the full 32-bit words holding
selectors in trapframes.

284324:
Ensure that the upper 16 bits of segment registers manually saved in
trapframes are cleared by explicitly pushing a zero and then moving
the segment register into the low 16 bits.  Certain Intel processors
treat a push of a segment register as a move of the segment register
into the low 16 bits leaving the upper 16 bits of the word in the
stack unchanged.

290164:
Use movw instead of movl (or plain mov) when moving segment registers
into memory.  This is a nop on clang's assembler, but some assemblers
complain if the size suffix is incorrect.

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

8 years agoMFC r290441:
hselasky [Mon, 9 Nov 2015 11:27:31 +0000 (11:27 +0000)]
MFC r290441:
Fix for unaligned IP-header.

The mbuf length fields must be set before m_adj() is called else
m_adj() will not always adjust the mbuf and an unaligned read
exception can trigger inside the network stack. This can happen on
platforms where unaligned reads are not supported. Adjust a length
check to include the 2-byte ethernet alignment while at it.

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