]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
8 years agoMFC: r284283
jkim [Thu, 11 Jun 2015 19:07:45 +0000 (19:07 +0000)]
MFC: r284283

Merge OpenSSL 1.0.1n.

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

8 years agoMFC r282525-282533
kadesai [Thu, 11 Jun 2015 14:11:41 +0000 (14:11 +0000)]
MFC r282525-282533

r282533 : Corrected indentation on conflicted source files.

r282532 : Configured the mrsas(4) driver to support UNMAPPED I/O and updated driver version.

r282531 :

1. All LSI namings are converted to AVAGO Tech.
2. Fix in AEN path(suggested by John Baldwin).
3. Fix IOCTL path w.r.t Sense key handling

r282530 :

Bug fixes found internally as detailed below:
1. While disabling interrupt the FW disables interrupts for only 16 vectors.
In case of Invader which supports 96 MSI-x vectors, some spurious interrupts
may come on other vectors even after interrupt disable. So, driver uses a flag
and ignores the spurious interrupts.
2. Reply queue depth is made double the number of commands supported by FW.
3. Misplaced interrupt enable code is now moved down in the OCR path.
4. Updated error handling code in OCR path.
5. Removed un-necessary print.

r282529 :

Driver calls mrsas_complete_cmd() to call mrsas_wakeup() for each MFI frame that was
issued through the ioctl() interface prior to the kill adapter. This ensures
userspace ioctl() system calls issued just before a kill adapter don't get stuck in
wait state and IOCTLs are returned to application.

r282528 :

In OCR(Online Controller Reset) path, driver sets adapter state to
MEGASAS_HBA_OPERATIONAL before getting new RAID map.
There will be a small window where IO will come from OS with old RAID map.
This patch will update adapter state to MEGASAS_HBA_OPERATIONAL,
only after driver has new RAID map to avoid any IOs getting build using old RAID map.

r282527 :

Current driver does fast path read load balancing between arm and mirror disk
for two Drive Raid-1 configuration only.

Now, Driver support fast path read load balancing for all (any number of disk) Raid-1 configuration.

r282526 :

Now Driver expose Secure Jbod Support via driver_operations in MFI INIT Frame.
FW expose Secure Jbod support via Controller properity.

Firmware expect IOs to be received from different IO path than
conventional fast path queue, in case of SED drives.

To have Secure jbod support user need driver and firmware support.

r282525 : This patch adds the feature to provide PCI information via IOCTL query.

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

8 years agoMFC r284245:
jch [Thu, 11 Jun 2015 13:44:06 +0000 (13:44 +0000)]
MFC r284245:
Fix a callout race condition introduced in TCP timers callouts with r281599.
In TCP timer context, it is not enough to check callout_stop() return value
to decide if a callout is still running or not, previous callout_reset()
return values have also to be checked.

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

8 years agoMFC: r283635
rmacklem [Wed, 10 Jun 2015 12:17:19 +0000 (12:17 +0000)]
MFC: r283635
Make the size of the hash tables used by the NFSv4 server tunable.
No appreciable change in performance was observed after increasing
the sizes of these tables and then testing with a single client.
However, there was an email that indicated high CPU overheads for
a heavily loaded NFSv4 and it is hoped that increasing the sizes
of the hash tables via these tunables might help.
The tables remain the same size by default.

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

8 years agoAdd chunk missed in the r284199.
kib [Wed, 10 Jun 2015 02:44:56 +0000 (02:44 +0000)]
Add chunk missed in the r284199.

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

8 years agoBump __FreeBSD_version for r284203.
kib [Wed, 10 Jun 2015 02:28:50 +0000 (02:28 +0000)]
Bump __FreeBSD_version for r284203.

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

8 years agoMFC r283602:
kib [Wed, 10 Jun 2015 02:27:00 +0000 (02:27 +0000)]
MFC r283602:
Prevent dounmount() from acting on the freed (although type-stable)
memory by changing the interface to require the mount point to be
referenced.

MFC r283629:
Add missed {}.

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

8 years agoMFC r283601:
kib [Wed, 10 Jun 2015 02:20:58 +0000 (02:20 +0000)]
MFC r283601:
Add V_MNTREF flag, to indicate that caller of vn_start*_write() already
owns a reference on the mount point, and the functions can consume it.

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

8 years agoMFC r283968:
kib [Wed, 10 Jun 2015 02:14:33 +0000 (02:14 +0000)]
MFC r283968:
Syncing a directory vnode might drop the vnode lock in the
softdep_sync() similarly to the regular vnode sync.  Allow retry for
both vnode types.

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

8 years agoMFC r283604:
kib [Wed, 10 Jun 2015 02:12:01 +0000 (02:12 +0000)]
MFC r283604:
Remove NODELAY flag.

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

8 years agoMFC r283600:
kib [Wed, 10 Jun 2015 02:04:02 +0000 (02:04 +0000)]
MFC r283600:
Perform SU cleanup in the AST handler.  Do not sleep waiting for SU cleanup
while owning vnode lock.

On MFC, for KBI stability, td_su member was moved to the end of the
struct thread.

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

8 years agoMFC r283001:
eadler [Wed, 10 Jun 2015 01:17:14 +0000 (01:17 +0000)]
MFC r283001:
ssh-copy-id: Add missing line continuation

PR: 194301
Requested by: tuexen

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

8 years agoMFC r283115
asomers [Tue, 9 Jun 2015 19:41:16 +0000 (19:41 +0000)]
MFC r283115

Properly null-terminate strings in a kernel dump header.  A version string
longer than 192 bytes will cause the version field of a dump header to
overflow. strncpy doesn't null terminate it, so savecore will print a
corrupted info file. Using strlcpy fixes the bug.

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

8 years agoMFC r284022: Avoid ID conflict
achim [Tue, 9 Jun 2015 11:40:30 +0000 (11:40 +0000)]
MFC r284022: Avoid ID conflict

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

8 years agoMFC r283870:
dim [Mon, 8 Jun 2015 19:44:04 +0000 (19:44 +0000)]
MFC r283870:

Remove unneeded NULL checks in amd64's trap_fatal().

