]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
9 years agoMFC r275435: Add sleep(1) to /rescue.
delphij [Fri, 2 Jan 2015 18:57:26 +0000 (18:57 +0000)]
MFC r275435: Add sleep(1) to /rescue.

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

9 years agoMFC r270961
alc [Fri, 2 Jan 2015 18:50:18 +0000 (18:50 +0000)]
MFC r270961
  Update a comment to reflect the changes in r213408.

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

9 years agoMFC r275930:
delphij [Fri, 2 Jan 2015 18:31:12 +0000 (18:31 +0000)]
MFC r275930:

Plug a memory leak.

Obtained from: DragonFlyBSD (commit 5119ece)

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

9 years agoMFC: r276052,r276053
bapt [Fri, 2 Jan 2015 18:27:32 +0000 (18:27 +0000)]
MFC: r276052,r276053

Build selective portions of gnu/usr.bin/texinfo as part of build-tools to
ensure that building on a host without makeinfo (i.e. a host where
make delete-old -DWITHOUT_INFO was run), then building with MK_INFO == yes
doesn't manifest in build errors when building info pages

This manifested itself like the following when I was build testing an MFC
change on stable/10:

  makeinfo --no-split -I /usr/src/gnu/lib/libregex/doc -I /usr/src/gnu/lib/libregex/doc regex.texi  -o regex.info
  makeinfo: not found
  *** [regex.info] Error code 127

make[6]: stopped in /usr/src/gnu/lib/libregex/doc
1 error

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

9 years agoMFC r273701, r274556
alc [Fri, 2 Jan 2015 17:45:52 +0000 (17:45 +0000)]
MFC r273701, r274556
  By the time that pmap_init() runs, vm_phys_segs[] has been initialized.
  Obtaining the end of memory address from vm_phys_segs[] is a little
  easier than obtaining it from phys_avail[].

  Enable the use of VM_PHYSSEG_SPARSE on amd64 and i386, making it the
  default on i386 PAE.  (The use of VM_PHYSSEG_SPARSE on i386 PAE saves
  us some precious kernel virtual address space that would have been
  wasted on unused vm_page structures.)

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

9 years agoMFC r276238:
hselasky [Fri, 2 Jan 2015 08:32:45 +0000 (08:32 +0000)]
MFC r276238:
Add proper Makefiles to build some infiniband example utilities.

Sponsored by: Mellanox Technologies

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

9 years agoMFC r274965:
trasz [Thu, 1 Jan 2015 15:48:12 +0000 (15:48 +0000)]
MFC r274965:

Make it possible to specify flags for autofs daemons in rc.conf.

Sponsored by: The FreeBSD Foundation

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

9 years agoMFC r274954:
trasz [Thu, 1 Jan 2015 15:45:22 +0000 (15:45 +0000)]
MFC r274954:

Remove the pidfile clause from the ctl.conf example.  Why do everyone
just copy/paste this line into their configs, it's beyond me.

Sponsored by: The FreeBSD Foundation

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

9 years agoMFC r274858:
trasz [Thu, 1 Jan 2015 15:38:57 +0000 (15:38 +0000)]
MFC r274858:

Cross-reference autounmountd(8) from umount(8).

Sponsored by: The FreeBSD Foundation

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

9 years agoMFC r274857:
trasz [Thu, 1 Jan 2015 15:37:21 +0000 (15:37 +0000)]
MFC r274857:

Cross-reference automount(8) from mount(8).

Sponsored by: The FreeBSD Foundation

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

9 years agoMFC r275897:
kib [Thu, 1 Jan 2015 10:44:20 +0000 (10:44 +0000)]
MFC r275897:
Set NOCACHE flag for CREATE namei() calls, do not specially handle
MAKEENTRY in VOP_LOOKUP().

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

9 years agoMFC r274578,r274580:
ngie [Thu, 1 Jan 2015 02:12:43 +0000 (02:12 +0000)]
MFC r274578,r274580:

r274578:

  Add reachover Makefiles for contrib/netbsd-tests/lib/libpthread as
  lib/libthr/tests

  A variant of this code has been tested on amd64/i386 for some time by
  EMC/Isilon on 10-STABLE/11-CURRENT. It builds on other architectures, but the
  code will remain off until it's proven it works on virtual hardware or real
  hardware on other architectures

  Original work by: pho
  Sponsored by: EMC / Isilon Storage Division

r274580:

  Add reachover Makefiles for contrib/netbsd-tests/lib/librt

  A variant of this code has been tested on amd64/i386 for some time by
  EMC/Isilon on 10-STABLE/11-CURRENT. It builds on other architectures, but the
  code will remain off until it's proven it works on virtual hardware or real
  hardware on other architectures

  Sponsored by: EMC / Isilon Storage Division

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

9 years agoMFC r272777,r272779,r272780,r272781,r272782,r272783,r272784,r272787,r272788:
ngie [Thu, 1 Jan 2015 02:04:44 +0000 (02:04 +0000)]
MFC r272777,r272779,r272780,r272781,r272782,r272783,r272784,r272787,r272788:

r272777:

  Integrate usr.sbin/nmtree/tests from NetBSD into atf/kyua

  In collaboration with: pho
  Sponsored by: EMC / Isilon Storage Division

r272779:

  Integrate usr.sbin/basename/tests from NetBSD into atf/kyua

  In collaboration with: pho
  Sponsored by: EMC / Isilon Storage Division

r272780:

  Integrate usr.bin/cmp/tests from NetBSD into atf/kyua

  In collaboration with: sjg
  Sponsored by: EMC / Isilon Storage Division

r272781:

  Integrate usr.bin/dirname/tests from NetBSD into atf/kyua

  In collaboration with: pho, sjg
  Sponsored by: EMC / Isilon Storage Division

r272782:

  Integrate bin/sleep/tests from NetBSD into atf/kyua

  Sponsored by: EMC / Isilon Storage Division

r272783:

  Integrate usr.bin/cut/tests from NetBSD into atf/kyua

  Sponsored by: EMC / Isilon Storage Division

r272784:

  Integrate usr.bin/grep/tests from NetBSD into atf/kyua

  Sponsored by: EMC / Isilon Storage Division

r272787:

  Integrate usr.bin/diff/tests from NetBSD into atf/kyua at gnu/usr.bin/diff/tests

  Sponsored by: EMC / Isilon Storage Division

r272788:

  Integrate usr.bin/gzip/tests from NetBSD into atf/kyua

  Sponsored by: EMC / Isilon Storage Division

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

9 years agoMFC r275335:
bryanv [Thu, 1 Jan 2015 01:43:00 +0000 (01:43 +0000)]
MFC r275335:

  Cleanup and performance improvement of the virtio_blk driver

    - Add support for GEOM direct completion. Depending on the benchmark,
      this tends to give a ~30% improvement w.r.t IOPs and BW.
    - Remove an invariants check in the strategy routine. This assertion
      is caught later on by an existing panic.
    - Rename and resort various related functions to make more sense.

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

9 years agoMFC r264400,r265836:
ngie [Wed, 31 Dec 2014 23:25:37 +0000 (23:25 +0000)]
MFC r264400,r265836:

r264400:

  NO_MAN= has been deprecated in favor of MAN= for some time, go ahead
  and finish the job. ncurses is now the only Makefile in the tree that
  uses it since it wasn't a simple mechanical change, and will be
  addressed in a future commit.

r265836:

  Remove last two NO_MAN= in the tree. In both of these cases, MAN= is
  what is needed.

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

9 years agoMFC r273748
neel [Wed, 31 Dec 2014 22:15:28 +0000 (22:15 +0000)]
MFC r273748

Output a summary of optional SVM features in dmesg similar to CPU features.
If bootverbose is enabled, a detailed list is provided; otherwise, a
single-line summary is displayed.

Requested by: jhb

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

