]> CyberLeo.Net >> Repos - FreeBSD/releng/10.1.git/log
FreeBSD/releng/10.1.git
9 years agoNote to avoid using GENERIC kernel on i386 when using
gjb [Sat, 25 Oct 2014 01:17:29 +0000 (01:17 +0000)]
Note to avoid using GENERIC kernel on i386 when using
multi-disk ZFS pools, referencing an old UPDATING entry
that predates 10.0-RELEASE.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273620 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoDocument r273399, OpenSSL updated to version 1.0.1j.
gjb [Fri, 24 Oct 2014 21:40:44 +0000 (21:40 +0000)]
Document r273399, OpenSSL updated to version 1.0.1j.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273608 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFS r273580: MFC r273577:
delphij [Fri, 24 Oct 2014 07:50:34 +0000 (07:50 +0000)]
MFS r273580: MFC r273577:

Return BUS_PROBE_DEFAULT instead of BUS_PROBE_VENDOR or 0 for in-tree
driver.  This change was verified by Microsoft.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273581 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoUpdate releng/10.1 to -RC3 as part of the 10.1-RELEASE cycle.
gjb [Tue, 21 Oct 2014 23:09:09 +0000 (23:09 +0000)]
Update releng/10.1 to -RC3 as part of the 10.1-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273437 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFstable10 r273429:
gjb [Tue, 21 Oct 2014 23:07:30 +0000 (23:07 +0000)]
MFstable10 r273429:
  MFC r273402:
  Fix an issue where a FreeBSD virtual machine provisioned in
  the Microsoft Azure service does not recognize the second
  attached disk on the system.

PR: 194376
Approved by: re (delphij)
Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273435 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoDocument the following security advisories:
gjb [Tue, 21 Oct 2014 21:44:24 +0000 (21:44 +0000)]
Document the following security advisories:
 FreeBSD-SA-14:20.rtsold
 FreeBSD-SA-14:21.routed
 FreeBSD-SA-14:22.namei
 FreeBSD-SA-14:23.openssl

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273433 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoFix rtsold(8) remote buffer overflow vulnerability. [SA-14:20]
delphij [Tue, 21 Oct 2014 20:20:36 +0000 (20:20 +0000)]
Fix rtsold(8) remote buffer overflow vulnerability. [SA-14:20]

Fix routed(8) remote denial of service vulnerability. [SA-14:21]

Fix memory leak in sandboxed namei lookup. [SA-14:22]

Approved by: re (so@ blanket)

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273414 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFS r273149 (jkim): MFC: r273144, r273146
delphij [Tue, 21 Oct 2014 19:00:32 +0000 (19:00 +0000)]
MFS r273149 (jkim): MFC: r273144, r273146

Merge OpenSSL 1.0.1j.

This is part of an upcoming FreeBSD security advisory.

Approved by: re (so@ blanket)

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273399 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoAdd basic UEFI boot procedure manpage
emaste [Tue, 21 Oct 2014 16:20:23 +0000 (16:20 +0000)]
Add basic UEFI boot procedure manpage

MFS10 of r273385 (r273218,r273235 in HEAD)

Approved by: re (gjb)

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273386 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFstable10 r273354:
gjb [Tue, 21 Oct 2014 02:41:40 +0000 (02:41 +0000)]
MFstable10 r273354:
  MFC r273204:
  Add more descriptive metadata to the ISO images.

MFstable10 r273355:
  Fix label for the UEFI bootonly cd.

PR: 165876
Approved by: re (hrs)
Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273364 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFS10 r273272 (r273143 in head):
mav [Mon, 20 Oct 2014 07:15:04 +0000 (07:15 +0000)]
MFS10 r273272 (r273143 in head):
Remove setting BIO_DONE flag for BIOs that have done() method.

This fixes use-after-free, caused by geom_disk, completing same BIO twice
to save extra allocation, and getting BIO_DONE set after the first.

Approved by: re (hrs)

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273304 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC10 r273275 (r273168 in head):
tuexen [Mon, 20 Oct 2014 05:17:16 +0000 (05:17 +0000)]
MFC10 r273275 (r273168 in head):
Fix the reported streams in a SCTP_STREAM_RESET_EVENT, if a
sent incoming stream reset request was responded with failed
or denied.
Thanks to Peter Bostroem from Google for reporting the issue.