Since td_name is an array member of struct thread, it can never be NULL,
so the check can be removed.  In addition, curproc can never be NULL,
so remove the if statement, and splice the two printfs() together.

While here, remove the u_long cast, and use the correct printf format
specifier curproc->p_pid.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D2695

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

8 years agoMFC r284044: Fix wrong function name in error message.
mav [Mon, 8 Jun 2015 16:24:43 +0000 (16:24 +0000)]
MFC r284044: Fix wrong function name in error message.

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

8 years agoMFC r283920, r283991, r283992, r284102:
gjb [Mon, 8 Jun 2015 15:24:24 +0000 (15:24 +0000)]
MFC r283920, r283991, r283992, r284102:

r283920:
 Add a configuration file to support the Cubox/Hummingboard SoC.

r283991:
 Add initial support for building images for the Duovero Gumstix
 board.

r283992:
 Fix a whitespace nit.

r284102:
 Set the correct UBLDR_LOADADDR for the Wandboard and
 Cubox/Hummingboard images.

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r283896:
gjb [Mon, 8 Jun 2015 15:12:47 +0000 (15:12 +0000)]
MFC r283896:
 In arm_create_disk(), disable soft updates journaling.

 Disabling soft updates journaling appears to resolve issues
 with kernel panics, and may also be generally bad to have
 enabled for SD cards.

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r283894, r283895, r283913, r284004, r284010:
gjb [Mon, 8 Jun 2015 15:08:09 +0000 (15:08 +0000)]
MFC r283894, r283895, r283913, r284004, r284010:

 r283894 [1]:
  Disable arm_create_user().

 r283895 [1]:
  Re-enable arm_create_user(), and pass the '-V DESTDIR/etc' to
  pw(8) to set the correct /etc directory for the user/group
  files.

 r283913:
  Pass the '-b' argument to pw(8) so the '/home' directory is
  created in the correct place.

 r284004:
  Make sure /home exists within the DESTDIR before creating the
  'freebsd' user account.

 r284010 [2]:
  Work around a potential bug in pw(8) when '-m' is specified.

 [1] For recording merge history only.
 [2] This commit post-dates the pw(8) '-R' addition in head/,
     which is needed for conflict resolution from r284004.

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r283988:
tuexen [Mon, 8 Jun 2015 07:06:33 +0000 (07:06 +0000)]
MFC r283988:

Export a pointer to the SCTP socket. This is needed to add SCTP support
to sockstat.

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

8 years agoMFC r278167, MFV r266995:
pfg [Sun, 7 Jun 2015 21:14:48 +0000 (21:14 +0000)]
MFC r278167, MFV r266995:

4767 dtrace_probe() always has the timestamp

Reference:
https://illumos.org/issues/4767

Obtained from: Illumos

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

8 years agoMFC r278166, MFV r266993:
pfg [Sun, 7 Jun 2015 20:45:13 +0000 (20:45 +0000)]
MFC r278166, MFV r266993:

4469 DTrace helper tracing should be dynamic

Reference:
https://illumos.org/issues/4469

Obtained from: Illumos
Phabric: D1551
Reviewed by: markj

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

8 years agoMFC r278136, r278137, r278370:
markj [Sun, 7 Jun 2015 20:10:11 +0000 (20:10 +0000)]
MFC r278136, r278137, r278370:
Diff reduction with illumos, in preparation for merging r266993 from the
vendor branch. No functional change.

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

8 years agoMFC r282739:
markj [Sun, 7 Jun 2015 19:48:21 +0000 (19:48 +0000)]
MFC r282739:
ctf_add_type(): when looking up an integer or floating point type in the
list of pending dynamic type definitions, a match on the type name is not
sufficient - we need to compare the type encodings as well. For example,
bitfields have their own distinct type definitions which share the name of
the underlying integer type, and these types aren't generally
interchangeable.

This bug was causing the following libdtrace error when attempting to trace
the th_flags member of a struct tcphdr:
  cg: bad field: off 104 type <32877> bits 539620016

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

8 years agoMFC r283025:
markj [Sun, 7 Jun 2015 19:46:12 +0000 (19:46 +0000)]
MFC r283025:
As dtrace(1) processes D libraries under /usr/lib/dtrace, the compiler may
return an error if one of the depends_on directives in a library is not
satisfied. In this case, libdtrace is supposed to ignore the library and
carry on. However, the remainder of the library may still be buffered by
the lexer, causing libdtrace to erroneously continue processing it on the
next call to yyparse(). Fix this by explicitly flushing the input buffer
each time the compiler state is reset.

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

8 years agoMFC: r283330
rmacklem [Sat, 6 Jun 2015 20:54:41 +0000 (20:54 +0000)]
MFC: r283330
The NFS client generated directory block(s) with d_fileno == 0
so that it would not return less data than requested.
Since returning less directory data than requested is not a problem
for FreeBSD and even UFS no longer returns directory structures
with d_fileno == 0, this patch stops the client from doing this.
Although entries with d_fileno == 0 should not be a problem,
the man pages no longer document that these entries should be
ignored, so there was a concern that these entries might be an
issue in the future.

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

8 years agoMFC 261811,282660,282706:
jhb [Sat, 6 Jun 2015 20:37:40 +0000 (20:37 +0000)]
MFC 261811,282660,282706:
Place VM objects on the object list when created and never remove them.

261811:
Fix function name in KASSERT().

282660:
Place VM objects on the object list when created and never remove them.
This is ok since objects come from a NOFREE zone and allows objects to
be locked while traversing the object list without triggering a LOR.

Ensure that objects on the list are marked DEAD while free or stillborn,
and that they have a refcount of zero.  This required updating most of
the pagers to explicitly mark an object as dead when deallocating it.
(Only the vnode pager did this previously.)

282706:
Satisfy vm_object uma zone destructor requirements after r282660 when
vnode object creation raced.

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

8 years agoMFC r279236:
ian [Sat, 6 Jun 2015 20:14:58 +0000 (20:14 +0000)]
MFC r279236:

  Change struct attribute to avoid aligned operations mismatch
  Previous __alignment(4) allowed compiler to assume that operations are
  performed on aligned region. On ARM processor, this led to alignment fault

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