9 years agoMFC r272343,r272458,r272890,r272891,r272901,r272902,r272903,r272905,r272908,r272909...
ngie [Wed, 31 Dec 2014 20:13:31 +0000 (20:13 +0000)]
MFC r272343,r272458,r272890,r272891,r272901,r272902,r272903,r272905,r272908,r272909,r272910,r272914,r272915,r272979,r272980,r273010,r273011,r273012,r273015,r273017,r273019,r273020,r273021,r273022,r273023,r273024,r273025,r273389,r273390,r273391,r273393,r273395,r273396,r273397,r273410,r273516,r273517,r273520,r273521,r273522,r273523,r273524,r273525,r273526,r273527,r273528,r273529,r273530,r273533,r273534,r273535,r273536,r273537,r273538,r273539,r273540,r273572,r273574,r273578,r273579,r273591,r273592,r273928,r273933,r273935,r273936,r273937,r273938,r273942,r273943,r273945,r273946,r273947,r273948,r273949,r273950,r273951,r273952,r274061,r274062,r274066,r274067,r274072,r274074,r274079,r274090,r274142,r274143,r274571,r274572,r274573,r274574,r274575,r274576,r274577,r274579,r274597,r274598,r274599,r274600,r274601,r274626,r275033,r276046,r276430:

r272343:
r272458:

  Import the NetBSD test suite from ^/vendor/NetBSD/tests/09.30.2014_20.45 ,
  minus the vendor Makefiles

  Provide directions for how to bootstrap the vendor sources in
  FREEBSD-upgrade

  MFC after 2 weeks
  Discussed with: rpaulo
  Sponsored by: EMC / Isilon Storage Division

r272890:

  Only build/run hsearch_basic and hsearch_r_basic on NetBSD

  hdestroy1 is not present on FreeBSD

  Sponsored by: EMC / Isilon Storage Division

r272891:

  Expect SIGSEGV in lib/libc/stdlib/t_getenv:setenv_basic

  See bin/189805 for more details

  In collaboration with: pho
  Sponsored by: EMC / Isilon Storage Division

r272901:

  Disable tests that don't pass on FreeBSD due to missing support in
  humanize_number(3). Bringing in additional revisions from NetBSD's
  humanize_number(3) will fix the tests

  Account for the fact that util.h on NetBSD is libutil.h on FreeBSD

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

r272902:

  Add missing #include <sys/time.h> for gettimeofday

  Sponsored by: EMC / Isilon Storage Division

r272903:

  FreeBSD returns ENOTTY instead of EBADF in ttyname_r; mark it as an expected
  failure

  PR: 191936

  In collaboration with: pho
  Sponsored by: EMC / Isilon Storage Division

r272905:

  FreeBSD doesn't support strings greater than MAXHOSTNAMELEN-1 in
  {get,set}{domain,host}name. Adjust the tests to not exceed that
  value when testing out the code

  Add a positive and negative test for MAXHOSTNAMELEN-1 and
  MAXHOSTNAMELEN, respectively

  PR: 181127
  In collaboration with: pho
  Sponsored by: EMC / Isilon Storage Division

r272908:

  Disable the invalid pointer test on FreeBSD

  FreeBSD segfaults on invalid pointers passed to getcwd because it throbs the
  address passed in in libc, whereas NetBSD just passes the information off to
  the syscall, which allows the kernel to return EFAULT on bad pointers.

  In collaboration with: pho
  Sponsored by: EMC / Isilon Storage Division

r272909:

  Handle getting/setting niceness/priority correctly on FreeBSD vs NetBSD

  This might be fallout from PR: 189821

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

r272910:

  SIGPWR does not exist on FreeBSD

  Sponsored by: EMC / Isilon Storage Division

r272914:

  Skip over t_spawn_open_nonexistent_diag because it requires NetBSD specific
  additions to posix_spawn

  Sponsored by: EMC / Isilon Storage Division

r272915:

  Port the testcase to FreeBSD

  - Make #include path to h_macros.h a non-relative path
  - __gl_stat_t is synonymous with struct stat on FreeBSD
  - FreeBSD doesn't have _DIRENT_RECLEN
  - Skip over glob_star on FreeBSD (testcase doesn't pass)

  In collaboration with: pho
  Sponsored by: EMC / Isilon Storage Division

r272979:

  Only #include <sys/tls.h> on NetBSD

  Sponsored by: EMC / Isilon Storage Division

r272980:

  #include libutil.h for fparseln on FreeBSD

  Sponsored by: EMC / Isilon Storage Division

r273010:

  Implement 64MB memory limit for test to ensure that it fails reliably in
  600 seconds; it would previously fail inconsistently when run in some virtual
  machine configurations

  This patch might need to be reverted or revisited later (see the attached PR
  for more details)

  PR: 169302

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

r273011:

  Fix compilation errors with missing wide-type headers and fix compilation
  warnings with -Wformat

  In collaboration with: pho
  Sponsored by: EMC / Isilon Storage Division

r273012:

  - Add libutil #include for fparseln
  - Change ATF_REQUIRE_EQ_MSG to ATF_CHECK_EQ_MSG to gather all failing results
    possible (currently 12 with leftassoc)
  - Mark leftassoc "atf_tc_expect_fail" on FreeBSD (PR coming soon after further
    analysis is done on the code)

  In collaboration with: pho
  Sponsored by: EMC / Isilon Storage Division

r273015:

  Expect nice_err to fail on FreeBSD with unprivileged users

  PR: 189821
  Sponsored by: EMC / Isilon Storage Division

r273017:

  Add #include <stdio.h> for printf

  Sponsored by: EMC / Isilon Storage Division

r273019:

  Do initial port of contrib/netbsd-tests/lib/libc/locale

  t_io:
  - Expect failures potentially related to implementation-specific knowledge of
  the zh_TW.Big5 locale [*]

  t_mbrtowc:
  - Handle unknown locales more gracefully (do not test if the locale doesn't
  exist)
  - Expect failure with mbrtowc_internal dealing with Japanese locales
  (potentially related to implementation detail knowledge of the ja_* locales) [*].

  t_mbstowcs, t_mbtowc, t_wctomb:
  - Handle unknown locales more gracefully (do not test if the locale doesn't
  exist)

  t_wcstod:
  - Treat FreeBSD like NetBSD and Linux in the XXX: FIXME section

  [*] More investigation is required to determine the root cause of the failures

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

r273020:

  memmem with NUL length "needle" (aka small) strings on FreeBSD/OSX returns
  NULL instead of the "haystack" value (aka big)

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

r273021:

  Use 1 as a random seed, as recommended in srandom(3). Adjust the random values
  accordingly

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

r273022:

  Add #include <stdio.h> to get sys_nerr definition

  Sponsored by: EMC / Isilon Storage Division

r273023:

  __isnanl is automatically picked according to data type in <math.h>. There
  isn't a need for the explicit __isnanl test

  Sponsored by: EMC / Isilon Storage Division

r273024:

  Only test the return value in mktime_negyear

  Testing for the errno is an optional requirement according to POSIX, and
  FreeBSD doesn't document that errno would be set on failure with mktime

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

r273025:

  Change ATF_REQUIRE_MSG calls to ATF_CHECK_MSG to get as many errors as possible

  t_strptime:common..
  - Expect the testcase body as a whole to fail. Multiple PRs will be filed to
  track the issues (there are 18 check failures)

  t_strptime:day..
  - %EA and %OA seem to be case insensitive on FreeBSD

r273389:

  Port lib/libc/gen/t_siginfo to FreeBSD

  - mcontext_t on FreeBSD doesn't have a __gregs field (it's split out on FreeBSD
  into separate fields). In order to avoid muddying the test code with MD code,
  the debugging trace info has not been implemented
  - FreeBSD does not implement the si_stime and si_utime fields in siginfo_t, so
  omit the debugging code that dumps the values
  - sys/inttypes.h doesn't exist on FreeBSD

  Sponsored by: EMC / Isilon Storage Division

r273390:

  libutil.h is required for fparseln on FreeBSD

  Sponsored by: EMC / Isilon Storage Division

r273391:

  Add missing #include for sys/stat.h for fchmod

  Sponsored by: EMC / Isilon Storage Division

r273393:

  Port t_write to FreeBSD

  - Mark the signo variable for the signal handle __unused
  - Use limits.h instead of sys/syslimits.h (the latter does not
  exist on FreeBSD)

  Sponsored by: EMC / Isilon Storage Division

r273395:

  Mark osi __unused so this compiles cleanly on FreeBSD

  Sponsored by: EMC / Isilon Storage Division

r273396:

  unlink("/") fails with EISDIR instead of EBUSY on FreeBSD; test for that
  instead

  Sponsored by: EMC / Isilon Storage Division