Approved by: re (hrs)
Sponsored 2y:

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273303 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFS10 r273296 (r273219 in HEAD):
emaste [Mon, 20 Oct 2014 03:17:48 +0000 (03:17 +0000)]
MFS10 r273296 (r273219 in HEAD):

  Do nothing in vt_upgrade if there is no vt driver

  Previously, if no drivers attached at boot we would panic with
  "vtbuf_fill_locked begin.tp_row 0 must be < screen height 0".

PR: 192248
Approved by: re

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273300 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFS10 r273294 (r273178 in HEAD):
emaste [Mon, 20 Oct 2014 01:45:40 +0000 (01:45 +0000)]
MFS10 r273294 (r273178 in HEAD):

  Update vt(4) for UEFI defaults and special keys

  vt(4) is the default console for UEFI boot [1], and the bitmapped
  kern.vt.spclkeys sysctl has been replaced with individual kern.vt.kbd_*
  enable sysctls.

PR: 193710
Approved by: re

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273297 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFS10 273238;
jhb [Fri, 17 Oct 2014 20:39:39 +0000 (20:39 +0000)]
MFS10 273238;
Properly set the timeout in a query_state.  The global query_timeout
configuration value is an integer count of seconds, it is not a timeval.
Using memcpy() to copy a timeval from it put garbage into the tv_usec
field.

PR: 194025
Approved by: re (gjb)

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273240 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFS10 r273232 (HEAD r257302 by rea):
emaste [Fri, 17 Oct 2014 16:32:27 +0000 (16:32 +0000)]
MFS10 r273232 (HEAD r257302 by rea):

  binutils/bfd: fix printf-like format strings for "bfd *" arguments

  There is a special format argument '%B' that directly handles values
  of type 'bfd *', they must be used instead of '%s'.  Manifestations
  of this bug can be seen in ld(1) error messages, for example,
    http://lists.freebsd.org/pipermail/freebsd-current/2013-August/043580.html
    http://lists.freebsd.org/pipermail/freebsd-current/2013-October/045404.html

Approved by: re

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273233 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoFill in the security advisories section.
gjb [Fri, 17 Oct 2014 16:02:34 +0000 (16:02 +0000)]
Fill in the security advisories section.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273231 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoDocument the current version of pkg(8) for the release.
gjb [Fri, 17 Oct 2014 15:37:48 +0000 (15:37 +0000)]
Document the current version of pkg(8) for the release.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273230 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoRemove empty sections.
gjb [Fri, 17 Oct 2014 15:34:27 +0000 (15:34 +0000)]
Remove empty sections.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273229 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoRewrap a paragraph to conform to FDP style.
gjb [Fri, 17 Oct 2014 15:31:04 +0000 (15:31 +0000)]
Rewrap a paragraph to conform to FDP style.
Fix a wording nit while here.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273228 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoDocument r273199, support for building VM images for the Microsoft
gjb [Fri, 17 Oct 2014 15:31:02 +0000 (15:31 +0000)]
Document r273199, support for building VM images for the Microsoft
Azure platform.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273227 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoDocument r273101, support for building VM images as part of the
gjb [Fri, 17 Oct 2014 15:31:00 +0000 (15:31 +0000)]
Document r273101, support for building VM images as part of the
release process.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273226 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoDocument r273098, options for displaying mkimg(1) internals
gjb [Fri, 17 Oct 2014 15:30:58 +0000 (15:30 +0000)]
Document r273098, options for displaying mkimg(1) internals

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273225 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoDocument r272819, mkimg(1) QCOW and QCOW2 support.
gjb [Fri, 17 Oct 2014 15:30:55 +0000 (15:30 +0000)]
Document r272819, mkimg(1) QCOW and QCOW2 support.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273224 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoAdd a section for periodic(8) scripts.
gjb [Fri, 17 Oct 2014 15:30:53 +0000 (15:30 +0000)]
Add a section for periodic(8) scripts.
Document r272430, 110.clean-tmps: avoid crossing filesystem
mount boundaries when cleaning /tmp.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273223 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoDocument r272078, addition of /usr/lib32/compat to the default
gjb [Fri, 17 Oct 2014 15:30:51 +0000 (15:30 +0000)]
Document r272078, addition of /usr/lib32/compat to the default
ld-elf32.so.1 search path.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273222 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFS10 r273057
smh [Fri, 17 Oct 2014 13:46:16 +0000 (13:46 +0000)]
MFS10 r273057
MFC r272324
Fix a missed merge introduced in r272883

