]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
9 years agoMFC r276627:
kib [Sat, 10 Jan 2015 09:22:17 +0000 (09:22 +0000)]
MFC r276627:
Add rtld private interface for dso to detect dynamic loading
vs. static linking.

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

9 years agoMFC r265218 (smh):
delphij [Sat, 10 Jan 2015 01:05:12 +0000 (01:05 +0000)]
MFC r265218 (smh):

Removed pointless / duplicated call to trim_map_first.

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

9 years agoMFC r264392 (davide):
delphij [Sat, 10 Jan 2015 01:01:12 +0000 (01:01 +0000)]
MFC r264392 (davide):

Fix a panic in zfs_rename().
this is due to a wrong dereference of a vnode when it's not locked and
can be (potentially) recycled. 'sdvp' cannot be locked on zfs_rename()
entry point because the VFS can't be sure that this scenario is
LOR-free (it might violate the parent->child lock acquisition rule).
Dereference 'tdvp' instead, which is already locked on entry, and access
'sdvp' fields only when it's safe, i.e. under ZFS_ENTER scope.

While at it, remove the usage of VOP_REALVP, as long as this is a NOP
on FreeBSD.

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

9 years agoMFC r276550:
dchagin [Fri, 9 Jan 2015 07:32:43 +0000 (07:32 +0000)]
MFC r276550:
Remove Giant from linux_getcwd() due to VFS is MPSAFE now.

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

9 years agoMFC r276589:
loos [Fri, 9 Jan 2015 03:35:19 +0000 (03:35 +0000)]
MFC r276589:

puc(4): Add an entry for the Feasso PCI FPP-02 2S1P card.

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

9 years agoMFC r276249:
loos [Fri, 9 Jan 2015 03:32:51 +0000 (03:32 +0000)]
MFC r276249:

Fix the musb initialization sequence on AM335x.

According to http://e2e.ti.com/support/arm/sitara_arm/f/791/t/210729 the
USB reset pulse has an undocumented duration of 200ns and during this
period the module must not be acessed.

We wait for 100us to take into account for some imprecision of the early
DELAY() loop.

This fixes the eventual 'External Non-Linefetch Abort (S)' that happens at
boot while resetting the musb subsystem.

While here, enable the USB subsystem clock before the first access.

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

9 years agoMFC r274416:
loos [Fri, 9 Jan 2015 03:26:18 +0000 (03:26 +0000)]
MFC r274416:

Fix a few cases of use of uninitialized variables.  Found with -Wall.

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

9 years agoMFC r273606:
loos [Fri, 9 Jan 2015 02:51:06 +0000 (02:51 +0000)]
MFC r273606:

Fix cpsw_detach() to not panic when called from cpsw_attach().

For an unkown reason (at moment), sometimes if_cpsw cannot read from PHY
and fails to attach calling cpsw_detach() which end up in a panic.

Fix it by doing the proper check before detach the miibus and also fix the
leak of few variables.

And to actually make it work, ether_ifattach() has to be moved to the end
of cpsw_attach() to avoid a race where calling ether_ifdetach() before
domain_init() (which will only run later on) would make it crash at
INP_INFO_RLOCK() on in_pcbpurgeif0().

Tested on:    BBB (am335x)

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

9 years agoMFC r273599:
loos [Fri, 9 Jan 2015 02:47:57 +0000 (02:47 +0000)]
MFC r273599:

Fix a bug where DMA maps created with bus_dmamap_create() won't increment
the map count and without being able to keep track of the current map
allocation, bus_dma_tag_destroy() will fail to proceed and will return
EBUSY even after all the maps have been correctly destroyed with
bus_dmamap_destroy().

Found while testing the detach method of a NIC.

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

9 years agoMFC: r273546
loos [Fri, 9 Jan 2015 02:43:17 +0000 (02:43 +0000)]
MFC: r273546

Fix a bug where some DTS layouts could cause the premature ending of the
search (i.e. without returning any result) and you would end up with a
random MAC address.