r273397:

  Port t_chroot to FreeBSD

  - Add missing #include sys/stat.h for mkdir(2)
  - Omit the fchroot(2) tests because the support is not present on FreeBSD

  Sponsored by: EMC / Isilon Storage Division

r273410:

  Add sys/socket.h #include for bind(2), et al

  Sponsored by: EMC / Isilon Storage Division

r273516:

  Add netinet/in.h for struct sockaddr_in

  Sponsored by: EMC / Isilon Storage Division

r273517:

  Expect getgroups_err to fail on FreeBSD

  PR: 189941
  Submitted by: pho
  Sponsored by: EMC / Isilon Storage Division

r273520:

  Port t_pipe2.c to FreeBSD

  - Omit the pipe2_nosigpipe testcase on FreeBSD (FreeBSD doesn't have
    O_NOSIGPIPE).
  - Convert "fcntl(n, F_CLOSEM)" to "closefrom(n)".
  - Save and restore the resource limit on the number of files (RLIMIT_NOFILE).

  In collaboration with: pho
  Sponsored by: EMC / Isilon Storage Division

r273521:

  Convert "fcntl(n, F_CLOSEM)" to "closefrom(n)"

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

r273522:

  - Mark unused parameters __unused in handler
  - Call sigqueue with getpid() instead of 0 -- the latter idiom appears to only
  be valid on NetBSD

  In collaboration with: pho
  Sponsored by: EMC / Isilon Storage Division

r273523:

  Add limits.h #include for LINE_MAX

  Sponsored by: EMC / Isilon Storage Division

r273524:

  Add sys/socket.h #include for struct sockaddr_in

  Sponsored by: EMC / Isilon Storage Division

r273525:

  Port t_mmap.c to FreeBSD

  - Add needed headers for the testcases
  - Omit mmap_block on non-NetBSD OSes
  - Use "security.bsd.map_at_zero" instead of "vm.user_va0_disable"

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

r273526:

  Omit the pollts testcases on FreeBSD

  Sponsored by: EMC / Isilon Storage Division

r273527:

  Omit all of the testcases as revoke(2) is only implemented on devfs(5)

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

r273528:

  Mark signo __unused in handler(..)

  Sponsored by: EMC / Isilon Storage Division

r273529:

  - Omit the poll testcases on FreeBSD (they require pollts)
  - Add necessary headers for the testcases

  Sponsored by: EMC / Isilon Storage Division

r273530:

  Add limits.h #include for INT_MAX

  Sponsored by: EMC / Isilon Storage Division

r273533:

  Use <atf_srcdir>/truncate_test.root_owned instead of /usr/bin/fpr as fpr does
  not exist on FreeBSD

  truncate_test.root_owned will be generated at build time and owned by root

  In collaboration with: pho
  Sponsored by: EMC / Isilon Storage Division

r273534:

  - Mark sig/signo __unused
  - Do not provide a relative path via #include "h_macros.h"

  Sponsored by: EMC / Isilon Storage Division

r273535:

  - Omit setrlimit_nthr testcase on FreeBSD (requires lwp.h, et al)
  - Expect overflow with rlim_max at INT64_MAX, not UINT64_MAX (rlim_t is int64_t
  on FreeBSD)

  In collaboration with: pho
  Sponsored by: EMC / Isilon Storage Division

r273536:

  Add limits.h #include for SSIZE_MAX

  Sponsored by: EMC / Isilon Storage Division

r273537:

  Add limits.h #include for SSIZE_MAX

  Sponsored by: EMC / Isilon Storage Division

r273538:

  Fix a typo (__FreeBSD__ -> __NetBSD__ when omitting setrlimit_nthr)

r273539:

  Mark signum __unused

  Sponsored by: EMC / Isilon Storage Division

r273540:

  Omit the mprotect_exec testcase on FreeBSD

  Sponsored by: EMC / Isilon Storage Division

r273572:

  - Ignore EINVAL check with mknod(path, S_IFCHR, -1) as the testcase is always
    executed on a non-devfs filesystem
  - Expect mknod(path, S_IFREG, 0) to fail on FreeBSD

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

r273574:

  - Test for EINVAL requirement when passing an invalid flag in to msync(2)
  - Expect ENOMEM instead of EFAULT when msync'ing a previously munmap'ed region
    on FreeBSD

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

r273578:

  - Add inttypes.h and stdint.h in lieu of int_limits.h from NetBSD
  - Use #include "h_macros.h" instead of relative path analog

  Sponsored by: EMC / Isilon Storage Division

r273579:

  - Mark signo __unused in the signal handler function
  - Effectively #if 0 out some code that does not fail on FreeBSD

  In collaboration with: pho
  Sponsored by: EMC / Isilon Storage Division

r273591:

  Correct my previous commit:

  - getrusage_utime_back succeeds reliably on FreeBSD
  - getrusage_utime_zero passes/fails in a seemingly non-deterministic manner.
    Skip it for now (and fix it later)

  In the initial port of this testcase to FreeBSD, the results failed reliably
  in the same manner as it does on NetBSD

  Sponsored by: EMC / Isilon Storage Division

r273592:

  - Add sys/types.h for the APIs in sys/sysctl.h
  - Poke at VM_MIN_ADDRESS in machine/vmparam.h because FreeBSD doesn't have a
    vm.minaddress sysctl analog
  - Expect ENOMEM instead of EAGAIN in mlock_limits
  - Provide mlock an mmap'ed page twice to simulate MAP_WIRED on NetBSD

  In collaboration with: pho
  Sponsored by: EMC / Isilon Storage Division

r273928:

  Put mtree test files into a subdirectory.

  Kyua 0.11 points TMPDIR to the test's work directory, and atf_check creates
  auxiliary files in TMPDIR.  This confuses a couple of mtree tests that were
  using the work directory's root to validate the contents of the directory.

  Fix the two affected tests by creating an auxiliary directory to use for
  the mtree tests.  (Kyua should probably do this on its own; filed bug #133
  upstream to take a look at this.)

r273933:

  Don't prune duplicate services in the expected output from /etc/services on
  FreeBSD

  Submitted by: pho

r273935:

  Port tests to FreeBSD/Linux

  Some of the testcases don't work outside of NetBSD, and the behavior of
  ether_aton_r differs between FreeBSD, Linux, and NetBSD, and the calls to the
  API need to be massaged for FreeBSD and Linux.

  Submitted by: pho

r273936:

  Port lib/libc/net/h_dns_server to FreeBSD

  Submitted by: pho

r273937:

  Port lib/libc/sys/t_dup to FreeBSD/Linux

  - The requirements differ between FreeBSD/Linux when dealing with oldd/newd
    being equal (both fail with EINVAL, not EBADF)
  - Add an EBADF testcase
  - Fix compilation issues on clang

  In collaboration with: pho

r273938:

  getitimer on FreeBSD returns the last set time instead of the remaining time;
  test for that instead

  Submitted by: pho

r273942:

  Skip :sethostname_basic because it messes up the test host's hostname

  Convert code from #if defined(__FreeBSD__) to #ifdef __FreeBSD__

r273943:

  Port t_kevent to FreeBSD

  Submitted by: pho

r273945:

  Port t_mincore to FreeBSD

  Mark :mincore_resid as atf_tc_expect_fail on FreeBSD because of new bug
  discovered in running the tests (it succeeded from earlier on in the year to
  September/October on FreeBSD, at least)

  Submitted by: pho

r273946:

  Port h_atexit to FreeBSD

  __cxa_atexit varies between FreeBSD and NetBSD, and thus we must use pointers
  instead of static fields in the BSS. More extensive discussion is included in
  the source code

  In collaboration with: kib
  Submitted by: pho

r273947:

  Expect :snprintf_posarg_error to blow up with a SIGSEGV on !NetBSD OSes

r273948:

  Disable testcases 12 and 15-22 on FreeBSD

  Submitted by: pho

r273949:

  Add new atf_tc_expect_fail to fflush_err; this is a new (within the past couple months) bug

r273950:

  Skip :fopen_regular on !NetBSD because it's a NetBSD specific test

  Submitted by: pho

r273951:

  Expect :sscanf_whitespace to fail on !NetBSD OSes

  Submitted by: pho