Approved by: re@ (gjb)
Sponsored by: Multiplay

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273217 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFS10 r273161
smh [Fri, 17 Oct 2014 13:35:56 +0000 (13:35 +0000)]
MFS10 r273161
MFC r273158
Prevent ZFS leaking pool free space

Approved by: re@ (gjb)
Sponsored by: Multiplay

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273215 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFstable10 r273198:
gjb [Thu, 16 Oct 2014 23:25:38 +0000 (23:25 +0000)]
MFstable10 r273198:
MFC r273093, r273096:

r273093:
  Merge the following from ^/projects/release-vmimage:
  r272436, r272437, r272792:

  r272436:
    Remove the first argument to panic(), which was initially
    intended to be the exit code, however when a non-zero exit
    code was returned to release/Makefile, this would prevent
    any remaining (and possibly successful) stages from being
    attempted.

  r272437:

    If the vm-base target fails, prevent the vm-image target
    from being run since it cannot possibly succeed.

  r272792:

    Add /usr/local/bin and /usr/local/sbin to PATH, needed
    if third-party software needs to use utilities outside
    of the base system during post-install stages (indexinfo
    is one culprit).

r273096:
  Merge the following from ^/projects/release-vmimage:
  r273076, r273077, r273079, r273095:

  r273076:
    Add a separate make(1) target to release/Makefile to
    build FreeBSD virtual machine disk images for use on
    the Microsoft Azure service.

    For now, this target is not directly connected to the
    build, however can be manually invoked.

    The 'vm-azure' target invokes {amd64,i386}/mk-azure.sh,
    which does the heavy lifting to produce proper VHDs.
    mk-azure.sh uses a configuration file, defaulting to
    tools/azure.conf if otherwise unset.

  r273077:
    Clear VM_RC_LIST.

  r273079:
    Fix signal list to trigger umount(8).

  r273095:
    Output an informational message when mkimg(1) runs, so it
    does not appear that the process has stopped while waiting
    for a 'y/n' response when waagent is deprovisioned.

Relnotes: yes
Approved by: re (delphij)
Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273199 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMerge r273184, r273185 from stable/10:
glebius [Thu, 16 Oct 2014 23:03:04 +0000 (23:03 +0000)]
Merge r273184, r273185 from stable/10:
  - Use rn_detachhead() instead of direct free(9) for radix tables.
  - Free radix mask entries on main radix destroy.

PR: 194078
Approved by: re (gjb)

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273196 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFS r273191: MFC r273060:
delphij [Thu, 16 Oct 2014 22:20:38 +0000 (22:20 +0000)]
MFS r273191: MFC r273060:

Use write_psize instead of write_asize when doing vdev_space_update.
Without this change the accounting of L2ARC usage would be wrong and
give 16EB free space because the number became negative and overflows.

Approved by: re (gjb)

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273192 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFH (r272173): offer to enable local_unbound after installation
des [Thu, 16 Oct 2014 22:07:43 +0000 (22:07 +0000)]
MFH (r272173): offer to enable local_unbound after installation

Approved by: re (gjb)

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273190 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFS r272855, 266846:
hrs [Thu, 16 Oct 2014 22:00:24 +0000 (22:00 +0000)]
MFS r272855, 266846:

  - Do not override sin6_scope_id in LLA when it is already set to non-zero.
    This fixes destination list in output of netstat -r.
  - Plug a memory leak.
  - Add RTM_VERSION check.
  - Fix a bug which can make sysctl() fail when -F is specified.
  - Increase WID_IF_DEFAULT() from 6 to 8 (the default for AF_INET6) because
    we have interfaces with longer names than 6 chars like epairN{a,b}.
  - Style fixes.

MFS r272847:

  - Add rwlock to struct dadq.  A panic could occur when a large number of
    addresses performed DAD at the same time.

MFS r272850:

  - Replace Sun RPC license in TI-RPC library with a 3-clause BSD license,
    with the explicit permission of Sun Microsystems in 2009.

  - Replace Sun Industry Standards Source License for Sun RPC code with a
    3-clause BSD license as specified by Oracle America, Inc. in 2010.
    This license change was approved by Wim Coekaerts, Senior Vice
    President, Linux and Virtualization at Oracle Corporation.

  - Replace Sun RPC license with a 3-clause BSD license.  This license change
    was approved in 2010 by Wim Coekaerts, Senior Vice President, Linux and
    Virtualization at Oracle Corporation.

  - Replace Sun RPC license for TI-RPC library with a 3-clause BSD license,
    with the explicit permission of Sun Microsystems in 2009.
    The code in question in this file was copied from
    lib/libc/rpc/pmap_getport.c.