Change the search algorithm to a recursive one to ensure that all the nodes
on DTS will be verified.

The previous algorithm could not keep up if the DTS has too many sub-nodes.

While here, fix the punctuation on comments.

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

9 years agoMFC r276314:
loos [Fri, 9 Jan 2015 02:38:12 +0000 (02:38 +0000)]
MFC r276314:

Convert the BSC (i2c) driver to use the new iicbus_get_frequency().

Tested on:    Raspberry pi

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

9 years agoMFC r276523:
kib [Fri, 9 Jan 2015 02:35:19 +0000 (02:35 +0000)]
MFC r276523:
Restore access to the page at zero through /dev/mem after r263475.

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

9 years agoMFC r276522:
kib [Fri, 9 Jan 2015 02:33:12 +0000 (02:33 +0000)]
MFC r276522:
Actually remove GIANT_REQUIRED, declared but not done in r263475.
Style.

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

9 years agoMFC r273610:
loos [Fri, 9 Jan 2015 02:30:30 +0000 (02:30 +0000)]
MFC r273610:

Add an iicbus_reset() method to bcm2835_bsc.  While it is generally not
used for kernel devices it is used by i2c(8).

This fix the 'error: Device not configured' when i2c(8) tries to reset the
controller:

# i2c -r
Resetting I2C controller on /dev/iic0: error: Device not configured

For now use conservative settings for default i2c speeds.

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

9 years agoMFC r273329, r273337 and r274415
loos [Fri, 9 Jan 2015 02:25:19 +0000 (02:25 +0000)]
MFC r273329, r273337 and r274415

Add another wakeup() after actually set the bus as free.

This fix a race where the threads waiting for the bus would wake up early
and still see bus as busy.

While here, give a better description to wmesg for the two use cases we
have (bus and io waiting).

Fix the mtx_sleep() error checking, catch all errors and not only
EWOULDBLOCK.

Do not print any message at errors.  The errors are properly sent to upper
layers which should be able to deal with it, including printing the errors
when they need to.

The error message was quite annoying while scanning the i2c bus.

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

9 years agoMFC: r276861, r276863
jkim [Fri, 9 Jan 2015 00:58:20 +0000 (00:58 +0000)]
MFC: r276861, r276863

Merge OpenSSL 1.0.1k.

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

9 years agoMFC r276512:
dchagin [Thu, 8 Jan 2015 06:32:56 +0000 (06:32 +0000)]
MFC r276512:
Fix Clang -Wpointer-sign warnings.

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

9 years agoMFC r276511:
dchagin [Thu, 8 Jan 2015 06:29:52 +0000 (06:29 +0000)]
MFC r276511:
Fix Clang warning: passing 'unsigned int *' to parameter of type 'int *'
converts between pointers to integer types with different sign.

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

9 years agoRegen for r276810.
dchagin [Thu, 8 Jan 2015 06:24:43 +0000 (06:24 +0000)]
Regen for r276810.

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

9 years agoMFC r276508, r276509:
dchagin [Thu, 8 Jan 2015 06:23:11 +0000 (06:23 +0000)]
MFC r276508, r276509:
Correct an argument status of wait4 syscall for Linuxulator.

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

9 years agoMFC r276218:
pfg [Thu, 8 Jan 2015 03:44:54 +0000 (03:44 +0000)]
MFC r276218:

patch: Bring in xstrdup and use it when appropriate.

The function savestr allows NULL return values during Plan A patching so in
case of out of memory conditions, Plan B can step in.  In many cases, NULL
value is not properly handled, so use xstrdup here (it's outside Plan A/B
patching, which means that even Plan B relies on successful operations).

Clean up some whitespaces while here

Obtained from: OpenBSD

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

9 years agoMFC r275709
emax [Wed, 7 Jan 2015 20:01:15 +0000 (20:01 +0000)]
MFC r275709

handle "Kana" and "Eisu" keys on Apple Wireless Keyboard (JIS)

PR: 187470
Submitted by: naito.yuichiro

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