r273952:

  Port h_hash and t_sha2 to FreeBSD

  t_sha2 contains dirty copy-paste hacks that need to be fixed with the openssh
  OpenBSD compat layer

  Submitted by: pho

r274061:

  Port t_db.sh to FreeBSD

  - The blocksize on FreeBSD is 32kB, not 64kB
  - Add some detection for MK_DICT == no; /nonexistent is echoed along with
    atf_skip to ensure that the test will fail if dict(..) is called in the
    non-final stage of the pipeline

  Submitted by: pho

r274062:

  inet_network on FreeBSD returns NULL when provided "0x" to inet_network

  Submitted by: pho

r274066:

  Port lib/libc/ssp to FreeBSD

  In most cases, the buffers and data were resized, but when dealing with the
  helpers, some of the code was adjusted to fail more reliably

  Submitted by: pho

r274067:

  rpc_control on FreeBSD is a public-ish API (not prefixed with __), not private
  like NetBSD

  Submitted by: pho

r274072:

  Finish off lib/libc/stdlib/t_strtod.c port by checking for "y" twice on
  FreeBSD, and always assume long long double exists on FreeBSD

  Submitted by: pho

r274074:

  Add Makefile snippet to ease porting NetBSD testcases to FreeBSD from
  contrib/netbsd-tests

  This Makefile snippet handles polluting testcases with -lnetbsd, specific
  headers for ATF version differences, and does necessary rewriting for the
  testcases to match the format discussed on the TestSuite wiki page
  (t_<foo> -> <foo>_test)

  One must define SRCTOP (inspired by projects/bmake), OBJTOP, and TESTSRC
  (e.g. contrib/netbsd-tests/lib/libc/gen) to use the Makefile snippet

  Test programs are specific either via NETBSD_ATF_TESTS_C or NETBSD_ATF_TESTS_SH

  C++ analogs aren't currently implemented.

  The imported testcases will be cleaned up to use this Makefile snippet pseudo
  "API".

r274079:

  Import proper fix for misc/49356 (/usr/include/atf-c/config.h) after atf-c/config.h
  was removed from the build

  Pointyhat to: me (again, for not running make delete-old after running test builds)

r274090:

  Fix the Jenkins test run by skipping the negative testcases earlier

  The problem is that lib.libc.locale.t_io:bad_big5_wprintf was printing out
  illegal Unicode characters, which causes XML parsers to bail immediately, e.g.

  % kyua report-junit > ~/report.junit
  % python2 -c 'import xml.dom.minidom as md; md.parse("/home/ngie/report.junit")'
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/usr/local/lib/python2.7/xml/dom/minidom.py", line 1918, in parse
      return expatbuilder.parse(file)
    File "/usr/local/lib/python2.7/xml/dom/expatbuilder.py", line 924, in parse
      result = builder.parseFile(fp)
    File "/usr/local/lib/python2.7/xml/dom/expatbuilder.py", line 207, in parseFile
      parser.Parse(buffer, 0)
  xml.parsers.expat.ExpatError: not well-formed (invalid token): line 27137, column 13

r274142:

  Remove expected failure from lib.libc.sys.t_mincore:mincore_resid

  The failure was added based on observation seen on 11.0-CURRENT @ r273153, not
  based on internal testing at EMC/Isilon

  PR: 194829
  Tested with the following configuration:
  - amd64/i386
  - 11.0-CURRENT @ r273153
  - 100 times in a tight loop as root with the following commands...
  -- kyua test lib/libc
  -- kyua test lib/libc/sys
  -- kyua test lib/libc/sys/mincore_test

r274143:

  Expect lib.libc.sys.getcontext_test.setcontext_link to fail on amd64; add
  additional debugging to make the underlying problem more visible

  Calling setcontext(2) on amd64 as shown in the test program is failing on
  amd64, not i386, with a return code of -1 and an errno of EINVAL

  Further investigation is being done in the PR to determine the root cause for
  the failure

  PR: 194828
  Tested with the following configuration:
  - amd64/i386
  - 11.0-CURRENT @ r273153
  - 100 times in a tight loop as root with the following commands...
  -- kyua test lib/libc
  -- kyua test lib/libc/sys
  -- kyua test lib/libc/sys/getcontext_test

r274571:

  Use _exit instead of exit so the file descriptors aren't flushed twice in the
  child processes

  Submitted by: pho

r274572:

  Only expect timeouts on powerpc with NetBSD

  Submitted by: pho

r274573:

  Expect :pthread_detach to fail with EINVAL instead of ESRCH on FreeBSD

  PR: 191906
  In collaboration with: pho

r274574:

  Add pthread_np.h #include and initialize the pthread attribute on FreeBSD

  Submitted by: pho

r274575:

  #ifdef out a printf on !NetBSD that causes the testcase to fail when comparing
  the output from the helper program

  Submitted by: pho

r274576:

  Port helper program to FreeBSD, similar to ../../lib/libc/stdlib/h_atexit.c

  Submitted by: pho
  In collaboration with: kib

r274577:

  Add missing sys/time.h #include for timespecsub macro in lib/libnetbsd/sys/time.h

r274579:

  Call sem_unlink on semaphores before attempting to create them

  Due to the lack of uniqueness in the semaphore name, and the fact that the
  tests don't have cleanup routines, an interrupted test can leave a semaphore
  "laying around", causing all subsequent attempts to run the test to fail

  I will file a NetBSD PR for this issue soon

r274597:

  Skip the long-double epsilon checks on FreeBSD/i386

  Sponsored by: EMC / Isilon Storage Division

r274598:

  Reset errno to 0 before running scalbn to be sure that the tested errno is
  valid

  Sponsored by: EMC / Isilon Storage Division

r274599:

  Alias isinff to isinf on FreeBSD

  isinf on FreeBSD automatically picks the appropriate type per math.h

  Sponsored by: EMC / Isilon Storage Division

r274600:

  - Expect exp2_powers to fail on FreeBSD/i386
  - Expect exp2_values to fail on FreeBSD due to the small epsilon

  Sponsored by: EMC / Isilon Storage Division

r274601:

  - Skip over the testcases that call cbrtl on platforms where LDBL_PREC == 53
  (arm, mips, powerpc). This fixes the build on these platforms, based on some
  ad hoc tinderbox runs I did a while ago
  - Skip cast the arguments to powl as long double so powl properly interprets
  those arugments at compile-time when picking the type

  Sponsored by: EMC / Isilon Storage Division

r274626:

  Mechanically replace #if defined(__FreeBSD__) and #if defined(__NetBSD__) with
  their #ifdef equivalents for everything changed in contrib/netbsd-tests. There
  are some items from the vendor tree that use #if defined(__FreeBSD__) or
  #if defined(__NetBSD__) which are being left alone

  Requested by: bde, rpaulo
  Sponsored by: EMC / Isilon Storage Division

r275033:

  Only pass 6 arguments to the 'run' function on amd64.  amd64's
  makecontext on FreeBSD only supports a maximum of 6 arguments.  This
  fixes the setcontext_link test on amd64.

  PR: 194828

r276046:

  Add __FreeBSD_version guards around hsearch_r to ease MFCing the code to
  stable/10

  It was added when __FreeBSD_version was ~1100027

r276430:

  Expect access_test:access_inval to fail before __FreeBSD_version == 1100033

  This will allow me to MFC the test, as jilles@ requested that I don't MFC the
  access(2) KBI change to 10-STABLE in r271655

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

9 years agoMFC r276346:
dim [Wed, 31 Dec 2014 16:28:16 +0000 (16:28 +0000)]
MFC r276346:

In contrib/binutils/gas/config/tc-ppc.c, fix a few -Wformat-security
warnings.

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

9 years agoMFC r276462:
bz [Wed, 31 Dec 2014 10:03:19 +0000 (10:03 +0000)]
MFC r276462:

  Bump copyright year.

  Happy New Year 2015!

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

9 years agoMFC r276229:
pfg [Wed, 31 Dec 2014 04:51:09 +0000 (04:51 +0000)]
MFC r276229:
Backport fix for binutils 11867: .quad directive not assembled correctly