MFS r272852,r272853:

  - Add relative specification in expiration time.
  - Add proto3 option for RTF_PROTO3.
  - Use %lu for members of struct rt_metrics.
  - Use long explicitly for the time difference.

MFS r272854:

  -  Return 0 if:

      1. "-u N" specified, no -f, and mdN found,
      2. no -u, "-f /pathname" specified, and mdN associated with
         /pathname found,
      3. "-u N" specified, "-f /pathname" specified, and both of them found,
      4. "-l" specified and no -f,
      5. "-l" specified, "-f /pathname" specified, and /pathname found.

    otherwise return -1.

MFS r272856:

  - Move configuration of IPv6 NDP flags to a point before handling ifconfig_IF.
    This fixes a race that a non-IPv4 interface can get an EUI64 LLA even if it
    has IFDISABLED nd6 flag at boot time.

MFS r272857:

  - Cancel DAD for an ifa when the ifp has ND6_IFF_IFDISABLED as early as
    possible and do not clear IN6_IFF_TENTATIVE.  If IFDISABLED was accidentally
    set after a DAD started, TENTATIVE could be cleared because no NA was
    received due to IFDISABLED, and as a result it could prevent DAD when
    manually clearing IFDISABLED after that.

MFS r272858:

  - Fix an issue in range specification handling when a "-foo" is specified in
    ifconfig_IF_aliasN.

MFS r272859:

  - Fix EtherIP.  TOS field must be initialized when the inner protocol is
    PF_LINK, and multicast/broadcast flag should always be dropped because
    the outer protocol uses unicast even when the inner address is not for
    unicast.  It had been broken since r236951 when gif_output() started to
    use IFQ_HANDOFF().

MFS r272860:

  - Recover sin6_scope_id of gateway addresses in riprecv() by using the
    if_index where a RIP packet was received.  This fixes a bug which
    prevented gateway addresses in fe80::/64 from being added.

MFS r272861:

  - Fix rc.d/gssd script to define the default values in a standard way.
  - Use a parameter argument in jls(8) instead of doing grep.

MFS r272862, r272870:

  - Restructure rc.d scripts for kerberos5 daemons.

MFS r272863:

  - Return false status only when adding a route is failed.  It could
    erroneously return false due to an afexists() check loop in routing_start().

MFS r272864:

  - Use ipv6_prefer when at least one ifconfig_IF_ipv6 is configured.

MFS r272865:

  - Fix a bug which prevented mount.fstab parameter from being converted
    when jail_JID_devfs_enable=NO.

MFS r272866:

  -  Fix header output when -P is specified and (ncpus - 1) != maxid.

MFS r272867:

  - Fix a bug which could break extended attributes in a dump output.
    This occurred when a file was >892kB long and had a large data (>1kB)
    in the extended attributes.

MFS r272868, r272869:

  - Make net.inet.ip.sourceroute, net.inet.ip.accept_sourceroute, and
    net.inet.ip.process_options vnet-aware.

MFS r272871:

  - Revert changes in r269180.  It could cause -c N option to enter an
    infinite loop if no reply packet is received.

MFS r272874:

  - Resurrect set_rcvar() as a function to define a rc.conf variable.
    It defines a variable and its default value in load_rc_config() just after
    rc.conf is loaded.  "rcvar" command shows the current and the default
    values.

MFS r272960:

  - Do not add late flag when file= is specified because it has a bad
    side-effect.  The specified file should exist before the fstab line.

Approved by: re (gjb)

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273188 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFH (r272830): change the hardcoded default back to DES
des [Thu, 16 Oct 2014 21:39:04 +0000 (21:39 +0000)]
MFH (r272830): change the hardcoded default back to DES
MFH (r272833): remove last vestige of MD5 password hashes

Approved by: re (gjb)

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273187 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoRevert r270120 (partial), r270122:
gjb [Thu, 16 Oct 2014 15:44:47 +0000 (15:44 +0000)]
Revert r270120 (partial), r270122:
  Restore ABI compatibility with 10.0-RELEASE.