8 years agoMFC r259150 (by adrian@) and r283864.
np [Sat, 6 Jun 2015 20:01:06 +0000 (20:01 +0000)]
MFC r259150 (by adrian@) and r283864.

r259150:
Print out the full PCIe link negotiation during dmesg.

I found this useful when checking whether a NIC is in a PCIE 3.0 8x slot
or not.

r283864:
cxgbe: no need to display the per-lane GT/s rating of the pcie link.

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

8 years agoMFC r279824, r279827, r279825:
ian [Sat, 6 Jun 2015 19:15:48 +0000 (19:15 +0000)]
MFC r279824, r279827, r279825:

  Add a dtb module for AM335x systems (just Beaglebone right now).

  Remove the static DTB config and instead build modules/dtb/am335x.

  Also, remove WITHOUT_MODULES="ahc" which was added long ago to work
  around build problems that have long since been fixed correctly.

  Revert accidentally commited modules/Makefile file from r279824.

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

8 years agoMFC r278338, r278340, r278458, r278519:
ian [Sat, 6 Jun 2015 18:49:02 +0000 (18:49 +0000)]
MFC r278338, r278340, r278458, r278519:

  Create a module to install the Raspberry Pi dtb files.

  Pull in the rpi.dts -> rpi.dtb module (dtb/rpi) and have it install
  rpi.dtb in /boot/dtb by default.

  Add a module to build the dtb files for all supported imx6 systems.

  Remove imx6s-wandboard.dts, there is no such file.

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

8 years agoMFC r283858 and r284007.
np [Sat, 6 Jun 2015 18:46:37 +0000 (18:46 +0000)]
MFC r283858 and r284007.

r283858:
cxgbe: set minimum burst size when fetching freelist buffers to 128B.

r284007:
cxgbe: set the minimum burst size when fetching fl buffers to 128B for
netmap rx queues too.  This should have gone in as part of r283858.

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

8 years agoMFC r280878:
np [Sat, 6 Jun 2015 18:31:28 +0000 (18:31 +0000)]
MFC r280878:

cxgbe/tom: return rx credits promptly if the socket buffer's low water
mark cannot be reached because the window advertised to the peer isn't
wide enough.  While here, tweak the normal credit return too.

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

8 years agoMFC r278458, r278519:
ian [Sat, 6 Jun 2015 18:21:16 +0000 (18:21 +0000)]
MFC r278458, r278519:

  Pass MODULES_EXTRA to the modules build. While I'm here, also always
  pass WITHOUT_MODULES down. There's no need to make this conditional.

  Properly quote EXTRA_MODULES and WITHOUT_MODULES to ensure that they
  are passed down properly when there's more than one.

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

8 years agoMFC r279385, r279902, r281412:
ian [Sat, 6 Jun 2015 18:03:36 +0000 (18:03 +0000)]
MFC r279385, r279902, r281412:

  Merge latest dts files (commit c8c1b3a77934768c7f7a4a9c10140c8bec529059)
  from the git tree.

  File names with commas in them cause issues for freebsd-update. We
  don't actually use these files at the moment, so eliminate them until
  we actually do. In the mean time, freebsd-update will be updated
  to eliminate the issues.

  The GNU Amlogic DTS files have some errors (e.g. bad register
  address, bad IRQ, etc) which are fixed by this patch.

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

8 years agoMFC r278239 and r278374.
np [Sat, 6 Jun 2015 18:00:36 +0000 (18:00 +0000)]
MFC r278239 and r278374.

r278239:
cxgbe(4): reserve id for iSCSI upper layer driver.

r278374:
cxgbe(4): tidy up some of the interaction between the Upper Layer
Drivers (ULDs) and the base if_cxgbe driver.

Track the per-adapter activation of ULDs in a new "active_ulds" field.
This was done pretty arbitrarily before this change -- via TOM_INIT_DONE
in adapter->flags for TOM, and the (1 << MAX_NPORTS) bit in
adapter->offload_map for iWARP.

iWARP and hw-accelerated iSCSI rely on the TOE (supported by the TOM
ULD).  The rules are:
a) If the iWARP and/or iSCSI ULDs are available when TOE is enabled then
   iWARP and/or iSCSI are enabled too.
b) When the iWARP and iSCSI modules are loaded they go looking for
   adapters with TOE enabled and enable themselves on that adapter.
c) You cannot deactivate or unload the TOM module from underneath iWARP
   or iSCSI.  Any such attempt will fail with EBUSY.

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

8 years agoMFC r283897:
ae [Sat, 6 Jun 2015 13:39:20 +0000 (13:39 +0000)]
MFC r283897:
  Add example how to configure gre(4) tunnel with the same inner and
  outer addresses using multiple FIBs.

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

8 years agoMFC r282809:
ae [Sat, 6 Jun 2015 13:37:11 +0000 (13:37 +0000)]
MFC r282809:
  Add new socket ioctls SIOC[SG]TUNFIB to set FIB number of encapsulated
  packets on tunnel interfaces. Add support of these ioctls to gre(4),
  gif(4) and me(4) interfaces. For incoming packets M_SETFIB() should use
  if_fib value from ifnet structure, use proper value in gre(4) and me(4).

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

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

8 years agoMFC r276902,282536:
ae [Sat, 6 Jun 2015 13:29:41 +0000 (13:29 +0000)]
MFC r276902,282536:
  Pass mtag argument into m_tag_locate() to continue the search from
  the last found mtag.

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

8 years agoMFC r276148:
ae [Sat, 6 Jun 2015 13:26:13 +0000 (13:26 +0000)]
MFC r276148:
  Remove in_gif.h and in6_gif.h files. They only contain function
  declarations used by gif(4). Instead declare these functions in C files.
  Also make some variables static.

MFC r276215:
  Extern declarations in C files loses compile-time checking that
  the functions' calls match their definitions. Move them to header files.

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