9 years agoMFC r274722:
trasz [Wed, 7 Jan 2015 18:38:04 +0000 (18:38 +0000)]
MFC r274722:

Remove acl_size.c; apparently it was never used.

PR: 194398
Submitted by: ngie@
Sponsored by: The FreeBSD Foundation

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

9 years agoMerge r275599:
rodrigc [Tue, 6 Jan 2015 07:59:50 +0000 (07:59 +0000)]
Merge r275599:
Use CURVNET macros inside inet_get_local_port_range() function.
Without this fix, a kernel with VIMAGE + Infiniband will panic on bootup.

Certain necessary #include statements require LIST_HEAD.
Add these includes to ofed/include/linux/list.h, because
LIST_HEAD is specifically overridden in this file.

PR: 191468
Differential Revision: D1279
Reviewed by: hselasky

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

9 years agoMFC r276250:
markj [Tue, 6 Jan 2015 02:13:49 +0000 (02:13 +0000)]
MFC r276250:
DOF tables are aligned according to the DOF section's alignment constraint,
so take this into account when iterating over DOF tables.

PR: 195555

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

9 years agoDocument r275945, capabilities support added to elfdump(1).
gjb [Mon, 5 Jan 2015 20:34:06 +0000 (20:34 +0000)]
Document r275945, capabilities support added to elfdump(1).

Sponsored by: The FreeBSD Foundation

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

9 years agoDocument r275891, CAM port/LUN limits increased.
gjb [Mon, 5 Jan 2015 20:34:03 +0000 (20:34 +0000)]
Document r275891, CAM port/LUN limits increased.

Sponsored by: The FreeBSD Foundation

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

9 years agoDocument r275490, vfs.zfs.spa_slop_shift tunable addition.
gjb [Mon, 5 Jan 2015 20:34:00 +0000 (20:34 +0000)]
Document r275490, vfs.zfs.spa_slop_shift tunable addition.

Sponsored by: The FreeBSD Foundation

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

9 years agoDocument r275040, dpv(1), dpv(3), figpar(3).
gjb [Mon, 5 Jan 2015 20:33:57 +0000 (20:33 +0000)]
Document r275040, dpv(1), dpv(3), figpar(3).

Sponsored by: The FreeBSD Foundation

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

9 years agoDocument r274939, iSNS support in ctld(8).
gjb [Mon, 5 Jan 2015 20:33:53 +0000 (20:33 +0000)]
Document r274939, iSNS support in ctld(8).

Sponsored by: The FreeBSD Foundation

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

9 years agoMFC r273876
hiren [Mon, 5 Jan 2015 19:54:40 +0000 (19:54 +0000)]
MFC r273876

Use search method instead of fixed offsets for finding rootfs. This unbreaks
recent images for picostation by allowing to find rootfs at correct location.

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

9 years agoMFC r276472:
pfg [Mon, 5 Jan 2015 16:09:51 +0000 (16:09 +0000)]
MFC r276472:

Minor fixes to exit status.

Exit with EXIT_FAILURE for invalid arguments.
Fixes NetBSD-PR 43517.

Print version string to stdout instead of stderr;
it is user-requested and not an error.

Obtained from: NetBSD

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

9 years agoMerge reaper facility.
kib [Mon, 5 Jan 2015 03:27:09 +0000 (03:27 +0000)]
Merge reaper facility.

MFC r270443 (by mjg):
Properly reparent traced processes when the tracer dies.

MFC r273452 (by mjg):
Plug unnecessary PRS_NEW check in kern_procctl.

MFC 275800:
Add a facility for non-init process to declare itself the reaper of
the orphaned descendants.

MFC r275821:
Add missed break.

MFC r275846 (by mckusick):
Add some additional clarification and fix a few gammer nits.

MFC r275847 (by bdrewery):
Bump Dd for r275846.

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

9 years agoMFC r276320:
ngie [Mon, 5 Jan 2015 00:15:27 +0000 (00:15 +0000)]
MFC r276320:

  Parallelize building lib/ncurses

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

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