Requested by: many
Reviewed by: delphij, ache
Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273169 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFS10 r272883
smh [Thu, 16 Oct 2014 08:39:44 +0000 (08:39 +0000)]
MFS10 r272883
MFC r272474
Fix ZFS ZVOL deadlock and rename issues

Approved by: re@ (delphij)
Sponsored by: Multiplay

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273162 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r273109:
mjg [Wed, 15 Oct 2014 16:54:18 +0000 (16:54 +0000)]
MFC r273109:

fget_unlocked currently reads 'fde' which is a structure consisting of
serveral fields. In effect the read is inatomic and may result in
obtaining file pointer with stale or incorrect capabilities.

Example race is with dup2.

Side effect is that capability checks can be circumvented.

Fix the problem with introduction of sequence counters.

MFC r269023,r272503,r272505,r272523,r272567,r272569,r272574:

Prepare fget_unlocked for reading fd table only once.

Some capsicum functions accept fdp + fd and lookup fde based on that.
Add variants which accept fde.

===============================

Add sequence counters with memory barriers.

Current implementation is somewhat simplistic and hackish,
will be improved later after possible memory barrier overhaul.

===============================

Plug capability races.

fp and appropriate capability lookups were not atomic, which could result in
improper capabilities being checked.

This could result either in protection bypass or in a spurious ENOTCAPABLE.

Make fp + capability check atomic with the help of sequence counters.

===============================

Put and #ifdef _KERNEL around the #include for opt_capsicum.h to
hopefully allow the build to finish after r272505.

===============================

filedesc: fix up breakage introduced in 272505

Include sequence counter supports incoditionally [1]. This fixes reprted build
problems with e.g. nvidia driver due to missing opt_capsicum.h.

Replace fishy looking sizeof with offsetof. Make fde_seq the last member in
order to simplify calculations.

===============================

Keep struct filedescent comments within 80-char limit.

===============================

seq_t needs to be visible to userspace

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273137 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMake external NFS clients know when files have their attributes changed and
araujo [Wed, 15 Oct 2014 06:31:08 +0000 (06:31 +0000)]
Make external NFS clients know when files have their attributes changed and
avoid cache the file's state indefinitely. The va_filerev is what is sent
to the client as the "change" attribute, the client is periodically fetching
the attributes and without this option the attribute remains as some garbage
value.

Reported by: Kevin Buhr <buhr@asaurus.net>
Reviewed by: delphij
Approved by: re (gjb), delphij
Obtained from: r272467

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273122 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoUpdate the pkg(8) repository configuration file for the
gjb [Wed, 15 Oct 2014 05:24:43 +0000 (05:24 +0000)]
Update the pkg(8) repository configuration file for the
dvd package set 10.1-RELEASE to use the release packages.

This is a direct commit to releng/10.1.

Approved by: re (rodrigc)
Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273120 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMF10 r273000 (r272750 in head)
tuexen [Tue, 14 Oct 2014 19:38:31 +0000 (19:38 +0000)]
MF10 r273000 (r272750 in head)
Ensure that the number of stream reported in srs_number_streams is
consistent with the amount of data provided in the SCTP_RESET_STREAMS
socket option.
Thanks to Peter Bostroem from Google for drawing my attention to
this part of the code.

MF10 r273001 (r272751 in head):
Ensure that the list of streams sent in a stream reset parameter fits
in an mbuf-cluster.
Thanks to Peter Bostroem for drawing my attention to this part of the code.

MF10 r273002 (r272841 in head):
Ensure that the flags field of sctp_tmit_chunks is initialized.
Thanks to Peter Bostroem from Google for reporting the issue.

Approved by: re (marius)

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273106 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agovt(4): Don't recalculate buffer size if we don't know screen size
dumbbell [Tue, 14 Oct 2014 19:10:00 +0000 (19:10 +0000)]
vt(4): Don't recalculate buffer size if we don't know screen size

MF10: r273037
MFC: r272537

When the screen size is unknown, it's set to 0x0. We can't use that as
the buffer size, otherwise, functions such as vtbuf_fill() will fail.

This fixes a panic on RaspberryPi, where there's no vt(4) backend
configured early in boot.

PR: 193981
Tested by: danilo@
Approved by: re (marius)

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273104 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agovt(4): Save/restore keyboard mode & LED states when switching window
dumbbell [Tue, 14 Oct 2014 19:01:11 +0000 (19:01 +0000)]
vt(4): Save/restore keyboard mode & LED states when switching window