8 years agoMFC r274246:
ae [Sat, 6 Jun 2015 12:44:42 +0000 (12:44 +0000)]
MFC r274246:
  Overhaul if_gre(4).

  Split it into two modules: if_gre(4) for GRE encapsulation and
  if_me(4) for minimal encapsulation within IP.

  gre(4) changes:
  * convert to if_transmit;
  * rework locking: protect access to softc with rmlock,
    protect from concurrent ioctls with sx lock;
  * correct interface accounting for outgoing datagramms (count only payload size);
  * implement generic support for using IPv6 as delivery header;
  * make implementation conform to the RFC 2784 and partially to RFC 2890;
  * add support for GRE checksums - calculate for outgoing datagramms and check
    for inconming datagramms;
  * add support for sending sequence number in GRE header;
  * remove support of cached routes. This fixes problem, when gre(4) doesn't
    work at system startup. But this also removes support for having tunnels with
    the same addresses for inner and outer header.
  * deprecate support for various GREXXX ioctls, that doesn't used in FreeBSD.
    Use our standard ioctls for tunnels.

  me(4):
  * implementation conform to RFC 2004;
  * use if_transmit;
  * use the same locking model as gre(4);

  PR: 164475

MFC r274289 (by bz):
  gcc requires variables to be initialised in two places.  One of them
  is correctly  used only under the same conditional though.

  For module builds properly check if the kernel supports INET or INET6,
  as otherwise various mips kernels without IPv6 support would fail to build.

MFC r274964:
  Add ip_gre.h to ObsoleteFiles.inc.

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

8 years agoMFC r276480, r276485, r276498, r277225, r277226, r277227, r277230,
np [Sat, 6 Jun 2015 09:28:40 +0000 (09:28 +0000)]
MFC r276480, r276485, r276498, r277225, r277226, r277227, r277230,
r277637, and r283149 (by emaste@).

r276485 is the real change here, the rest deal with the fallout of
mp_ring's reliance on 64b atomics.

Use the incorrectly spelled 'eigth' from struct pkthdr in this branch
instead of MFC'ing r261733, which would have renamed the field of a
public structure in a -STABLE branch.
---

r276480:
Temporarily unplug cxgbe(4) from !amd64 builds.

r276485:
cxgbe(4): major tx rework.

a) Front load as much work as possible in if_transmit, before any driver
lock or software queue has to get involved.

b) Replace buf_ring with a brand new mp_ring (multiproducer ring).  This
is specifically for the tx multiqueue model where one of the if_transmit
producer threads becomes the consumer and other producers carry on as
usual.  mp_ring is implemented as standalone code and it should be
possible to use it in any driver with tx multiqueue.  It also has:
- the ability to enqueue/dequeue multiple items.  This might become
  significant if packet batching is ever implemented.
- an abdication mechanism to allow a thread to give up writing tx
  descriptors and have another if_transmit thread take over.  A thread
  that's writing tx descriptors can end up doing so for an unbounded
  time period if a) there are other if_transmit threads continuously
  feeding the sofware queue, and b) the chip keeps up with whatever the
  thread is throwing at it.
- accurate statistics about interesting events even when the stats come
  at the expense of additional branches/conditional code.

The NIC txq lock is uncontested on the fast path at this point.  I've
left it there for synchronization with the control events (interface
up/down, modload/unload).

c) Add support for "type 1" coalescing work request in the normal NIC tx
path.  This work request is optimized for frames with a single item in
the DMA gather list.  These are very common when forwarding packets.
Note that netmap tx in cxgbe already uses these "type 1" work requests.

d) Do not request automatic cidx updates every 32 descriptors.  Instead,
request updates via bits in individual work requests (still every 32
descriptors approximately).  Also, request an automatic final update
when the queue idles after activity.  This means NIC tx reclaim is still
performed lazily but it will catch up quickly as soon as the queue
idles.  This seems to be the best middle ground and I'll probably do
something similar for netmap tx as well.

e) Implement a faster tx path for WRQs (used by TOE tx and control
queues, _not_ by the normal NIC tx).  Allow work requests to be written
directly to the hardware descriptor ring if room is available.  I will
convert t4_tom and iw_cxgbe modules to this faster style gradually.

r276498:
cxgbe(4): remove buf_ring specific restriction on the txq size.

r277225:
Make cxgbe(4) buildable with the gcc in base.

r277226:
Allow cxgbe(4) to be built on i386.  Driver attach will succeed only on
a subset of i386 systems.

r277227:
Plug cxgbe(4) back into !powerpc && !arm builds, instead of building it
on amd64 only.

r277230:
Build cxgbe(4) on powerpc64 too.

r277637:
Make sure the compiler flag to get cxgbe(4) to compile with gcc is used
only when gcc is being used.  This is what r277225 should have been.

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

8 years agoMFC 281932:
jhb [Fri, 5 Jun 2015 20:38:22 +0000 (20:38 +0000)]
MFC 281932:
Rename the kld for oce(4) to if_oce.ko.  ifconfig(8) has special knowledge
about kld filenames for network drivers that requires them to follow the
pattern of if_<foo>.  This also fixes the existing documentation in the
manpage which says to use if_oce_load=YES in loader.conf.

PR: 199095

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

8 years agoMFC 274633,274639,274663,277233-277235,281870,281871,281873,281874:
jhb [Fri, 5 Jun 2015 17:05:09 +0000 (17:05 +0000)]
MFC 274633,274639,274663,277233-277235,281870,281871,281873,281874:
Various fixes for suspend and resume of PCI to PCI and PCI to Cardbus
bridges.

274633:

Remove stray empty comment. The code is adequately explained in the
block comment above, so there's nothing to add here.

274639:

Modernize comments about BIOSes being lame since in this detail they
aren't lame, the rules changed along the way. Catch up to 1999 or so
with the new rules.

274663:

Fix typo pointed out by avg@ and Joerg Sonnenberger. Add a clarifying
sentence too.

277233:

Suspend and resume were the only two functions not to follow the brdev
convention here, so fix that.

277234:

Move the suspsned and resume functions to the bus attachment. They
were accessing PCI config registers, which won't work for the ISA
version.

277235:

Always enable I/O, memory and dma cycles. Some BIOSes don't enable
them, sometimes they are reset for power state transitions or during
whatever happens while suspended. Also, it is good practice to always
do this.

281870:

Cosmetic change: use PCIR_SECLAT_2 rather than PCIR_SECLAT_1.

281871:

The minimim grant and maximum latency PCI config registers are only valid
for type 0 devices, not type 1 or 2 bridges.  Don't read them for bridge
devices during bus scans and return an error when attempting to read them
as ivars for bridge devices.

281873:

Don't explicitly manage power states for PCI-PCI bridge devices in the
driver's suspend and resume routines.  These have been redundant no-ops
since r214065 changed the PCI bus driver to manage power states for
all devices (including type 1/2 bridge devices) during suspend and resume.

281874:

Update the pci_cfg_save/restore routines to operate on bridge devices
(type 1 and type 2) as well as leaf devices (type 0).  In particular,
this allows the existing PCI bus logic to save and restore capability
registers such as MSI and PCI-express work for bridge devices rather than
requiring that code to be duplicated in bridge drivers.  It also means
that bridge drivers no longer need to save and restore basic registers
such as the PCI command register or BARs nor manage powerstates for the
bridge device.

While here, pci_setup_secbus() has been changed to initialize the 'sec'
and 'sub' fields in the 'secbus' structure instead of requiring the pcib
and pccbb drivers to do this in the NEW_PCIB + PCI_RES_BUS case.

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

8 years agoMFC r283524: dsl_dataset_promote_check: ensure that shared snaps do not
avg [Fri, 5 Jun 2015 16:02:24 +0000 (16:02 +0000)]
MFC r283524: dsl_dataset_promote_check: ensure that shared snaps do not
become too long

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

8 years agoMFC r282766: zfs ioctls: use fget_write / fget_read instead of getf wrapper for fget
avg [Fri, 5 Jun 2015 15:51:23 +0000 (15:51 +0000)]
MFC r282766: zfs ioctls: use fget_write / fget_read instead of getf wrapper for fget

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

8 years agoMFC r283735:
kib [Fri, 5 Jun 2015 08:36:25 +0000 (08:36 +0000)]
MFC r283735:
Remove several write-only variables.

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

8 years agoMFC r283745:
kib [Fri, 5 Jun 2015 08:26:38 +0000 (08:26 +0000)]
MFC r283745:
Do not raise priority of the idle thread on singal delivery.

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

8 years agoMFC r283692:
kib [Fri, 5 Jun 2015 08:23:33 +0000 (08:23 +0000)]
MFC r283692:
Explicitely enable queued invalidation completion interrupt.

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

8 years agoMFC r271918 (by hrs):
ae [Fri, 5 Jun 2015 08:10:08 +0000 (08:10 +0000)]
MFC r271918 (by hrs):
  - Virtualize interface cloner for gre(4).  This fixes a panic when destroying
    a vnet jail which has a gre(4) interface.

  - Make net.link.gre.max_nesting vnet-local.

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

8 years agoRework r281868 to not skip RTM announces for tunneling interfaces.
ae [Fri, 5 Jun 2015 07:23:32 +0000 (07:23 +0000)]
Rework r281868 to not skip RTM announces for tunneling interfaces.
This is direct commit to stable/10.

Tested by: tuexen@

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

8 years agoMFC r283922:
hselasky [Fri, 5 Jun 2015 07:17:14 +0000 (07:17 +0000)]
MFC r283922:
Fix for control endpoint handling in the DWC OTG driver. The data
stage processing is only allowed after the setup complete event has
been received. Else a race may occur and the OUT data can be corrupted.
While at it ensure resetting a FIFO has the required wait loop.

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

8 years agoMFC r273955,274060,274164: Add /etc/rc.d/growfs script.
cperciva [Fri, 5 Jun 2015 00:46:49 +0000 (00:46 +0000)]
MFC r273955,274060,274164: Add /etc/rc.d/growfs script.

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

8 years agoMFC r283257:
delphij [Fri, 5 Jun 2015 00:39:34 +0000 (00:39 +0000)]
MFC r283257:

Eliminate unneeded includes.

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

8 years agoMFC r283936: Restore AHCI quirks printing as base16.
mav [Fri, 5 Jun 2015 00:35:17 +0000 (00:35 +0000)]
MFC r283936: Restore AHCI quirks printing as base16.

smh@ at r278034 made it base17, that is somewhat odd. :)

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

8 years agoMFC r283919:
gjb [Fri, 5 Jun 2015 00:28:38 +0000 (00:28 +0000)]
MFC r283919:
  Remove trailing tabs to avoid spamming stdout with long lines.

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC: Merge more of the dtb machinery
imp [Thu, 4 Jun 2015 22:11:39 +0000 (22:11 +0000)]
MFC: Merge more of the dtb machinery

Merge 278459,278460,278461,278462 which define DTBDIR and other things
needed for install to work. Although the commit in head kinda fixed
install_as_user, it's unknown if that works in 10.x (it didn't the last
time I tried).

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

8 years agoMFC: r283661
slm [Thu, 4 Jun 2015 16:27:18 +0000 (16:27 +0000)]
MFC: r283661
- Updated all files with 2015 Avago copyright, and updated LSI's copyright
  dates.

- Changed all of the PCI device strings from LSI to Avago Technologies (LSI).

- Added a sysctl variable to control how StartStopUnit behavior works. User can
  select to spin down disks based on if disk is SSD or HDD.

- Inquiry data is required to tell if a disk will support SSU at shutdown or
  not. Due to the addition of mprssas_async, which gets Advanced Info but not
  Inquiry data, the setting of supports_SSU was moved to the
  mprsas_scsiio_complete function, which snoops for any Inquiry commands. And,
  since disks are shutdown as a target and not a LUN, this process was
  simplified by basing it on targets and not LUNs.

- Added a sysctl variable that sets the amount of time to retry after sending a
  failed SATA ID command. This helps with some bad disks and large disks that
  require a lot of time to spin up. Part of this change was to add a callout to
  handle timeouts with the SATA ID command. The callout function is called
  mprsas_ata_id_timeout(). (Fixes PR 191348)

- Changed the way resets work by allowing I/O to continue to devices that are
  not currently under a reset condition. This uses devq's instead of simq's and
  makes use of the MPSSAS_TARGET_INRESET flag. This change also adds a function
  called mprsas_prepare_tm().

- Some changes were made to reduce code duplication when getting a SAS address
  for a SATA disk.

- Fixed some formatting and whitespace.