9 years agoMFC r276319:
ngie [Mon, 5 Jan 2015 00:12:47 +0000 (00:12 +0000)]
MFC r276319:

  Fix the function signatures when MK_CRYPT == no for snmp_get_local_keys and
  snmp_passwd_to_keys

  Reported by: Beeblebrox <zaphod@berentweb.com>

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

9 years agoCommit mergeinfo that should have been committed with r276674
ngie [Mon, 5 Jan 2015 00:11:20 +0000 (00:11 +0000)]
Commit mergeinfo that should have been committed with r276674

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

9 years agoBump .Dd per r276674
ngie [Mon, 5 Jan 2015 00:07:18 +0000 (00:07 +0000)]
Bump .Dd per r276674

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

9 years agoMFC r276483:
ngie [Mon, 5 Jan 2015 00:06:38 +0000 (00:06 +0000)]
MFC r276483:

  The variable used with install(1) for stripping should be STRIPBIN, not
  STRIP_CMD

  Reported by: lev

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

9 years agoMFC r274618,r276521:
ngie [Mon, 5 Jan 2015 00:02:11 +0000 (00:02 +0000)]
MFC r274618,r276521:

MFC Note: text corrected for r274618

r274618:

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

  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

r276521:

  Reset errno in :scalbnf_val and :scalbnl_val before running the tests so the
  tested errno isn't stale

  This was needed in order for the test to pass on amd64 with stable/10

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

9 years agoMFC r274254: sh(1): Mention portability issue with shifting zero positional
jilles [Sun, 4 Jan 2015 19:02:50 +0000 (19:02 +0000)]
MFC r274254: sh(1): Mention portability issue with shifting zero positional
parameters.

Per Austin Group issue #459, shifting zero positional parameters may or may
not be considered an operand error (which causes the shell to exit in most
cases).

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

9 years agoMFC r271936: sh(1): Clarify that assignments before commands do not affect
jilles [Sun, 4 Jan 2015 18:58:51 +0000 (18:58 +0000)]
MFC r271936: sh(1): Clarify that assignments before commands do not affect
expansions.

PR: 193759

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

9 years agoMFC r276008:
kib [Sun, 4 Jan 2015 00:49:45 +0000 (00:49 +0000)]
MFC r276008:
Add VN_OPEN_NAMECACHE flag for vn_open_cred(9), which requests that
the created file name was cached.  Use the flag for core dumps.

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

9 years agoMFC r276007:
kib [Sun, 4 Jan 2015 00:46:06 +0000 (00:46 +0000)]
MFC r276007:
Handle MAKEENTRY cnp flag in the VOP_CREATE().

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

9 years agoBump version after r276312 brought in new ARM arch constants that some
ian [Sat, 3 Jan 2015 20:29:47 +0000 (20:29 +0000)]
Bump version after r276312 brought in new ARM arch constants that some
ports need to compile correctly.

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

9 years agoMFC r272765: Remove one second wait for threads exit from icl_conn_close().
mav [Sat, 3 Jan 2015 18:35:29 +0000 (18:35 +0000)]
MFC r272765: Remove one second wait for threads exit from icl_conn_close().

Switch it from polling with pause() to using cv_wait()/cv_signal().

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

9 years agoMFC r274033 (by trasz):
mav [Sat, 3 Jan 2015 18:27:03 +0000 (18:27 +0000)]
MFC r274033 (by trasz):
s/icl_pdu_new/icl_pdu_new_empty/g; no functional changes.

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

9 years agoMFC r272963: pstat(8): Correct description of the SESS column in pstat -t.
jilles [Sat, 3 Jan 2015 15:37:34 +0000 (15:37 +0000)]
MFC r272963: pstat(8): Correct description of the SESS column in pstat -t.

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

9 years agoMFC r274036 (by trasz):
mav [Sat, 3 Jan 2015 13:36:56 +0000 (13:36 +0000)]
MFC r274036 (by trasz):
s/icl_pdu_new_bhs/icl_pdu_new/; no functional changes, just a little
nicer code.

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