MF10: r273036
MFC: r272416

Add new functions to manipulate these mode & state, instead of calling
kbdd_ioctl() everyhere.

This fixes at least two bugs:

    1. The state of the Scroll Lock LED and the state of scroll mode
       could be out-of-sync. For instance, if one enables scroll mode on
       window #1 and switches to window #2, the LED would remain on, but
       the window wouldn't be in scroll mode.

       Similarily, when switching between a console and an X.Org
       session, the LED states could be inconsistent with the real
       state.

    2. When exiting from an X.Org session, the user could be unable to
       type anything. The workaround was to switch to another console
       window and come back.

Differential Revision: https://reviews.freebsd.org/D821
Reviewed by: ray@
Approved by: re (marius), ray@
Tested by: kwm@

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273103 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFstable10 r273080:
gjb [Tue, 14 Oct 2014 17:13:47 +0000 (17:13 +0000)]
MFstable10 r273080:

MFC r272414:
  Merge the following revisions from ^/projects/release-vmimage:

  r272234, r272236, r272262, r272264, r272269, r272271, r272272,
  r272277, r272279, r272376, r272380, r272381, r272392, r272234,
  r272412:

  r272234:
    Initial commit to include virtual machine images as part
    of the FreeBSD release builds.

    This adds a make(1) environment variable requirement,
    WITH_VMIMAGES, which triggers the virtual machine image
    targets when not defined to an empty value.

    Relevant user-driven variables include:

     o VMFORMATS: The virtual machine image formats to create.
       Valid formats are provided by running 'mkimg --formats'

     o VMSIZE: The size of the resulting virtual machine
       image.  Typical compression is roughly 140Mb, regardless
       of the target size (10GB, 15GB, 20GB, 40GB sizes have been
       tested with the same result).

     o VMBASE: The prefix of the virtual machine disk images.
       The VMBASE make(1) environment variable is suffixed with
       each format in VMFORMATS for each individual disk image, as
       well as '.img' for the source UFS filesystem passed to
       mkimg(1).

    This also includes a new script, mk-vmimage.sh, based on how
    the VM images for 10.0-RELEASE, 9.3-RELEASE, and 10.1-RELEASE
    were created (mk-vmimage.sh in ^/user/gjb/thermite/).

    With the order in which the stages need to occur, as well as
    sanity-checking error cases, it makes much more sense to
    execute a shell script called from make(1), using env(1) to
    set specific parameters for the target image than it does to
    do this in make(1) directly.

  r272236:
    Use VMBASE in place of a hard-coded filename in the CLEANFILES
    list.

  r272262:
    Remove a 'set -x' that snuck in during testing.

  r272264:
    release/Makefile:
      Connect the virtual machine image build to the release
      target if WITH_VMIMAGES is set to a non-empty value.

    release/release.sh:
      Add WITH_VMIMAGES to RELEASE_RMAKEFLAGS.

    release/release.conf.sample:
      Add commented entries for tuning the release build if the
      WITH_VMIMAGES make(1) environment variable is set to
      a non-empty value.

  r272269:
    release/Makefile:
      Include .OBJDIR in DESTDIR in the vm-base target.

    release/release.sh:
      Provide the full path to mddev.

  r272271:
    Fix UFS label for the root filesystem.

  r272272:
    Remove comments left in accidentally while testing, so the
    VM /etc/fstab is actually created.

  r272277:
    Remove the UFS label from the root filesystem since it is added
    by mkimg(1) as a gpt label, consistent with the fstab(5) entry.

  r272279:
    Comment cleanup in panic() message when mkimg(1) does not support
    the requested disk image format.

  r272376:
    Separate release/scripts/mk-vmimage.sh to machine-specific
    scripts, making it possible to mimic the functionality for
    non-x86 targets.

    Move echo output if MAKEFLAGS is empty outside of usage().

    Remove TARGET/TARGET_ARCH evaluation.

  r272380:
    Avoid using env(1) to set values passed to mk-vmimage.sh,
    and instead pass the values as arguments to the script,
    making it easier to run this by hand, without 'make release'.

    Add usage_vm_base() and usage_vm_image() usage helpers.

  r272381:
    After evaluating WITH_VMIMAGES is non-empty, ensure
    the mk-vmimage.sh script exists before running it.

  r272392:
    Add WITH_COMPRESSED_VMIMAGES variable, which when set enables
    xz(1) compression of the virtual machine images.

    This is intentionally separate to allow more fine-grained
    tuning over which images are compressed, especially in cases
    where compressing 20GB sparse images can take hours.

  r272412:
    Document the new 'vm-image' target, and associated release.conf
    variables.

  r272413:
    Remove two stray comments added during the initial iterations
    of testing, no longer needed.