Alan Modra (and Alan's employer) graciously permitted use of his patch
under GPLv2.

Obtained from: OpenBSD

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

9 years agoMFC r276323
neel [Wed, 31 Dec 2014 04:12:38 +0000 (04:12 +0000)]
MFC r276323
Implement "special mask mode" in vatpic.

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

9 years agoMFC: r276221
rmacklem [Wed, 31 Dec 2014 00:44:11 +0000 (00:44 +0000)]
MFC: r276221
Delete some duplicate code that was harmless because
exactly the same code is at the end of the nfscl_checksattr()
function that is called just before it. As such, this code
had already been executed and didn't do anything.

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

9 years agoMFC: r276193
rmacklem [Wed, 31 Dec 2014 00:40:10 +0000 (00:40 +0000)]
MFC: r276193
A deadlock in the NFSv4 server with vfs.nfsd.enable_locallocks=1
was reported via email. This was caused by a LOR between the
sleep lock used to serialize the local locking (nfsrv_locklf())
and locking the vnode. I believe this patch fixes the problem
by delaying relocking of the vnode until the sleep lock is
unlocked (nfsrv_unlocklf()). To avoid nfsvno_advlock() having the side
effect of unlocking the vnode, unlocking the vnode was moved to before
the functions that call nfsvno_advlock().
It shouldn't affect the execution of the default case where
vfs.nfsd.enable_locallocks=0.

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

9 years agoMFC: r276192, r276200
rmacklem [Wed, 31 Dec 2014 00:34:37 +0000 (00:34 +0000)]
MFC: r276192, r276200
Modify vop_stdadvlock{async}() so that it only
locks/unlocks the vnode and does a VOP_GETATTR()
for the SEEK_END case. This is safe to do, since
lf_advlock{async}() only uses the size argument
for the SEEK_END case.
The NFSv4 server needs this when
vfs.nfsd.enable_locallocks!=0 since locking the
vnode results in a LOR that can cause a deadlock
for the nfsd threads.

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

9 years agoMFH r274083:
peterj [Tue, 30 Dec 2014 23:52:48 +0000 (23:52 +0000)]
MFH r274083:
convert .Nm to proper .Xr's...

MFH r275298:
Cross reference tap(4) and tun(4) and include a short explanation as
to how they differ.  This will assist users in selecting which interface
is more appropriate for their purposes.

No objection: jmg (r274083)
Approved by: grog (co-mentor)

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

9 years agoMFC r273683
neel [Tue, 30 Dec 2014 22:22:46 +0000 (22:22 +0000)]
MFC r273683
Move the ACPI PM timer emulation into vmm.ko.

MFC r273706
Change the type of the first argument to the I/O emulation handlers to
'struct vm *'.

MFC r273710
Add a comment explaining the intent behind the I/O reservation [0x72-0x77].

MFC r273744
Add foo_genassym.c files to DPSRCS so dependencies for them are generated.
This ensures these objects are rebuilt to generate an updated header of
assembly constants if needed.

MFC r274045
If the start bit, PxCMD.ST, is cleared and nothing is in-flight then
PxCI, PxSACT, PxCMD.CCS and PxCMD.CR should be 0.

MFC r274076
Improve the ability to cancel an in-flight request by using an interrupt,
via SIGCONT, to force the read or write system call to return prematurely.

MFC r274330
To allow a request to be submitted from within the callback routine of
a completing one increase the total by 1 but don't advertise it.

MFC r274931
Change the lower bound for guest vmspace allocation to 0 instead of using
the VM_MIN_ADDRESS constant.

MFC r275817
For level triggered interrupts clear the PIC IRR bit when the interrupt pin
is deasserted.

MFC r275850
Fix 8259 IRQ priority resolver.

MFC r275952
Various 8259 device model improvements.

MFC r275965
Emulate writes to the IA32_MISC_ENABLE MSR.

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

9 years agoMFC r274077:
ngie [Tue, 30 Dec 2014 20:46:01 +0000 (20:46 +0000)]
MFC r274077:

  As an optimization (in simple, well used cases) only call cat ${.ALLSRC} when
  generating files from various sources instead of calling cat ${.ALLSRC} | sed

  The perl case was skipped because it's not being used in the tree at this time

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

9 years agoMFC r267276:
ngie [Tue, 30 Dec 2014 20:44:05 +0000 (20:44 +0000)]
MFC r267276:

  Ensure files are created during the build when using bsd.subdir.mk.

  When FILES is defined in a Makefile that _also_ includes bsd.subdir.mk, the
  build of the files (if any) was not properly triggered during the build
  stage.  This was because bsd.files.mk did not define the buildfiles target
  if it was already defined... and bsd.subdir.mk defined this target on its
  own, thus causing a conflict.

  Fix this by unconditionally defining buildfiles from bsd.files.mk; this is
  safe because nothing else in the tree needs to redefine this and because the
  target itself contains no commands: all it does is define dependencies.
  Also ensure that bsd.files.mk is always pulled in by bsd.test.mk regardless
  of what bsd.prog.mk does.

  These fixes allow "make installworld" to run cleanly on a system with
  read-only src and obj trees.

  This is "make tinderbox" clean.

  Reviewed by: imp
  Obtained from: jilles

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

9 years agoMFC r275698: MFV r275696: file 5.21.
delphij [Tue, 30 Dec 2014 19:39:31 +0000 (19:39 +0000)]
MFC r275698: MFV r275696: file 5.21.

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

9 years agoMFC r275638:
kib [Tue, 30 Dec 2014 10:30:12 +0000 (10:30 +0000)]
MFC r275638:
Do not call VFS_SYNC() before VFS_UNMOUNT() for forced unmount.

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

9 years agoMFC r273375
neel [Tue, 30 Dec 2014 08:24:14 +0000 (08:24 +0000)]
MFC r273375
Add support AMD processors with the SVM/AMD-V hardware extensions.

MFC r273749
Remove bhyve SVM feature printf's now that they are available in the general
CPU feature detection code.

MFC r273766
Add missing 'break' pointed out by Coverity CID 1249760.

MFC r276098
Allow ktr(4) tracing of all guest exceptions via the tunable "hw.vmm.trace_guest_exceptions"

MFC r276392
Inject #UD into the guest when it executes either 'MONITOR' or 'MWAIT' on an
AMD/SVM host.

MFC r276402
Remove "svn:mergeinfo" property that was dragged along when these files were
svn copied in r273375.

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

9 years agoMFC r266074,r266104,r266147:
ngie [Tue, 30 Dec 2014 02:32:48 +0000 (02:32 +0000)]
MFC r266074,r266104,r266147:

r266074:

  Move old fmake tests into bmake and hook them to the build.

  This first step is mostly to prevent the code from rotting even further
  and to ensure these do not get wiped when fmake's code is removed from
  the tree.

  These tests are currently being skipped because they detect the underlying
  make is not fmake and thus disable themselves -- and the reason is that
  some of the tests fail, possibly due to legitimate bugs.  Enabling them to
  run against bmake will come separately.

  Lastly, it would be ideal if these tests were fed upstream but they are
  not ready for that yet.  In the interim, just put them under usr.bin/bmake/
  while we sort things out.  The existence of a different unit-tests directory
  within here makes me feel less guilty about this.

  Change confirmed working with a clean amd64 build.

r266104:

  Undo changes to the generated Makefile. Move tests directory to proper
  location, including updating the test to work in the more-fragile
  fmake -> bmake bootstrap environment.

r266147:

  Makefile.inc is also included by the tests subdirectory, which results
  in SUBDIRS having tests added to it, which fails. Work around this by
  checking to make sure tests exists before adding it to subdirs and
  work to get the generated file fixed so we can rename Makefile.inc to
  something else so it isn't automatically included by subdirs...

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

9 years agoMFC 261321
neel [Tue, 30 Dec 2014 00:00:42 +0000 (00:00 +0000)]
MFC 261321
Rename the AMD MSR_PERFCTR[0-3] so the Pentium Pro MSR_PERFCTR[0-1] aren't
redefined.

MFC r273214
Fix build to not bogusly always rebuild vmm.ko.

MFC r273338
Add support for AMD's nested page tables in pmap.c:
- Provide the correct bit mask for various bit fields in a PTE (e.g. valid bit)
  for a pmap of type PT_RVI.
- Add a function 'pmap_type_guest(pmap)' that returns TRUE if the pmap is of
  type PT_EPT or PT_RVI.

Add CPU_SET_ATOMIC_ACQ(num, cpuset):
This is used when activating a vcpu in the nested pmap. Using the 'acquire'
variant guarantees that the load of the 'pm_eptgen' will happen only after
the vcpu is activated in 'pm_active'.

Add defines for various AMD-specific MSRs.

Discussed with: kib (r261321)

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

9 years agoMFC r276228:
pfg [Mon, 29 Dec 2014 22:54:28 +0000 (22:54 +0000)]
MFC r276228:

gas: use memmove instead of bogus memcpy.

partial_where points into the buffer that begins with buffer_start
so we need to use memmove() to handle the overlap.
Fixes Sourceware-PR 11456.

Obtained from: OpenBSD (CVS rev. 1.2)

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

9 years agoMFC r276037: sh: Remove EXP_REDIR.
jilles [Mon, 29 Dec 2014 15:33:20 +0000 (15:33 +0000)]
MFC r276037: sh: Remove EXP_REDIR.

EXP_REDIR was supposed to generate pathnames in redirection if exactly one
file matches, as permitted but not required by POSIX in interactive mode. It
is unlikely this will be implemented.

No functional change is intended.

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

9 years agoMFC r274854: sh: Use DQSYNTAX only while expanding, not SQSYNTAX.
jilles [Mon, 29 Dec 2014 15:15:27 +0000 (15:15 +0000)]
MFC r274854: sh: Use DQSYNTAX only while expanding, not SQSYNTAX.

Quoting during expansion only cares about CCTL, which is the same for
DQSYNTAX and SQSYNTAX.

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

9 years agoMFC r273920: sh: Fix corruption of CTL* bytes in positional parameters in
jilles [Mon, 29 Dec 2014 15:11:07 +0000 (15:11 +0000)]
MFC r273920: sh: Fix corruption of CTL* bytes in positional parameters in
redirection.

EXP_REDIR was not being checked for while expanding positional parameters in
redirection, so CTL* bytes were not being prefixed where they should be.

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

9 years agoMFC r275260:
kib [Mon, 29 Dec 2014 00:30:38 +0000 (00:30 +0000)]
MFC r275260:
Remove lock recursion for the pipe pair mutex, and disable the
recursion on mutex initialization.

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

9 years agoMFC r270326
neel [Sun, 28 Dec 2014 21:27:13 +0000 (21:27 +0000)]
MFC r270326
Fix a recursive lock acquisition in vi_reset_dev().

MFC r270434
Return the spurious interrupt vector (IRQ7 or IRQ15) if the atpic cannot find
any unmasked pin with an interrupt asserted.

MFC r270436
Fix a bug in the emulation of CPUID leaf 0x4.

MFC r270437
Add "hw.vmm.topology.threads_per_core" and "hw.vmm.topology.cores_per_package"
tunables to modify the default cpu topology advertised by bhyve.

MFC r270855
Set the 'inst_length' to '0' early on before any error conditions are detected
in the emulation of the task switch. If any exceptions are triggered then the
guest %rip should point to instruction that caused the task switch as opposed
to the one after it.

MFC r270857
The "SUB" instruction used in getcc() actually does 'x -= y' so use the
proper constraint for 'x'. The "+r" constraint indicates that 'x' is an
input and output register operand.

While here generate code for different variants of getcc() using a macro
GETCC(sz) where 'sz' indicates the operand size.

Update the status bits in %rflags when emulating AND and OR opcodes.

MFC r271439
Initialize 'bc_rdonly' to the right value.

MFC r271451
Optimize the common case of injecting an interrupt into a vcpu after a HLT
by explicitly moving it out of the interrupt shadow.

MFC r271888
Restructure the MSR handling so it is entirely handled by processor-specific
code.

MFC r271890
MSR_KGSBASE is no longer saved and restored from the guest MSR save area. This
behavior was changed in r271888 so update the comment block to reflect this.

MFC r271891
Add some more KTR events to help debugging.

MFC r272197
mmap(2) requires either MAP_PRIVATE or MAP_SHARED for non-anonymous mappings.

MFC r272395
Get rid of code that dealt with the hardware not being able to save/restore
the PAT MSR on guest exit/entry. This workaround was done for a beta release
of VMware Fusion 5 but is no longer needed in later versions.

All Intel CPUs since Nehalem have supported saving and restoring MSR_PAT
in the VM exit and entry controls.

MFC r272670
Inject #UD into the guest when it executes either 'MONITOR' or 'MWAIT'.

MFC r272710
Implement the FLUSH operation in the virtio-block emulation.

MFC r272838
iasl(8) expects integer fields in data tables to be specified as hexadecimal
values. Therefore the bit width of the "PM Timer Block" was actually being
interpreted as 50-bits instead of the expected 32-bit.

This eliminates an error message emitted by a Linux 3.17 guest during boot:
"Invalid length for FADT/PmTimerBlock: 50, using default 32"

MFC r272839
Support Intel-specific MSRs that are accessed when booting up a linux in bhyve:
 - MSR_PLATFORM_INFO
 - MSR_TURBO_RATIO_LIMITx
 - MSR_RAPL_POWER_UNIT

MFC r273108
Emulate "POP r/m". This is needed to boot OpenBSD/i386 MP kernel in bhyve.

MFC r273212
Support stopping and restarting the AHCI command list via toggling PxCMD.ST
from '1' to '0' and back.  This allows the driver a chance to recover if
for instance a timeout occurred due to activity on the host.

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

9 years agoMFC r272789:
marcel [Sun, 28 Dec 2014 19:03:29 +0000 (19:03 +0000)]
MFC r272789:
Fix draining in ttydev_leave().

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

9 years agoMFC r269126 & 272786:
marcel [Sun, 28 Dec 2014 18:53:16 +0000 (18:53 +0000)]
MFC r269126 & 272786:
Don't return ERESTART when the device is gone.

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

9 years agoMFC r275721:
marcel [Sun, 28 Dec 2014 18:43:39 +0000 (18:43 +0000)]
MFC r275721:
The size of the first level reference count table is given in terms of the
number of clusters it occupies.

Bump the version number of mkimg.

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

9 years agoMFH r275941:
peterj [Sun, 28 Dec 2014 07:14:38 +0000 (07:14 +0000)]
MFH r275941:
Adjust the test of a KASSERT to better match the intent.

This assertion was added in r246213 as a guard against corrupted mbufs
arriving from drivers, the key distinguishing factor of said mbufs being
that they had a negative length. Given we're in a while loop specifically
designed to skip over zero-length mbufs, panicking on a zero-length mbuf
seems incorrect.

Suggested by: rmacklem
MFH go-ahead: benno
Approved by: grog (co-mentor)

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

9 years agoMFC r276165, r276166:
ian [Sat, 27 Dec 2014 17:36:49 +0000 (17:36 +0000)]
MFC r276165, r276166:

  Define the old-school arm arch constants we still use internally based on
  the somewhat newer constants predefined by the compiler.  This will allow
  userland apps to use various machine/foo.h headers without CPUTYPE defined.

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

9 years agoMFC r275867:
ngie [Sat, 27 Dec 2014 17:20:24 +0000 (17:20 +0000)]
MFC r275867:

  Fix sporadic build failures due to race when running make installworld
  when strip gets replaced at install time by adding it to ITOOLS for the
  default usr.bin/xinstall STRIP_CMD

  This will fix the failure noted in this Jenkins build step:
  https://jenkins.freebsd.org/job/Build-UFS-image/688/

  This will also fix the issue reported by alfred@ dealing with installing on
  targets that differ from build hosts (e.g. installing on i386/i386 when built
  on amd64/amd64)

  Sponsored by: EMC / Isilon Storage Division

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

9 years agoMFC r275908,r276309:
ngie [Sat, 27 Dec 2014 17:14:53 +0000 (17:14 +0000)]
MFC r275908,r276309:

r275908:

  Document STRIP_CMD in build(7) and note its importance with LOCAL_ITOOLS

  Phabric: D1335
  Reviewed by: brueffer
  Sponsored by: EMC / Isilon Storage Division

r276309:

  Bump .Dd for change done in r275908

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

9 years agoMFC r275866:
ngie [Sat, 27 Dec 2014 17:10:14 +0000 (17:10 +0000)]
MFC r275866:

  Parallelize building gnu/usr.bin/groff

  This speeds up building the directory from the bootstrap-tools stage in
  buildworld as well as building from the subdirectory

  Based on a patch submitted via -arch:
  https://lists.freebsd.org/pipermail/freebsd-arch/2014-December/016493.html

  Submitted by: Jia-Shiun Li <jiashiun@gmail.com>
  Sponsored by: EMC / Isilon Storage Division

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

9 years agoMFC bmake changes to stable/10 (r255285,r255916,r258113,r258114,r261212,r266760,r268437)
ngie [Sat, 27 Dec 2014 16:43:22 +0000 (16:43 +0000)]
MFC bmake changes to stable/10 (r255285,r255916,r258113,r258114,r261212,r266760,r268437)

Discussed with: sjg

r255285:

  If MAKE_JOB_ERROR_TOKEN is set to false, do not put an error token ("E")
  into the job queue.
  This avoids closing down an entire build on failure of one branch.
  Probably has no use outside the context of universe/tinderbox.

  Reviewed by: obrien

r255916:

  Fix Fx syntax.

  PR: 182269
  Approved by: re@

r258113:

  Avoid SEGV when passed NULL for list

r258114:

  Don't SEGV when Hash_Table is uninitialized

r261212:

  Merge bmake-20140101 from vendor

r266760:

  Portmgr no longer need the UL hack.

  Reviewed by: obrien

r268437:

  Update to bmake-20140620
  Main change is detection of malformed variable references.

  Reviewed by: obrien

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

9 years agoMFC r276045:
ian [Sat, 27 Dec 2014 05:24:18 +0000 (05:24 +0000)]
MFC r276045:

 Allow -march=armv7a on the gcc command line, for compatibility with clang.

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

9 years agoMFC r276029:
ian [Sat, 27 Dec 2014 05:11:34 +0000 (05:11 +0000)]
MFC r276029:

  Remove a volatile qualifier on return type that is ignored and results in
  a -Wreturn-type warning when compiled with gcc.

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

9 years agor276026:
ian [Sat, 27 Dec 2014 05:10:07 +0000 (05:10 +0000)]
r276026:

 Allow whitspace to appear between device name and unit number in loaderdev.

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

9 years agoMFC r275951: Log mmc and sd command failures.
ian [Sat, 27 Dec 2014 04:55:45 +0000 (04:55 +0000)]
MFC r275951:   Log mmc and sd command failures.

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

9 years agoMFC r275944, r275946, r275949, r275950:
ian [Sat, 27 Dec 2014 04:54:36 +0000 (04:54 +0000)]
MFC r275944, r275946, r275949, r275950:

  Add code to set and reset open-drain mode on the bus when requested.

  When command and data interrupts have been aggregated together, don't do
  the data-completed processing if a command-error interrupt is also asserted.

  Add a new sdhci quirk, SDHCI_QUIRK_WAITFOR_RESET_ASSERTED, to work around
  TI OMAP controllers which will return the reset-in-progress bit as zero if
  you read the status register too fast after setting the reset bit.

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

9 years agoMFC r275660: Fix the watchdog timeout calculation to prevent wrap.
ian [Sat, 27 Dec 2014 04:51:21 +0000 (04:51 +0000)]
MFC r275660:  Fix the watchdog timeout calculation to prevent wrap.

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

9 years agoMFC r274967:
ian [Sat, 27 Dec 2014 04:35:18 +0000 (04:35 +0000)]
MFC r274967:

 Add busdma sync ops before reading and after modifying the descriptor rings

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

9 years agoMFC r274941: The arm PJ4B cpu is armv7 architecture, not v6.
ian [Sat, 27 Dec 2014 04:33:35 +0000 (04:33 +0000)]
MFC r274941: The arm PJ4B cpu is armv7 architecture, not v6.

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

9 years agoMFC r274937:
ian [Sat, 27 Dec 2014 04:30:42 +0000 (04:30 +0000)]
MFC r274937:

  Add ARMV6 as an arm option.  This will cause obscure magic in config(8)
  to automatically set the armv6 option when MACHINE_ARCH is armv6.  That
  allows replacing ever-growing lists of cpu names as options to compile
  a given file with the using either "optional armv6" or "optional !armv6".

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

9 years agoMFC r265840: Eliminate spurious warnings when grep doesn't find NO_UNIVERSE
ian [Sat, 27 Dec 2014 03:20:34 +0000 (03:20 +0000)]
MFC r265840:  Eliminate spurious warnings when grep doesn't find NO_UNIVERSE

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

9 years agoMFC r274924, r274936:
ian [Sat, 27 Dec 2014 03:19:04 +0000 (03:19 +0000)]
MFC r274924, r274936:

  Consider the negation operator (!) to be a word even if it is not followed
  by whitespace.  This allows "optional !foo" which is what most programmers
  are naturally going to tend to do as opposed to "optional ! foo".

  Fix the negation (!) operator so that it binds only to the word that
  immediately follows it.

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

9 years agoMFC r274641, r274644, r274822, r276049:
ian [Sat, 27 Dec 2014 02:37:52 +0000 (02:37 +0000)]
MFC r274641, r274644, r274822, r276049:

  Allow i2c bus speed to be configured via hints, FDT data, and sysctl.

  Implement bus speed setting for OMAP4, AM335x, and imx5/6.

  Fix the i2c bus speed divisors for TI OMAP4 and AM335x to give the
  advertised 100, 400, and 1000 KHz speeds.

PR: 195009

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

9 years agoMFC r275906:
jamie [Sat, 27 Dec 2014 02:17:35 +0000 (02:17 +0000)]
MFC r275906:

  Setgid before running a command as a specified user.  Previously only
  initgroups(3) was called, what isn't quite enough.  This brings jail(8)
  in line with jexec(8), which was already doing the right thing.

PR: 195984

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

9 years agoMFC r274412, r274413, r274414: Bugfixes for imx5/6 pinctrl driver.
ian [Sat, 27 Dec 2014 01:35:03 +0000 (01:35 +0000)]
MFC r274412, r274413, r274414:  Bugfixes for imx5/6 pinctrl driver.

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

9 years agoMFC r274538, r274545, r274596, r274602, r274603, r274604, r274605, r274839:
ian [Sat, 27 Dec 2014 01:28:52 +0000 (01:28 +0000)]
MFC r274538, r274545, r274596, r274602, r274603, r274604, r274605, r274839:

  When doing busdma sync ops for BUSDMA_COHERENT memory, there is no need
  for cache maintenance operations, but ensure that all prior writes have
  reached memory when doing a PREWRITE sync.

  Do not do a cache invalidate on a PREREAD sync that is also a PREWRITE sync.

  Do the cache invalidate sequence from the outermost to innermost, required
  for correct operation.

  Correct the sequence of busdma sync ops involved with PRE/POSTREAD syncs.

  When doing a PREREAD sync of an mbuf-type dma buffer, do a writeback of
  the first cacheline if the buffer start address is not on a cacheline
  boundary.

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

9 years agoMFC r275745:
kib [Sat, 27 Dec 2014 00:55:14 +0000 (00:55 +0000)]
MFC r275745:
Add facility to stop all userspace processes.

MFC r275753:
Fix gcc build.

MFC r275820:
Add missed break.

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

9 years agoMFC r275960:
kib [Sat, 27 Dec 2014 00:44:33 +0000 (00:44 +0000)]
MFC r275960:
Increase allowed size of the microcode blob to 32KB.

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

9 years agoMFC r274926: Squelch a (bogus) gcc used before init warning
ian [Sat, 27 Dec 2014 00:01:28 +0000 (00:01 +0000)]
MFC r274926: Squelch a (bogus) gcc used before init warning

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

9 years agoMFC 276174:
scottl [Fri, 26 Dec 2014 23:18:09 +0000 (23:18 +0000)]
MFC 276174:

Fix tunable and sysctl handling of the fail_on_task_timeout knob.

Reviewed by:    emax
Obtained from:  Netflix, Inc.

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

9 years agoMFC r274188, r274189:
ian [Fri, 26 Dec 2014 22:56:02 +0000 (22:56 +0000)]
MFC r274188, r274189:
 DMA tag alignment should be 1 (not 0) when a device can dma at any address.

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

9 years agoMFC r272671:
markj [Fri, 26 Dec 2014 22:52:44 +0000 (22:52 +0000)]
MFC r272671:
Treat D keywords as identifiers in certain postfix expressions. This allows
one to, for example, access the "provider" field of a struct g_consumer,
even though "provider" is a D keyword.

PR: 169657

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

9 years agoMFC r275011:
markj [Fri, 26 Dec 2014 22:50:34 +0000 (22:50 +0000)]
MFC r275011:
The module load address always needs to be included when setting the dm_*_va
fields of dt_module_t. Previously, this was only done on architectures where
kernel modules have type ET_REL; this change fixes that. As a result, symbol
name resolution in the stack() action now works properly for kernel modules
on i386.

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

9 years agoMFC r270190: Don't kill parallel jobs on (expected) failure of make_check.
ian [Fri, 26 Dec 2014 21:40:45 +0000 (21:40 +0000)]
MFC r270190: Don't kill parallel jobs on (expected) failure of make_check.

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

9 years agoMFC r275790 and r275791:
hselasky [Fri, 26 Dec 2014 11:32:34 +0000 (11:32 +0000)]
MFC r275790 and r275791:
Resolve USB driver identification conflict.
Regenerate etc/devd/usb.conf.

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

9 years agoMFC r259675, r262128, r262129, r275605, r276239 and r276240:
hselasky [Fri, 26 Dec 2014 11:16:59 +0000 (11:16 +0000)]
MFC r259675, r262128, r262129, r275605, r276239 and r276240:
Add more USB quirks.

PR: 178771
PR: 180617
PR: 195372

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

9 years agoMFC r275920, r276127: Pass real optimal transfer size supported by backend.
mav [Fri, 26 Dec 2014 09:44:32 +0000 (09:44 +0000)]
MFC r275920, r276127: Pass real optimal transfer size supported by backend.

For files and ZVOLs that is 1MB now, not 128K.

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

9 years agoMFC r275925: Slightly polish iSCSI parameters negotiation.
mav [Fri, 26 Dec 2014 09:12:19 +0000 (09:12 +0000)]
MFC r275925: Slightly polish iSCSI parameters negotiation.

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

9 years agoMFC r275118: Some microoptimizations.
mav [Fri, 26 Dec 2014 09:11:26 +0000 (09:11 +0000)]
MFC r275118: Some microoptimizations.

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

9 years agoMFC r275112:
mav [Fri, 26 Dec 2014 09:09:50 +0000 (09:09 +0000)]
MFC r275112:
Make isp_find_pdb_by_*() search for targets in portdb in reverse order.

Records with target_mode == 1 are allocated from the end of portdb, so it
seems logical to start search from the end not traverse whole array.

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

9 years agoMFC r275865:
mav [Wed, 24 Dec 2014 13:49:40 +0000 (13:49 +0000)]
MFC r275865:
Add configuration options to override physical and UNMAP blocks geometry.

While in most cases CTL should correctly fetch those values from backing
storages, there are some initiators (like MS SQL), that may not like large
physical block sizes, even if they are true.  For such cases allow override
fetched values with supported ones (like 4K).

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

9 years agoMFC r273087 (with modifications):
ae [Tue, 23 Dec 2014 16:33:44 +0000 (16:33 +0000)]
MFC r273087 (with modifications):
  Overhaul if_gif(4):
   o convert to if_transmit;
   o use rmlock to protect access to gif_softc;
   o use sx lock to protect from concurrent ioctls;
   o remove a lot of unneeded and duplicated code;
   o remove cached route support (it won't work with concurrent io);
   o style fixes.

MFC r273090:
  Move memset under ifdef INET6.

MFC r273091:
  Add more ifdefs. SIOC*_IN6 are defined only with INET6.

MFC r273121:
  Add inet/inet6 to the dependency list. Without them if_gif is useless.

MFC r273209 by bz:
  After r273087,r273090,r273091,r273121 changes to gif(4) try to fix
  NOIP builds for real.

MFC r273587:
  Remove redundant check and m_pullup() call.

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

9 years agoMFC r275959: Report initiator id in portlist XML in more formalized way.
mav [Tue, 23 Dec 2014 12:45:29 +0000 (12:45 +0000)]
MFC r275959: Report initiator id in portlist XML in more formalized way.

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

9 years agoMFC r275958: Report XML parsing errors.
mav [Tue, 23 Dec 2014 12:44:16 +0000 (12:44 +0000)]
MFC r275958: Report XML parsing errors.

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

9 years agoMFC r275842: Do not count RCTD bit set as an error.
mav [Tue, 23 Dec 2014 12:41:28 +0000 (12:41 +0000)]
MFC r275842: Do not count RCTD bit set as an error.

We can not really implement it, but specification tells that it "shall"
work, so it can be safely ignored.

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

9 years agoMFC: r272492
nyan [Tue, 23 Dec 2014 12:13:31 +0000 (12:13 +0000)]
MFC: r272492

  Merge pc98's machdep.c into i386/i386/machdep.c.

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

9 years agoMFC r271208:
kib [Tue, 23 Dec 2014 12:04:23 +0000 (12:04 +0000)]
MFC r271208:
Add a define for index of IA32_XSS MSR.

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

9 years agoMFC r271206:
kib [Tue, 23 Dec 2014 12:00:41 +0000 (12:00 +0000)]
MFC r271206:
Adjust the definition of struct xstate_hdr according to SDM rev. 50.

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

9 years agoMFC r271197:
kib [Tue, 23 Dec 2014 11:55:53 +0000 (11:55 +0000)]
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://svn.freebsd.org/base/stable/10@276132 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: r272491
nyan [Tue, 23 Dec 2014 10:59:15 +0000 (10:59 +0000)]
MFC: r272491

  Reduce diffs against i386.

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

9 years agoMFC: r272490 (partial)
nyan [Tue, 23 Dec 2014 09:46:23 +0000 (09:46 +0000)]
MFC: r272490 (partial)

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

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

9 years agoAdd if_inc_counter() and if_get_counter_default() functions that do
ae [Tue, 23 Dec 2014 09:39:40 +0000 (09:39 +0000)]
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://svn.freebsd.org/base/stable/10@276124 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r274437;
pfg [Tue, 23 Dec 2014 03:24:16 +0000 (03:24 +0000)]
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://svn.freebsd.org/base/stable/10@276102 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r275838;
pfg [Tue, 23 Dec 2014 02:46:00 +0000 (02:46 +0000)]
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://svn.freebsd.org/base/stable/10@276099 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoStrip trailing / characters from paths in "not present" index entries.
des [Mon, 22 Dec 2014 22:11:39 +0000 (22:11 +0000)]
Strip trailing / characters from paths in "not present" index entries.

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

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

9 years agoMFC 275035:
jhb [Mon, 22 Dec 2014 21:46:35 +0000 (21:46 +0000)]
MFC 275035:
MFamd64: Check for invalid flags in the machine context in sigreturn()
and setcontext().

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

9 years agoMFC 273988,273989,273995,274057:
jhb [Mon, 22 Dec 2014 21:32:39 +0000 (21:32 +0000)]
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://svn.freebsd.org/base/stable/10@276084 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r275530:
delphij [Mon, 22 Dec 2014 21:06:26 +0000 (21:06 +0000)]
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://svn.freebsd.org/base/stable/10@276082 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r274337,r274673,274681,r275515:
delphij [Mon, 22 Dec 2014 20:58:51 +0000 (20:58 +0000)]
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://svn.freebsd.org/base/stable/10@276081 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC 273991:
jhb [Mon, 22 Dec 2014 20:53:45 +0000 (20:53 +0000)]
MFC 273991:
MFamd64: Move extern declaration of _ucodesel and _udatasel to
<machine/md_var.h>

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

9 years agoMFC 271405,271408,271409,272658:
jhb [Mon, 22 Dec 2014 19:53:55 +0000 (19:53 +0000)]
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://svn.freebsd.org/base/stable/10@276076 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r276071:
delphij [Mon, 22 Dec 2014 19:07:16 +0000 (19:07 +0000)]
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://svn.freebsd.org/base/stable/10@276072 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC 260557,271076,271077,271082,271083,271098:
jhb [Mon, 22 Dec 2014 18:40:59 +0000 (18:40 +0000)]
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://svn.freebsd.org/base/stable/10@276070 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f