- Bump version of mpr driver to 9.255.01.00-fbsd

PR: 191348

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

8 years agoMFC: r283273
rmacklem [Thu, 4 Jun 2015 12:35:00 +0000 (12:35 +0000)]
MFC: r283273
The NFS client wasn't handling getdirentries(2) requests for sizes
that are not an exact multiple of DIRBLKSIZ correctly. Fortunately
readdir(3) always uses an exact multiple of DIRBLKSIZ, so few applications
were affected. This patch fixes this problem by reducing the size
of the directory read to an exact multiple of DIRBLKSIZ.

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

8 years agoMFC r283641:
pkelsey [Thu, 4 Jun 2015 04:54:54 +0000 (04:54 +0000)]
MFC r283641:

Add CAP_FCNTL to the lease file capsicum rights, and limit to
CAP_FCNTL_GETFL.  Without CAP_FCNTL_GETFL, the lease file truncation
in rewrite_client_leases() will fail to trim old data when rewriting
the file with a lesser amount of data.

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

8 years agoMFC r283652:
pkelsey [Thu, 4 Jun 2015 04:50:52 +0000 (04:50 +0000)]
MFC r283652:

Provide an unambiguous description of the potential hazard in calling
pthread_setspecific(3) from a key destructor.

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

8 years agoMFC r262955:
ian [Thu, 4 Jun 2015 01:52:17 +0000 (01:52 +0000)]
MFC r262955:

Add 3wire and std as terminal types/classes. These are similar to
the existing terminal types/classes that have the baudrate suffix,
but differ in that no baudrate is set/defined.

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

8 years agoMFC r268254 (jmg):
dteske [Wed, 3 Jun 2015 22:24:57 +0000 (22:24 +0000)]
MFC r268254 (jmg):
Add a hint that you can enable this by default if you want;
necessary if you want the keyboard break to work early in boot.

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

8 years agoMFC r259438 by pjd: Fix syscalls that can be loaded as kernel modules
emaste [Wed, 3 Jun 2015 18:33:47 +0000 (18:33 +0000)]
MFC r259438 by pjd: Fix syscalls that can be loaded as kernel modules

  They were not given the flag allowing to call them from capability
  mode sandbox.

And regenerate init_sysent.c

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r283784:
tuexen [Wed, 3 Jun 2015 17:45:45 +0000 (17:45 +0000)]
MFC r283784:
Remove trailing whitespaces.

MFC r283785:
Require the embedded packet to contain 8 bytes after the IP header instead
of only 4. This is guaranteed by RFC 792 and the verification of GRE, ICMP
and TCP packets use 8 bytes.

MFC r283786:
There is no payload anymore. So compute the minimum packet length
correctly and use 40 as the default (if the minumum allows it), as
specified in the man page.

MFC r283806:
When the packet verification fails in verbose mode, print the correct
number of words in host byte order. Also remove a stray 'x'.

MFC r283808:
Don't send malformed SCTP probe packets.

MFC r283813:
Use an empty string for field descriptions of unknown protocols.

MFC r283817:
Don't send illegal packets when using UDP-Lite.

MFC r283819:
A TCP checksum of 0 is completely valid. Mapping 0 to 0xffff only
applies to UDP and UDP-Lite.

MFC r283820:
The code starts with base + 1 as the first port. Fix to documentation
to match that.

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

8 years agoMFC r283103:
hselasky [Wed, 3 Jun 2015 15:41:03 +0000 (15:41 +0000)]
MFC r283103:
Fix for DWC OTG device side isochronous transfers. The even or odd
isochronous frame bit needs to be flipped.

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

8 years agoMFC r282650 and r282651:
hselasky [Wed, 3 Jun 2015 15:32:43 +0000 (15:32 +0000)]
MFC r282650 and r282651:
Extend the maximum number of allowed PCM channels in a PCM stream to
127 and decrease the maximum number of sub-channels to 1. These
definitions are only used inside the kernel and can be changed later
if more than one sub-channel is desired. This has been done to allow
so-called USB audio rack modules to work with FreeBSD.

Add support for more than 8 audio channels per PCM stream for USB
audio class compliant devices under FreeBSD. Tested using 16 recording
and 16 playback audio channels simultaneously.

Bump the FreeBSD version to force recompiling all external modules.

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

8 years agoMFC r261220 by csjp: Allow sigwait(2) in capabilities mode.
emaste [Wed, 3 Jun 2015 13:12:08 +0000 (13:12 +0000)]
MFC r261220 by csjp: Allow sigwait(2) in capabilities mode.

  It's common for multi-threaded processes to create a thread for
  the purpose of synchronously processing signals. Allow such processes to
  utilize a capabilities sandbox.

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

8 years agoMFC r259436,259437 by pjd: Allow for pselect(2) in capability mode.
emaste [Wed, 3 Jun 2015 13:10:25 +0000 (13:10 +0000)]
MFC r259436,259437 by pjd: Allow for pselect(2) in capability mode.

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

8 years agoRegen for r283940.
emaste [Wed, 3 Jun 2015 11:39:29 +0000 (11:39 +0000)]
Regen for r283940.

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

8 years agoMFC r257736 (by pjd):
emaste [Wed, 3 Jun 2015 11:36:47 +0000 (11:36 +0000)]
MFC r257736 (by pjd):

  - Remove mac_get_fd/mac_set_fd - those are not syscalls. The
    __mac_get_fd() and __mac_set_fd() syscalls are listed earlier.
  - Correct typo in syscall name. It should be sched_rr_get_interval,
    not sched_rr_getinterval.

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

8 years agoMFC r283146:
ae [Wed, 3 Jun 2015 02:50:58 +0000 (02:50 +0000)]
MFC r283146:
  In the reply to SADB_X_SPDGET message use the same sequence number that
  was in the request. Some IKE deamons expect it will the same. Linux and
  NetBSD also follow this behaviour.

  PR: 137309

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

8 years agoMFC:
imp [Tue, 2 Jun 2015 21:36:45 +0000 (21:36 +0000)]
MFC:

r283014: Disable unmapped I/O: it is broken for unaligned pages
r283126: Fix comments

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

8 years agoMFC:
imp [Tue, 2 Jun 2015 21:24:47 +0000 (21:24 +0000)]
MFC:

Merge r276846: Add infrastructure to build dtb files from dts files.

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

8 years agoMFC r265950 (by thomas):
pjd [Tue, 2 Jun 2015 20:29:58 +0000 (20:29 +0000)]
MFC r265950 (by thomas):

Add mention of metadata version 7 in FreeBSD 10.0.

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

8 years agoMFC 281887:
jhb [Tue, 2 Jun 2015 19:20:39 +0000 (19:20 +0000)]
MFC 281887:
Reassign copyright statements on several files from Advanced
Computing Technologies LLC to Hudson River Trading LLC.

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

8 years agoMFC 282417:
jhb [Tue, 2 Jun 2015 15:12:33 +0000 (15:12 +0000)]
MFC 282417:
Various updates to the ftruncate(2) documentation:
- Note that ftruncate(2) can operate on shared memory objects and cross
  reference shm_open(2).
- Note that ftruncate(2) does not change the file position pointer (aka
  seek pointer) of the file descriptor.
- ftruncate(2) will fail with EINVAL for all sorts of other fd types than
  just sockets, so instead note that it fails for all but regular files and
  shared memory objects.
- Note that ftruncate(2) also appeared in 4.2BSD along with truncate(2).
  (Or at least the manpage for both appeared in 4.2, I did not check the
  kernel code itself to see if either predated 4.2.)

PR: 199472

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

8 years agoMFC 282416:
jhb [Tue, 2 Jun 2015 15:09:33 +0000 (15:09 +0000)]
MFC 282416:
Partially revert r255486, the first argument to socketpair() is a socket
domain, not a file descriptor.  Use 'domain' instead of the original 'd'
for this argument to match socket(2).

PR: 199491

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

8 years agoMFC 282552:
jhb [Tue, 2 Jun 2015 15:07:06 +0000 (15:07 +0000)]
MFC 282552:
Remove the note about seekdir() removing telldir() cookies.  That was
removed back in r269204.

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

8 years agoMFC 281170:
jhb [Tue, 2 Jun 2015 15:02:28 +0000 (15:02 +0000)]
MFC 281170:
vfork() first appeared in 3BSD which pre-dates 2.9BSD.  Verified via the
copy of 3BSD on disc 1 of "The CSRG Archives".

PR: 198612

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

8 years agoMFC 281601:
jhb [Tue, 2 Jun 2015 14:55:55 +0000 (14:55 +0000)]
MFC 281601:
Remove THRMISC_VERSION.  The thrmisc structure doesn't include a version
number, so this wasn't used (and can't easily be added).  If at some point
we want to extend thrmisc, we will probably need to just add a new note
type and ensure that the new type includes a version number.

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

8 years agoMFC 281266:
jhb [Tue, 2 Jun 2015 14:54:53 +0000 (14:54 +0000)]
MFC 281266:
Move the 32-bit compatible procfs types from freebsd32.h to <sys/procfs.h>
and export them to userland.
- Define __HAVE_REG32 on platforms that define a reg32 structure and check
  for this in <sys/procfs.h> to control when to export prstatus32, etc.
- Add prstatus32_t and prpsinfo32_t typedefs for the 32-bit structures.
  libbfd looks for these types, and having them fixes 'gcore' in gdb of a
  32-bit process on a 64-bit platform.
- Use the structure definitions from <sys/procfs.h> in gcore's elf32 core
  dump code instead of duplicating the definitions.

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

8 years agoMFC 269128:
jhb [Tue, 2 Jun 2015 13:07:22 +0000 (13:07 +0000)]
MFC 269128:
Create 32-bit core files for 32-bit processes on 64-bit machines.
The 64-bit machine supported right now is amd64, but it's not too
hard to add powerpc64.

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

8 years agoMFC r283406,283418:
tijl [Tue, 2 Jun 2015 09:42:00 +0000 (09:42 +0000)]
MFC r283406,283418:

Fix decoding of UTF-7 when a base64 encoded chunk appears at the end of
the input buffer.

_citrus_UTF7_mbtoutf16 stored the decoder state at the beginning so it
could restore this state on an incomplete character such that the next
call would restart the decoding.  The problem was that "-" (end of base64
mode) at the end of a string was also treated as an incomplete character
but was also removed from the state buffer.  So the initial state would be
restored (with base64 mode) and the next call would no longer see the "-"
so it continued in base64 mode.

This state saving/restoring isn't needed here.  It's already handled
elsewhere (citrus_iconv_std.c:_citrus_iconv_std_iconv_convert) so just
remove it.

Also initialise *nresult.

When only 2 bytes can be read from a 4 byte UTF-16 character in a base64
encoded chunk of a UTF-7 string, treat that as an incomplete character and
return an error instead of a shift sequence and no error.

Also check that the low 2 bytes have a valid value.

PR: 200398

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

8 years agoMFC: r282866
hiren [Tue, 2 Jun 2015 08:03:28 +0000 (08:03 +0000)]
MFC: r282866

Fix pmcstat symbol resolution for userland processes.

When examining existing processes pmcstat fails to
correctly determine the locations of executable sections
of the process due to a miscalculated virtual load address.
This does not affect the newly launched processes as the
same value passed as a "start address" to the pmcstat_image_link()
thus nullifying the effect of it.  The issue manifests itself
in processes not being reported in the pmcstat(8) output and
"dubious frames" being reported.

Fix it for now by ignoring all the sections except the executable
one.  This won't fix the issue for objects with multiple
executable sections but helps in majority of real world usecases.
The real solution would be to modify the MAP-IN event to include
the appropriate load address so pmcstat(8) won't have to manually
parse object files to try to determine it.

PR: 198147, 198148
Submitted by: stas

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

8 years agoMFC r283101:
ae [Tue, 2 Jun 2015 03:51:33 +0000 (03:51 +0000)]
MFC r283101:
  Teach key_expire() send SADB_EXPIRE message with the SADB_EXT_LIFETIME_HARD
  extension header type. The key_flush_sad() now will send SADB_EXPIRE
  message when HARD lifetime expires. This is required by RFC 2367 and some
  keying daemons rely on these messages. HARD lifetime messages have
  precedence over SOFT lifetime messages, so now they will be checked first.
  Also now SADB_EXPIRE messages will be send even the SA has not been used,
  because keying daemons might want to rekey such SA.

  PR: 200282, 200283