Approved by: re (marius)
Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273101 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r272907:
kib [Tue, 14 Oct 2014 16:28:37 +0000 (16:28 +0000)]
MFC r272907:
Make MAP_NOSYNC handling in the vm_fault() read-locked object path
compatible with write-locked path.

Approved by: re (marius)

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273099 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMF10 r272774:
marcel [Tue, 14 Oct 2014 16:11:23 +0000 (16:11 +0000)]
MF10 r272774:
Add 3 long options (--version, --formats & --schemes) for getting
information about mkimg itself.

mkimg version: 20140927

Requested by: gjb
Approved by: re (marius)
Relnotes: yes

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273098 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoFix rendering of a URL.
gjb [Tue, 14 Oct 2014 12:49:49 +0000 (12:49 +0000)]
Fix rendering of a URL.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273083 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years ago- Correct the FreeBSD release displayed on the 10.1-R errata
gjb [Tue, 14 Oct 2014 12:40:52 +0000 (12:40 +0000)]
- Correct the FreeBSD release displayed on the 10.1-R errata
  page.
- Trim stale errata items from 10.0-RELEASE, but keep the
  entry regarding FreeBSD/i386 on VirtualBox, as I am unsure
  if the underlying cause was identified and/or corrected.
- Fix a few occurances of 'release.prev' macros that should
  be 'release.current'. [1]
- Switch release.ent entities to reflect a release, and update
  versions where appropriate.

Submitted by: pluknet [1]
Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273082 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFS r272577,r272577:
bdrewery [Mon, 13 Oct 2014 14:52:54 +0000 (14:52 +0000)]
MFS r272577,r272577:

- Add $netif_ipexpand_max to specify the upper limit for the number of
  addresses generated by an address range specification.  The default value
  is 2048.  This can be increased by setting $netif_ipexpand_max in rc.conf.

PR: 186841
Approved by: re (hrs)

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273039 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFS: r272543 (r271351 on HEAD)
alc [Sun, 12 Oct 2014 18:53:45 +0000 (18:53 +0000)]
MFS: r272543 (r271351 on HEAD)
  Fix a boundary case error in vm_reserv_alloc_contig().

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273007 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r272627:
tuexen [Sun, 12 Oct 2014 17:07:15 +0000 (17:07 +0000)]
MFC r272627:
Checksum coverage values larger than 65535 for UDPLite are invalid.
Check for this when the user calls setsockopt using UDPLITE_{SEND,RECV}CSCOV.

MFC r272628:
When plen != ulen, it should only be checked when this is UDP.

MFC r272645:
If the checksum coverage field in the UDPLITE header is the length
of the complete UDPLITE packet, the packet has full checksum coverage.
So fix the condition.

MFC r272660:
UDPLite requires a checksum. Therefore, discard a received packet if
the checksum is 0.

MFC r272661:
The default for UDPLITE_RECV_CSCOV is zero. RFC 3828 recommend
that this means full checksum coverage for received packets.
If an application is willing to accept packets with partial
coverage, it is expected to use the socket option and provide
the minimum coverage it accepts.

MFC r272662:
Fix the checksum computation for UDPLite/IPv6. This requires the
usage of a function computing the checksum only over a part of the function.
Therefore introduce in6_cksum_partial() and implement in6_cksum() based
on that.
While there, ensure that the UDPLite packet contains at least enough bytes
to contain the header.

MFC r272663:
Check for UDP/IPv6 packets that the length in the UDP header is at least
the minimum. Make the check similar to the one for UDPLite/IPv6.

MFC r272664:
UDP/IPv6 and UDPLite/IPv6 require a checksum. So check for it.

MFC r272754:
Fix a bug introduced in
https://svnweb.freebsd.org/base?view=revision&revision=272347

Approved by: re (gjb)

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@272991 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFS r272892 (r272713 in head):
bz [Sun, 12 Oct 2014 10:39:59 +0000 (10:39 +0000)]
MFS r272892 (r272713 in head):

 Since introducing the extra mapping in r250103 (head) for architectural performance
 events we have actually counted 'Branch Instruction Retired' when people
 asked for 'Unhalted core cycles' using the 'unhalted-core-cycles' event mask
 mnemonic.

 Reviewed by: jimharris
 Discussed with: gnn, rwatson
