MFC r273186,r273873:

r273186:

  Don't define rules based on PROGS if PROGS is empty.

  Reviewed by:	sjg, ngie
  Sponsored by:	EMC / Isilon Storage Division

r273873:

  Use the right depend file for each program.

  bsd.progs.mk generates a separate depend file for every program being
  built, but then it does not properly tell each submake to use those
  individual files.  Properly propagate the depend file to use.

  Discovered while preparing the update of atf to 0.21 and noticing that
  the test programs were not being relinked to the new library.

  This change is "make tinderbox" clean.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@276048 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r273803,r273810:

r273803:

  Filter out TESTS_SUBDIRS already added to SUBDIR instead of blindly
  appending the TESTS_SUBDIRS variable to SUBDIR

  Duplicate directory entries can cause unexpected side effects, like
  installing the same files multiple times. This can be easily
  reproduced via the following testcase prior to this commit:

    SUBDIR= dir
    TESTS_SUBDIRS+= dir

    .include <bsd.test.mk>

  Sponsored by: EMC / Isilon Storage Division

r273810:

  Fix the logic inversion in the previous commit by ensuring that the matched
  expression (:M) is empty, not the not matched (:N) is empty. The former case
  means we have not found the TEST_SUBDIR value in SUBDIR

  Reported by: rodrigc
  Pointyhat to: me (did not use a clean install root)
  Sponsored by: EMC / Isilon Storage Division


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@276050 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r275622:

  Add makewhatis to ITOOLS if MK_MAN != no

  This will fix installation with differing host targets in installworld, so
  one can build i386/i386 on an amd64 host, then install to an i386/i386 target

  Reported by: alfred
  Phabric: D1280


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@276051 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r258167:
  ANSIfy function defintions.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@276067 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r271917 by hrs:
  Virtualize interface cloner for gif(4).  This fixes a panic when destroying
  a vnet jail which has a gif(4) interface.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@276068 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC 260557,271076,271077,271082,271083,271098:
- Remove spaces from boot messages when we print the CPU ID/Family/Stepping
- Move prototypes for various functions into out of C files and into
  <machine/md_var.h>.
- Reduce diffs between i386 and amd64 initcpu.c and identcpu.c files.
- Move blacklists of broken TSCs out of the printcpuinfo() function
  and into the TSC probe routine.
- Merge the amd64 and i386 identcpu.c into a single x86 implementation.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@276070 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r276071:

Fix multiple ntp vulnerabilities.

Reviewed by:	roberto (earlier revision), philip
Security:	CVE-2014-9293, CVE-2014-9294
Security:	CVE-2014-9295, CVE-2014-9296
Security:	FreeBSD-SA-14:31.ntp


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@276072 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC 271405,271408,271409,272658:
MFamd64: Use initializecpu() to set various model-specific registers on
AP startup and AP resume (it was already used for BSP startup and BSP
resume).


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@276076 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC 273991:
MFamd64: Move extern declaration of _ucodesel and _udatasel to
<machine/md_var.h>


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@276080 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r274337,r274673,274681,r275515:

ZFS large block support.  The default recordsize remains at 128KB.

A new tunable/sysctl variable, vfs.zfs.max_recordsize is added to
allow adjusting the permitted maximum record size, or
zfs_max_recordsize, with a default of 1MB.  ZFS will not allow
setting recordsize greater than zfs_max_recordsize as a safety
belt, because larger recordsize means greater read and write
latency and more memory usage.

Please note that booting from datasets that have recordsize greater
than 128KB is not supported (but it's Okay to enable the feature on
the pool).

Limited safety belt is provided for mounted root filesystem but use
caution when using a larger value.

Illumos issue:
    5027 zfs large block support


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@276081 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r275530:

Use %d instead of %u for error number.  This way we see ERESTART as -1
not 4294967295 when doing DTrace.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@276082 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC 273988,273989,273995,274057:
MFamd64: Add support for extended FPU states on i386.  This includes
support for AVX on i386.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@276084 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC 275035:
MFamd64: Check for invalid flags in the machine context in sigreturn()
and setcontext().


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@276085 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Strip trailing / characters from paths in "not present" index entries.

Errata:		FreeBSD-EN-14:13.freebsd-update
Approved by:	so@


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@276088 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC	r275838;
sed: Bounds check the file path used in the 'w' command.

Modified version of a diff from Sebastien Marie to prevent a crash found
with the afl fuzzer.

Obtained from:	OpenBSD (CVS Rev. 1.37)


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@276099 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC	r274437;

ifdef ext2_print_inode which is not really used.

ext2_print_inode was nice to have for initial development work but
is not really used anymore. #ifdef it under a new EXT2FS_DEBUG knob
so that we don't spend time compiling it.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@276102 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add if_inc_counter() and if_get_counter_default() functions that do
access to ifnet counters for code compatibility with FreeBSD 11.

This is direct commit to stable/10.

Discussed with:	glebius@, arch@


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@276124 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC: r272490 (partial)

  - MFi386: Add compile-with option for tau32-ddk.c.
  - Whitespace change.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@276125 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC: r272491

  Reduce diffs against i386.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@276129 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r271197:
Add more bits for the XSAVE features from CPUID 0xd, sub-function 1
%eax report.  Print the XSAVE features 0xd/1 in the boot banner.


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