MFC r283102:
  Change SA's state before sending SADB_EXPIRE message. This state will
  be reported to keying daemon.

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

8 years agoMFC r275390:
ae [Tue, 2 Jun 2015 03:43:36 +0000 (03:43 +0000)]
MFC r275390:
  Remove unused declartations.

MFC r275437:
  ANSIfy function declarations.

MFC r275438:
  Remove __P() macro.

Sponsored by: Yandex LLC

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

8 years agoMFC r275392:
ae [Tue, 2 Jun 2015 03:14:42 +0000 (03:14 +0000)]
MFC r275392:
  Remove route chaching support from ipsec code. It isn't used for some time.
  * remove sa_route_union declaration and route_cache member from struct secashead;
  * remove key_sa_routechange() call from ICMP and ICMPv6 code;
  * simplify ip_ipsec_mtu();
  * remove #include <net/route.h>;

Sponsored by: Yandex LLC

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

8 years agoMFC r283104:
ae [Tue, 2 Jun 2015 02:05:32 +0000 (02:05 +0000)]
MFC r283104:
  Read GEOM_UNCOMPRESS metadata using several requests that fit into
  MAXPHYS. For large compressed images the metadata size can be bigger
  than MAXPHYS and this triggers KASSERT in g_read_data().
  Also use g_free() to free memory allocated by g_read_data().

  PR: 199476

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

8 years agoMFC r283577:
ae [Tue, 2 Jun 2015 01:55:54 +0000 (01:55 +0000)]
MFC r283577:
  Print leading zeroes of UFS2 fs_id like we do for UFS1.

PR: 156908

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

8 years agoMFC: r283261
jkim [Mon, 1 Jun 2015 19:26:24 +0000 (19:26 +0000)]
MFC: r283261

Do not probe Intel PIIX4 south bridge quirks on amd64.

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

8 years agoMFC 283123:
jhb [Mon, 1 Jun 2015 18:08:56 +0000 (18:08 +0000)]
MFC 283123:
Fix two bugs that could result in PMC sampling effectively stopping.
In both cases, the the effect of the bug was that a very small positive
number was written to the counter. This means that a large number of
events needed to occur before the next sampling interrupt would trigger.
Even with very frequently occurring events like clock cycles wrapping all
the way around could take a long time. Both bugs occurred when updating
the saved reload count for an outgoing thread on a context switch.

First, the counter-independent code compares the current reload count
against the count set when the thread switched in and generates a delta
to apply to the saved count. If this delta causes the reload counter
to go negative, it would add a full reload interval to wrap it around to
a positive value. The fix is to add the full reload interval if the
resulting counter is zero.

Second, occasionally the raw counter value read during a context switch
has actually wrapped, but an interrupt has not yet triggered. In this
case the existing logic would return a very large reload count (e.g.
2^48 - 2 if the counter had overflowed by a count of 2). This was seen
both for fixed-function and programmable counters on an E5-2643.
Workaround this case by returning a reload count of zero.

PR: 198149
Sponsored by: Norse Corp, Inc.

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

8 years agoMFC 282643:
jhb [Mon, 1 Jun 2015 18:05:30 +0000 (18:05 +0000)]
MFC 282643:
Use the kern.bootfile sysctl to set the default kernel path rather than
hardcoding /boot/kernel. This allows pmcstat(8) to work without -k when
using nextboot -k or 'boot foo' at the loader to boot alternate kernels.

Sponsored by: Norse Corp, Inc.

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

8 years agoMFC 282641,282658:
jhb [Mon, 1 Jun 2015 17:57:05 +0000 (17:57 +0000)]
MFC 282641,282658:
- Move hwpmc(4) debugging code under a new HWPMC_DEBUG option instead of
  the broader DEBUG option.
- Convert hwpmc(4) debug printfs over to KTR.

Sponsored by: Norse Corp, Inc.

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

8 years agoMFC r283673, r283674:
gjb [Mon, 1 Jun 2015 16:46:51 +0000 (16:46 +0000)]
MFC r283673, r283674:

 r283673:
  Sort configuration options for consistency with other boards.

 r283674:
  Export 'BOARDNAME' when differs from the KERNCONF.

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r282208:
smh [Mon, 1 Jun 2015 09:04:57 +0000 (09:04 +0000)]
MFC r282208:
Standardise chmod, chflags, chown and chgrp recursive symlink processing

Relnotes: Yes
Sponsored by: Multiplay

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

8 years agoMFC r283515:
kib [Mon, 1 Jun 2015 06:56:49 +0000 (06:56 +0000)]
MFC r283515:
Remove excess Giant acquisition around the dounmount() call.

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

8 years agoMFC SVN mergeinfo for revisions 263638,263768 (reduce eligible merges):
dteske [Mon, 1 Jun 2015 01:54:21 +0000 (01:54 +0000)]
MFC SVN mergeinfo for revisions 263638,263768 (reduce eligible merges):
r263638: Create a root dataset (bdrewery)
r263768: Revert the above (bdrewery)

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

8 years agoMFC SVN revisions 280310-280311,281160,281167,282443,283023,283288:
dteske [Mon, 1 Jun 2015 01:50:09 +0000 (01:50 +0000)]
MFC SVN revisions 280310-280311,281160,281167,282443,283023,283288:
r280310: Whitespace cleanup(s)
r280311: Update copyright(s)
r281160: [mergeinfo only] Fix root encryption key permissions (see r281230)
r281167: [mergeinfo only] Unbreak ZFS+GELI install option (see r281230)
r282443: Add swap size sanity check (allanjude)
r283023: Skip adding swap to fstab(5) if unused (allanjude)
r283288: Fix a syntax error (allanjude)

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

8 years agoMFC SVN revisions 280234-280235:
dteske [Mon, 1 Jun 2015 01:31:50 +0000 (01:31 +0000)]
MFC SVN revisions 280234-280235:
r280234: Fix the handbook install option in bsdinstall (allanjude)
r280235: Fixup to previous (allanjude)

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