Sponsored by: DARPA/AFRL
Approved by: re (gjb)

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@272981 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFS r272922: Correct scale factor for T terabyte suffix
emaste [Sun, 12 Oct 2014 00:34:18 +0000 (00:34 +0000)]
MFS r272922: Correct scale factor for T terabyte suffix

PR: 194250
Approved by: re

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@272975 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoUpdate releng/10.1 to -RC2 as part of the 10.1-RELEASE cycle.
gjb [Fri, 10 Oct 2014 00:24:45 +0000 (00:24 +0000)]
Update releng/10.1 to -RC2 as part of the 10.1-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@272876 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMF10 r272773: Add QCOW v1 & v2 support
marcel [Thu, 9 Oct 2014 13:36:37 +0000 (13:36 +0000)]
MF10 r272773: Add QCOW v1 & v2 support

Requested by: gjb@
Approved by: re (marius)
Relnotes: yes

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@272819 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r272270:
neel [Wed, 8 Oct 2014 15:39:24 +0000 (15:39 +0000)]
MFC r272270:

tty_rel_free() can be called more than once for the same tty so make sure
that the tty is dequeued from 'tty_list' only the first time.

Approved by: re (glebius)

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@272752 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r272224: Fix page length reported for Block Limits VPD page.
mav [Tue, 7 Oct 2014 10:36:06 +0000 (10:36 +0000)]
MFC r272224:  Fix page length reported for Block Limits VPD page.

Approved by: re (marius)

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@272684 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r272549:
rodrigc [Tue, 7 Oct 2014 08:23:37 +0000 (08:23 +0000)]
MFC r272549:

Fix pkill unit test

Approved by: re (gjb)

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@272682 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r272308: Fix old iSCSI initiator to work with new CAM locking.
mav [Mon, 6 Oct 2014 20:38:55 +0000 (20:38 +0000)]
MFC r272308: Fix old iSCSI initiator to work with new CAM locking.

This switches code to using xpt_rescan() routine, irrelevant to locking.
Using xpt_action() directly requires knowledge about higher level locks,
that SIM does not need to have.

This code is obsolete, but that is not a reason to crash.

Approved by: re (marius)

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@272669 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r272480:
hselasky [Mon, 6 Oct 2014 12:08:47 +0000 (12:08 +0000)]
MFC r272480:
When we fail to get a USB reference we should just return, because
there are no more references held.

Approved by: re, marius

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@272612 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC: r272398
bapt [Mon, 6 Oct 2014 12:08:14 +0000 (12:08 +0000)]
MFC: r272398

Make sure to not skip any argument when converting from deprecated
+POS1, -POS2 to -kPOS1,POS2, so that sort +0n gets translated to sort -k1,1n
as it is expected

PR: 193994
Submitted by: rodrigo
Approved by: re (marius)

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@272611 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoMFC r272349, r272422 and r272479:
hselasky [Mon, 6 Oct 2014 11:05:56 +0000 (11:05 +0000)]
MFC r272349, r272422 and r272479:
- Fix XHCI driver for devices which have more than 15 physical root HUB
  ports. The current bitmap array was too small to hold more than 16
  bits and would at some point toggle the context size, which then would
  trigger an enumeration fault and cause a fallback to the EHCI
  companion controller, if any.
- Make sure we always set the maximum number of valid contexts.
- Set default cycle state in case of early interrupts.

Approved by: re, marius

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@272608 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoBump __FreeBSD_version after releng/10.1 branch.
gjb [Fri, 3 Oct 2014 00:58:34 +0000 (00:58 +0000)]
Bump __FreeBSD_version after releng/10.1 branch.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@272463 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoClean vestigial svn:mergeinfo from stable/10 -> releng/10.1
gjb [Fri, 3 Oct 2014 00:52:20 +0000 (00:52 +0000)]
Clean vestigial svn:mergeinfo from stable/10 -> releng/10.1
branch.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@272462 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

9 years agoCopy stable/10@r272459 to releng/10.1 as part of
gjb [Fri, 3 Oct 2014 00:49:11 +0000 (00:49 +0000)]
Copy stable/10@r272459 to releng/10.1 as part of
the 10.1-RELEASE process.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@272461 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f