9 years agoMFC r276141: Hide block device VPD pages for non-block devices.
mav [Sat, 3 Jan 2015 13:12:47 +0000 (13:12 +0000)]
MFC r276141: Hide block device VPD pages for non-block devices.

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

9 years agoMFC r275953: Replace ctl_min() macro with MIN().
mav [Sat, 3 Jan 2015 13:11:39 +0000 (13:11 +0000)]
MFC r275953: Replace ctl_min() macro with MIN().

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

9 years agoMFC r275943: Constify some static data.
mav [Sat, 3 Jan 2015 13:10:23 +0000 (13:10 +0000)]
MFC r275943: Constify some static data.

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

9 years agoMFC r275942: Reduce number of places where global control_softc is used.
mav [Sat, 3 Jan 2015 13:09:32 +0000 (13:09 +0000)]
MFC r275942: Reduce number of places where global control_softc is used.

At some point we may want to have several CTL instances, and that is not
really impossible.

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

9 years agoMFC r275864: Make sequence numbers checks more strict.
mav [Sat, 3 Jan 2015 13:08:08 +0000 (13:08 +0000)]
MFC r275864: Make sequence numbers checks more strict.

While we don't support MCS, hole in received sequence numbers may mean
only PDU loss.  While we don't support lost PDU recovery, terminate the
connection to avoid stuck commands.

While there, improve handling of sequence numbers wrap after 2^32 PDUs.

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

9 years agoMFC r276322:
kib [Sat, 3 Jan 2015 01:41:10 +0000 (01:41 +0000)]
MFC r276322:
Change the way the lcall $7,$0 is reflected to usermode.  Instead of
setting call gate, which must be 64 bit, put a code segment descriptor
into ldt slot 0.

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

9 years agoinstall-info is also needed for installworld so add it to the bootstrap tools
bapt [Fri, 2 Jan 2015 23:13:04 +0000 (23:13 +0000)]
install-info is also needed for installworld so add it to the bootstrap tools

Add BPATH to the installworld path to ensure using installworld works if
install-info is not in base

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

9 years agoTrim the copyright year list to match the style in head.
gjb [Fri, 2 Jan 2015 22:53:03 +0000 (22:53 +0000)]
Trim the copyright year list to match the style in head.

Sponsored by: The FreeBSD Foundation

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

9 years agoBump copyright year.
gjb [Fri, 2 Jan 2015 22:25:30 +0000 (22:25 +0000)]
Bump copyright year.

Sponsored by: The FreeBSD Foundation

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

9 years agoPrune stable/10 release notes page after 10.1-RELEASE.
gjb [Fri, 2 Jan 2015 22:25:27 +0000 (22:25 +0000)]
Prune stable/10 release notes page after 10.1-RELEASE.

Sponsored by: The FreeBSD Foundation

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

9 years agoBump copyright year.
gjb [Fri, 2 Jan 2015 21:41:39 +0000 (21:41 +0000)]
Bump copyright year.

Sponsored by: The FreeBSD Foundation

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

9 years agoDocument the following security advisorires:
gjb [Fri, 2 Jan 2015 21:40:55 +0000 (21:40 +0000)]
Document the following security advisorires:
 - FreeBSD-SA-14:27.stdio
 - FreeBSD-SA-14:28.file
 - FreeBSD-SA-14:30.unbound
 - FreeBSD-SA-14:31.ntp

Sponsored by: The FreeBSD Foundation

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

9 years agoMake texinfo a bootstrap tools this fixes cross building when makeinfo is not \
bapt [Fri, 2 Jan 2015 21:16:13 +0000 (21:16 +0000)]
Make texinfo a bootstrap tools this fixes cross building when makeinfo is not \
available on the host

Differential Revision: https://reviews.freebsd.org/D1410
Submitted by: ngie (initial patch)
Reviewed by: ngie, imp
MFC after: 1 week

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

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