]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/log
FreeBSD/stable/8.git
9 years agoMFC 276065:
jhb [Fri, 6 Feb 2015 18:41:57 +0000 (18:41 +0000)]
MFC 276065:
Explicitly treat timeouts when waiting for IBF or OBF to change state as an
error.  This fixes occasional hangs in the IPMI kcs thread when using
ipmitool locally.

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

9 years agoMFC r277136:
hselasky [Thu, 5 Feb 2015 22:03:12 +0000 (22:03 +0000)]
MFC r277136:
Resolve a special case deadlock: When two or more threads are
simultaneously detaching kernel drivers on the same USB device we can
get stuck in the "usb_wait_pending_ref_locked()" function because the
conditions needed for allowing detach are not met.

While at it ensure that "flag_iserror" is only written when "priv_mtx"
is locked, which is protecting it.

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

9 years agoMFC r277179, r277199 and r277391:
hselasky [Thu, 5 Feb 2015 21:53:41 +0000 (21:53 +0000)]
MFC r277179, r277199 and r277391:
Add a kernel function to delist our kernel character devices, so that
the device name can be re-used right away in case we are destroying
the character devices in the background.

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

9 years agoMFC 274402:
jhb [Thu, 5 Feb 2015 20:59:48 +0000 (20:59 +0000)]
MFC 274402:
Add device ID for the T502-BT (dual-port 1G) adapter.

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

9 years agoAdd the 'security.url' macro to stable/9 and stable/8
gjb [Thu, 5 Feb 2015 19:31:41 +0000 (19:31 +0000)]
Add the 'security.url' macro to stable/9 and stable/8
branches, and replace hard-coded (and inconsistent) URLs
in security.xml and errata.xml.

Prefer https:// over http://.

Sponsored by: The FreeBSD Foundation

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

9 years agoApply r278265 from head:
gjb [Thu, 5 Feb 2015 19:10:32 +0000 (19:10 +0000)]
Apply r278265 from head:

Security Advisory information is included on several
pages in the release notes.  Rather than duplicating
the information between various files, add two new
files to include in all pages that currently display
the information.

Bump copyright year.

Move SAs and ENs into their respective files.

Add missing ENs and SAs.

Remove stale SAs [1].

Reported by: bdrewery (over a year ago)
Sponsored by: The FreeBSD Foundation

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

9 years agoMFC r277433: MFV r277432:
delphij [Wed, 4 Feb 2015 00:52:58 +0000 (00:52 +0000)]
MFC r277433: MFV r277432:

Plug various memory leaks in libzfs import implementation.

Illumos issue:
    5518 Memory leaks in libzfs import implementation

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

9 years agoMFC r277246:
hselasky [Wed, 28 Jan 2015 19:57:40 +0000 (19:57 +0000)]
MFC r277246:
Add more USB device IDs.

PR: 196362

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

9 years agoMFC r277245:
hselasky [Wed, 28 Jan 2015 19:54:39 +0000 (19:54 +0000)]
MFC r277245:
Add more USB request definitions. The values are described in section
9.4.11 and 9.4.12 of the "Universal Serial Bus 3.0 Specification"

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

9 years agoFix SCTP SCTP_SS_VALUE kernel memory corruption and disclosure vulnerability
delphij [Tue, 27 Jan 2015 19:36:08 +0000 (19:36 +0000)]
Fix SCTP SCTP_SS_VALUE kernel memory corruption and disclosure vulnerability
and SCTP stream reset vulnerability.

Security: FreeBSD-SA-15:02.kmem
Security: CVE-2014-8612
Security: FreeBSD-SA-15:03.sctp
Security: CVE-2014-8613

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

9 years agoMFC r239237, r242628 and r277044:
hselasky [Mon, 19 Jan 2015 07:16:22 +0000 (07:16 +0000)]
MFC r239237, r242628 and r277044:
- Add the UQ_MSC_NO_PREVENT_ALLOW quirk to handle devices that do not support
  the 'PREVENT/ALLOW MEDIUM REMOVAL' SCSI command.
- Improve auto-quirks detection for certain Kingston memory sticks.
- Increase the maximum number of dynamic USB quirks. USB memory stick
  devices which don't support the synchronize cache SCSI command are
  likely to also not support the prevent-allow medium removal SCSI
  command.

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

9 years agoMFC r276959:
np [Sun, 18 Jan 2015 20:40:08 +0000 (20:40 +0000)]
MFC r276959:
cxgb: replace r273280 with a more comprehensive fix.

Poll for link state when the link is down, even for interrupt capable
PHYs.

Allow PHYs to report a dubious "partial" link.  If this state is seen 3
consecutive times (each check is ~1s apart) then reset the PHY.  This is
a workaround for a situation where repeatedly toggling the link from the
peer gets the AEL2005 PHY into a state where it never establishes a PCS
block lock even when everything is in order.

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

9 years agoCorrect comparison of IPv6 wildcard address.
ume [Sun, 11 Jan 2015 18:56:16 +0000 (18:56 +0000)]
Correct comparison of IPv6 wildcard address.

MFH: r276814

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

9 years agoMFC r276532 and r276626:
hselasky [Sun, 11 Jan 2015 12:21:39 +0000 (12:21 +0000)]
MFC r276532 and r276626:
The "cnputs_mtx" mutex must be allowed to recurse. Debug prints and/or
witness printouts in the console driver clients can cause this mutex
to recurse by calls to "printf()" from witness for example. In
particular this can happen if "debug.witness.skipspin=0" is set in the
boot environment.

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

9 years agoMFC r251499, r271156, r276321, r276404, r276407, r276799 and r273376:
hselasky [Sun, 11 Jan 2015 12:01:46 +0000 (12:01 +0000)]
MFC r251499, r271156, r276321, r276404, r276407, r276799 and r273376:
Various XHCI fixes and improvements:
- Add IDs for Intel Patsburg USB 2.0 controller (dependancy).
- Add support for polling the XHCI interrupt handler when
  the regular interrupt handler is not working properly or
  in case of MSI interrupts which are not yet supported.
  Remove interrupt setup code for FreeBSD versions older
  than 700031.
- Improve and fix MSI interrupt allocation, setup and release.
- Add missed flushing of data which can happen when "xhci_configure_mask()"
  is called from "xhci_configure_reset_endpoint()". Ensure the 3-strikes
  error feature is always enabled except for ISOCHRONOUS transfers.
- Allow systems having a page size greater than 4K to use fewer
  scatter-gather XHCI TRB entries for its payload data. The XHCI
  controller can handle at least 65536 bytes per scatter-gather list
  entry.
- Add the Intel BayTrail USB device which needs port routing for USB 3.0.

PR: 179342

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

9 years agoMerge OpenSSL 0.9.8zd.
jkim [Fri, 9 Jan 2015 01:11:43 +0000 (01:11 +0000)]
Merge OpenSSL 0.9.8zd.

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

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

Plug a memory leak.

Obtained from: DragonFlyBSD (commit 5119ece)

git-svn-id: svn://svn.freebsd.org/base/stable/8@276555 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/8@276471 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

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

  Bump copyright year.

  Happy New Year 2015!

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

9 years agoMFC: r272491
nyan [Tue, 23 Dec 2014 11:00:51 +0000 (11:00 +0000)]
MFC: r272491

  Reduce diffs against i386.

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

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

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

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

9 years agoMFC r276071:
delphij [Mon, 22 Dec 2014 19:08:09 +0000 (19:08 +0000)]
MFC r276071:

Fix multiple ntp vulnerabilities.

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

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

9 years agoMFC r275833:
kib [Fri, 19 Dec 2014 09:52:21 +0000 (09:52 +0000)]
MFC r275833:
The iret instruction may generate #np and #ss fault, besides #gp.
When returning to usermode, the handler for that exceptions is also
executed with wrong gs base.  Handle all three possible faults in the
same way, checking for iret fault, and performing full iret.

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

9 years agoMFC r275624:
hselasky [Mon, 15 Dec 2014 08:31:58 +0000 (08:31 +0000)]
MFC r275624:
Add port routing support for Wildcat Point.

PR: 195793

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

9 years agoMFC r275477:
dim [Thu, 11 Dec 2014 08:05:59 +0000 (08:05 +0000)]
MFC r275477:

Pull in r174303 from upstream gcc trunk (by Jason Merrill):

  PR c++/48211
  * name-lookup.h (cp_class_binding): Make base a pointer.
  * name-lookup.c (new_class_binding): Adjust.
  (poplevel_class): Adjust.

This fixes a potential segfault when compiling gold, a part of the
devel/binutils port, with gcc.  See also the upstream bug report:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48211

Thanks to Jason Merrill, Tom Callaway and Red Hat legal for approving
the use of this patch under the GNU GPL, version 2 or later.

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

9 years agoFix multiple vulnerabilities in file(1) and libmagic(3).
delphij [Wed, 10 Dec 2014 08:31:41 +0000 (08:31 +0000)]
Fix multiple vulnerabilities in file(1) and libmagic(3).

Security: FreeBSD-SA-14:28.file
Security: CVE-2014-3710, CVE-2014-8116, CVE-2014-8117

Fix BIND remote denial of service vulnerability.

Security: FreeBSD-SA-14:29.bind
Security: CVE-2014-8500

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

9 years agoMFC r274918:
hselasky [Mon, 1 Dec 2014 07:37:29 +0000 (07:37 +0000)]
MFC r274918:
Don't use the synchronization endpoint unless referenced by the
isochronous endpoint descriptor used for the data transfers, hence the
synchronization feature might not be supposed to be supported [yet].
This makes seamless playback synced with the USB HOST clock work with
the DN32-USB module for Midas audio systems and possibly other similar
products from Klark Teknik.

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

9 years agoMFC r274724:
np [Wed, 26 Nov 2014 00:48:07 +0000 (00:48 +0000)]
MFC r274724:
cxgbe(4): figure out the max payload size and save it for later.

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

9 years agoMFC r274900:
dim [Tue, 25 Nov 2014 13:29:13 +0000 (13:29 +0000)]
MFC r274900:

Fix the following -Werror warnings from clang 3.5.0, while building
bsnmpd's snmp_hostres module:

usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.c:204:20: error: absolute value function 'abs' given an argument of type 'const long' but has parameter of type 'int' which may cause truncation of value [-Werror,-Wabsolute-value]
        str[9] = (u_char)(abs(tm->tm_gmtoff) / 3600);
                          ^
usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.c:204:20: note: use function 'labs' instead
        str[9] = (u_char)(abs(tm->tm_gmtoff) / 3600);
                          ^~~
                          labs
usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.c:205:22: error: absolute value function 'abs' given an argument of type 'const long' but has parameter of type 'int' which may cause truncation of value [-Werror,-Wabsolute-value]
        str[10] = (u_char)((abs(tm->tm_gmtoff) % 3600) / 60);
                            ^
usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.c:205:22: note: use function 'labs' instead
        str[10] = (u_char)((abs(tm->tm_gmtoff) % 3600) / 60);
                            ^~~
                            labs

Since tm::tm_gmtoff is a long, use labs(3) instead.

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

9 years agoMFC r274898:
dim [Tue, 25 Nov 2014 13:12:45 +0000 (13:12 +0000)]
MFC r274898:

Fix the following -Werror warnings from clang 3.5.0, while building
usr.sbin/rtadvd:

usr.sbin/rtadvd/rtadvd.c:1291:7: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value]
                    abs(preferred_time - pfx->pfx_pltimeexpire) > rai->rai_clockskew) {
                    ^
usr.sbin/rtadvd/rtadvd.c:1291:7: note: remove the call to 'abs' since unsigned values cannot be negative
                    abs(preferred_time - pfx->pfx_pltimeexpire) > rai->rai_clockskew) {
                    ^~~
usr.sbin/rtadvd/rtadvd.c:1324:7: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value]
                    abs(valid_time - pfx->pfx_vltimeexpire) > rai->rai_clockskew) {
                    ^
usr.sbin/rtadvd/rtadvd.c:1324:7: note: remove the call to 'abs' since unsigned values cannot be negative
                    abs(valid_time - pfx->pfx_vltimeexpire) > rai->rai_clockskew) {
                    ^~~
2 errors generated.

These warnings occur because both preferred_time and pfx_pltimeexpire
are uint32_t's, so the subtraction expression is also unsigned, and
calling abs() is a no-op.

However, the intention was to look at the absolute difference between
the two unsigned quantities.  Introduce a small static function to
clarify what we're doing, and call that instead.

Reviewed by: hrs
Differential Revision: https://reviews.freebsd.org/D1197

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

9 years agoMFC r274847:
dim [Tue, 25 Nov 2014 12:45:31 +0000 (12:45 +0000)]
MFC r274847:

Fix the following -Werror warnings from clang 3.5.0, while building
usr.bin/locate:

usr.bin/locate/locate/util.c:249:29: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value]
                            MAXPATHLEN, abs(i) < abs(htonl(i)) ? i : htonl(i));
                                                 ^
usr.bin/locate/locate/util.c:249:29: note: remove the call to 'abs' since unsigned values cannot be negative
                            MAXPATHLEN, abs(i) < abs(htonl(i)) ? i : htonl(i));
                                                 ^~~
usr.bin/locate/locate/util.c:274:32: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value]
                            MAXPATHLEN, abs(word) < abs(htonl(word)) ? word :
                                                    ^
usr.bin/locate/locate/util.c:274:32: note: remove the call to 'abs' since unsigned values cannot be negative
                            MAXPATHLEN, abs(word) < abs(htonl(word)) ? word :
                                                    ^~~

The problem is that ntohl() always returns an unsigned quantity.  In
this case, it's expected to be cast back to a signed integer, but to
stop complaints about abs() we just store it into an integer, and don't
call ntohl() again.

Reviewed by: ngie
Differential Revision: https://reviews.freebsd.org/D1196

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

9 years agoMFC r273360:
np [Mon, 17 Nov 2014 07:38:23 +0000 (07:38 +0000)]
MFC r273360:

One of MAP_ANON, MAP_PRIVATE, MAP_SHARED, or MAP_STACK must be specified.

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

9 years agoMFC r274351:
np [Mon, 17 Nov 2014 07:20:53 +0000 (07:20 +0000)]
MFC r274351:

cxgbe(4): adjust PMRX and PMTX parameters.

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

9 years agoMFC of 274559,tzdata8:
edwin [Sun, 16 Nov 2014 04:12:25 +0000 (04:12 +0000)]
MFC of 274559,tzdata8:

Release 2014j - 2014-11-10 17:37:11 -0800

  Changes affecting current and future time stamps

    Turks & Caicos' switch from US eastern time to UTC-4 year-round
    did not occur on 2014-11-02 at 02:00.  It's currently scheduled
    for 2015-11-01 at 02:00.  (Thanks to Chris Walton.)

  Changes affecting past time stamps

    Many pre-1989 time stamps have been corrected for Asia/Seoul and
    Asia/Pyongyang, based on sources for the Korean-language Wikipedia
    entry for time in Korea.  (Thanks to Sanghyuk Jung.)  Also, no
    longer guess that Pyongyang mimicked Seoul time after World War II,
    as this is politically implausible.

    Some more zones have been turned into links, when they differed
    from existing zones only for older time stamps.  As usual,
    these changes affect UTC offsets in pre-1970 time stamps only.
    Their old contents have been moved to the 'backzone' file.
    The affected zones are: Africa/Addis_Ababa, Africa/Asmara,
    Africa/Dar_es_Salaam, Africa/Djibouti, Africa/Kampala,
    Africa/Mogadishu, Indian/Antananarivo, Indian/Comoro, and
    Indian/Mayotte.

  Changes affecting commentary

    The commentary is less enthusiastic about Shanks as a source,
    and is more careful to distinguish UT from UTC.

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

9 years agoMFC r273615:
np [Wed, 12 Nov 2014 20:26:50 +0000 (20:26 +0000)]
MFC r273615:

cxgbe(4): bump up PF4's share of some global resources.

This increases the size of the per-port RSS slice and also allows the
driver to use a larger number of tx and rx queues.

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

9 years agoMFC r273280:
np [Wed, 12 Nov 2014 20:09:48 +0000 (20:09 +0000)]
MFC r273280:

cxgb(4): reset the PHY if it generates an interrupt for no apparent reason.

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

9 years agoBump __FreeBSD_version after SA-14:23, SA-14:24,
gjb [Thu, 6 Nov 2014 02:41:38 +0000 (02:41 +0000)]
Bump __FreeBSD_version after SA-14:23, SA-14:24,
SA-14:25.

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

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

9 years agoMFC r271992
lwhsu [Wed, 5 Nov 2014 16:27:27 +0000 (16:27 +0000)]
MFC r271992

  Reflect the chanages in sleepqueue.h and subr_sleepqueue.c
  - Priority argument is introduced to sleepq_*wait* in r177085
  - sleepq_calc_signal_retval is removed from implementation
  - sleepq_catch_signals is internal now

MFC r272475

  - Bump .Dd

Approved by:  kevlo

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

9 years ago[SA-14:25] Fix kernel stack disclosure in setlogin(2) / getlogin(2).
des [Tue, 4 Nov 2014 23:30:23 +0000 (23:30 +0000)]
[SA-14:25] Fix kernel stack disclosure in setlogin(2) / getlogin(2).
[SA-14:26] Fix remote command execution in ftp(1).
[EN-14:12] Fix NFSv4 and ZFS cache consistency issue.

Approved by: so (des)

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

9 years agoFix build breakage of r274056.
mav [Mon, 3 Nov 2014 19:20:10 +0000 (19:20 +0000)]
Fix build breakage of r274056.

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

9 years agoMFC r272059:
mav [Mon, 3 Nov 2014 17:37:49 +0000 (17:37 +0000)]
MFC r272059:
Remake Linux' SOUND_MIXER_INFO IOCTL as a wrapper around new FreeBSD's one.

Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>

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

9 years agoMFC: r272248
nyan [Mon, 3 Nov 2014 10:27:21 +0000 (10:27 +0000)]
MFC: r272248

  - Cleanups pc98 code.
  - Remove unworked formats.

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

9 years agoMFC: r272245
nyan [Mon, 3 Nov 2014 06:34:28 +0000 (06:34 +0000)]
MFC: r272245

  Remove duplicate prog.

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

9 years agoMFC: r272243
nyan [Mon, 3 Nov 2014 05:36:35 +0000 (05:36 +0000)]
MFC: r272243

  Add missing library dependencies.

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

9 years agoMFC 273834:
jhb [Mon, 3 Nov 2014 00:13:20 +0000 (00:13 +0000)]
MFC 273834:
Rework the EXAMPLES section to be a bit clearer.
- Add an example of using etcupdate diff.
- Create a subsection on bootstrapping that is below the simple
  examples.  This should make it clearer that 'etcupdate extract' is
  a one-time operation and not part of the common workflow.  It also
  adds more suggestions on when bootstrapping is needed and additional
  steps to make future merges simpler.

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

9 years agoMFC 273644,273738:
jhb [Sun, 2 Nov 2014 23:22:22 +0000 (23:22 +0000)]
MFC 273644,273738:
Clarify that pthread_cleanup_push()/pop() are implemented as macros that
create a new code block and thus must be balanced at the same lexical
scope.  (This is also a requirement in POSIX.)

PR: 194280
Submitted by: dr2867.business@pacbell.net

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

9 years agoMFC r273837:
dim [Sat, 1 Nov 2014 13:45:01 +0000 (13:45 +0000)]
MFC r273837:

Fix a clang 3.5 warning about abs(3) being given an argument of type
quad_t in setusercontext().  While here, sanitize the clamping of the
priority value, and use the correct type for the return value of
login_getcapnum().

Reviewed by: kib

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

9 years agoMFC of 273718, tzdata2014i
edwin [Mon, 27 Oct 2014 06:12:41 +0000 (06:12 +0000)]
MFC of 273718, tzdata2014i

Upgrade to 2014i

Lots of historical data

Pacific/Fiji will go into DST from 2014-11-02 to 2015-01-18
Pacific/Bougainville will go from UTC+10 to UTC+11.
Europe/Minsk will go from FET to MSK.

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

9 years agoBump __FreeBSD_version to track SA-14:20, SA-14:21, SA-14:22,
gjb [Tue, 21 Oct 2014 21:37:53 +0000 (21:37 +0000)]
Bump __FreeBSD_version to track SA-14:20, SA-14:21, SA-14:22,
SA-14:23

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

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

9 years agoFix routed(8) remote denial of service vulnerability. [SA-14:21]
delphij [Tue, 21 Oct 2014 20:20:26 +0000 (20:20 +0000)]
Fix routed(8) remote denial of service vulnerability. [SA-14:21]

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

9 years agoMerge OpenSSL 0.9.8zc.
jkim [Wed, 15 Oct 2014 20:28:31 +0000 (20:28 +0000)]
Merge OpenSSL 0.9.8zc.

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

9 years agoMFC r272762: Correct scale factor for T terabyte suffix
emaste [Sat, 11 Oct 2014 01:01:18 +0000 (01:01 +0000)]
MFC r272762: Correct scale factor for T terabyte suffix

PR: 194250

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

9 years agoMFC 272550:
bryanv [Wed, 8 Oct 2014 04:34:46 +0000 (04:34 +0000)]
MFC 272550:

  Remove stray uma_mtx lock/unlock in zone_drain_wait()

  Callers of zone_drain_wait(M_WAITOK) do not need to hold (and were not)
  the uma_mtx, but we would attempt to unlock and relock the mutex if we
  had to sleep because the zone was already draining. The M_NOWAIT callers
  may hold the uma_mtx, but we do not sleep in that case.

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

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

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

9 years agoMFC r272349, r272422 and r272479:
hselasky [Mon, 6 Oct 2014 06:00:06 +0000 (06:00 +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.

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

9 years agoMFC r272288,272289:
delphij [Thu, 2 Oct 2014 18:32:30 +0000 (18:32 +0000)]
MFC r272288,272289:

When setting environment variables in the atrun script, use the
"export foo=bar" form instead of "foo=bar; export foo" since the
former allows the shell to catch variable names that are not valid
shell identifiers.  This will cause /bin/sh to exit with an error
(which gets mailed to the at user) and it will not run the script.

Obtained from: OpenBSD (r1.63 millert)

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

9 years agoMFC r272389:
delphij [Thu, 2 Oct 2014 17:42:21 +0000 (17:42 +0000)]
MFC r272389:

Diff reduction with kernel code: instruct the compiler that the data of
these types may be unaligned to their "normal" alignment and exercise
caution when accessing them.

PR: 194071

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

9 years agoMFC r272254:
hselasky [Thu, 2 Oct 2014 16:49:22 +0000 (16:49 +0000)]
MFC r272254:
Instead of creating the full range of possible ports, try to figure
out the actual number of so-called "embedded jacks" which are present
when a USB MIDI device is attaching.

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

9 years agoMFH (r272280, r272281, r272348): allow use with null user and rhost
des [Wed, 1 Oct 2014 10:35:52 +0000 (10:35 +0000)]
MFH (r272280, r272281, r272348): allow use with null user and rhost

PR: 83099 193927

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

9 years agoMFC r271874:
hselasky [Sat, 27 Sep 2014 18:12:05 +0000 (18:12 +0000)]
MFC r271874:
Add new USB IDs.

PR: 193775

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

9 years agoMFC r271953:
hselasky [Thu, 25 Sep 2014 06:00:31 +0000 (06:00 +0000)]
MFC r271953:
Some XHCI hardware requires dropping the endpoint context before
adding it again.

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

9 years agoMFC r271728
davidcs [Mon, 22 Sep 2014 19:09:04 +0000 (19:09 +0000)]
MFC r271728
For ECORE_DBG_BREAK_IF() ECORE_BUG() ECORE_BUG_ON() check bxe_debug flag before printing error message.

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

9 years agoMFC r271727
davidcs [Mon, 22 Sep 2014 19:03:23 +0000 (19:03 +0000)]
MFC r271727
remove clean option from Makefile

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

9 years agoMFC r271726
davidcs [Mon, 22 Sep 2014 18:57:37 +0000 (18:57 +0000)]
MFC r271726
Remove clean option from Makefile

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

9 years agoMFC r271492:
hselasky [Sat, 20 Sep 2014 08:03:15 +0000 (08:03 +0000)]
MFC r271492:
Workaround for receiving Voice Calls using the E1750 dongle from
Huawei. It might appear as if the firmware is allocating memory blocks
according to the USB transfer size and if there is initially a lot of
data, like at the answering machine prompt, it simply dies without any
apparent reason. The simple workaround for this is to force a zero
length packet at hardware level after every 512 bytes of data. This
will force the other side to use smaller memory blocks aswell.

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

9 years agoMFH (r271256, r271617): avoid segfault if PAM_RHOST nor PAM_TTY are unset.
des [Thu, 18 Sep 2014 14:31:28 +0000 (14:31 +0000)]
MFH (r271256, r271617): avoid segfault if PAM_RHOST nor PAM_TTY are unset.

PR:             83099

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

9 years agoFixup mergeinfo after r271740.
dim [Thu, 18 Sep 2014 06:45:43 +0000 (06:45 +0000)]
Fixup mergeinfo after r271740.

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

9 years agoMFC r257658 (modified to apply to stable/8):
dim [Thu, 18 Sep 2014 06:40:53 +0000 (06:40 +0000)]
MFC r257658 (modified to apply to stable/8):

For C++ programs, don't emit any explicit dependency to libstdc++.a or
libc++.a during the early build stages (bootstrap-tools, build-tools,
cross-tools), since it is not possible to know in advance which C++
library is available on the host system.

Instead, just use the bootstrap compiler's built-in default.  This
should eventually make it possible to build stable/9 on head, or on
stable/10, which ship without libstdc++ by default.

[Note: this should get the stable/8 tinderbox at least a bit further in
buildworld.]

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

9 years agoBump __FreeBSD_version after SA-14:19.tcp
gjb [Tue, 16 Sep 2014 19:20:06 +0000 (19:20 +0000)]
Bump __FreeBSD_version after SA-14:19.tcp

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

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

9 years agoFix Denial of Service in TCP packet processing.
delphij [Tue, 16 Sep 2014 09:49:11 +0000 (09:49 +0000)]
Fix Denial of Service in TCP packet processing.

Security: FreeBSD-SA-14:19.tcp

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

9 years agoMFC r270160:
lstewart [Tue, 16 Sep 2014 00:11:01 +0000 (00:11 +0000)]
MFC r270160:

Destroy the "qdiffsample_zone" UMA zone on unload to avoid a use-after-unload
panic easily triggered by running "sysctl -a" after unload.

Reported and tested by: Grenville Armitage <garmitage@swin.edu.au>

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

9 years agocxgbetool from 9-STABLE (this one works with T5 cards).
np [Sat, 13 Sep 2014 23:03:46 +0000 (23:03 +0000)]
cxgbetool from 9-STABLE (this one works with T5 cards).

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

9 years agoMFC r258692 and r260207 (both by gnn).
np [Sat, 13 Sep 2014 22:44:33 +0000 (22:44 +0000)]
MFC r258692 and r260207 (both by gnn).

r258692:
Add constants for use in interrogating various fiber and copper connectors
most often used with network interfaces.

The SFF-8472 standard defines the information that can be retrieved
from an optic or a copper cable plugged into a NIC, most often
referred to as SFP+.  Examples of values that can be read
include the cable vendor's name, part number, date of manufacture
as well as running data such as temperature, voltage and tx
and rx power.

Copious comments on how to use these values with an I2C interface
are given in the header file itself.

r260207:
Convert #defines to enums so that the values are visible in the debugger.

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

9 years agocxgbe(4): backport Chelsio T5 support from the 9-STABLE branch.
np [Sat, 13 Sep 2014 22:30:04 +0000 (22:30 +0000)]
cxgbe(4): backport Chelsio T5 support from the 9-STABLE branch.

This is a direct commit to get the base 40GbE/10GbE T5 driver to
8-STABLE.  There were too many changes between 8 and 9 (t4_tom,
iw_cxgbe, etc.) and MFC'ing everything and then ripping out stuff
selectively would have been too much trouble.

Tested with "make -DMAKE_JUST_KERNELS universe".

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

9 years agoMFC r234098 (jhb) and r255047.
np [Sat, 13 Sep 2014 19:37:11 +0000 (19:37 +0000)]
MFC r234098 (jhb) and r255047.

r234098:
Add media types for 40G media that might be used with FreeBSD.

r255047:
Add a routine for attaching an mbuf to a buffer with an external
refcount.  This one is willing to work with buffers that may already be
referenced.  MEXTADD/m_extadd are suitable only for the first attachment
to a cluster -- they initialize the refcount to 1.

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

9 years agoMFC r269228:
mav [Sat, 13 Sep 2014 15:22:08 +0000 (15:22 +0000)]
MFC r269228:
Add support for SOUND_MIXER_INFO IOCTL, used by gstreamer.

Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>

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

9 years ago MFC r268854
davidcs [Fri, 12 Sep 2014 18:27:20 +0000 (18:27 +0000)]
  MFC r268854
    Initiate error recovery stats fail to update after 3 retries.
    Change bxe_panic() ECORE_DBG_BREAK_IF() ECORE_BUG() ECORE_BUG_ON() to
    panic only if ECORE_STOP_ON_ERROR is defined.

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

9 years agoMFC 270823,270825,270829:
jhb [Wed, 10 Sep 2014 15:45:18 +0000 (15:45 +0000)]
MFC 270823,270825,270829:
Use a unit number allocator to provide suitable st_dev and st_ino values
for POSIX shared memory descriptors.  The implementation is similar to
that used for pipes.

Approved by: re (gjb for 10)

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

9 years agoMFC r271218:
hselasky [Wed, 10 Sep 2014 07:20:29 +0000 (07:20 +0000)]
MFC r271218:
Update mixer description for FastTrackPro.

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

9 years agoMFC r239298, r271017 and r271018:
hselasky [Wed, 10 Sep 2014 07:15:23 +0000 (07:15 +0000)]
MFC r239298, r271017 and r271018:
Add new quirk.

PR:        193279

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

9 years agoMFC r270992:
hselasky [Wed, 10 Sep 2014 06:56:09 +0000 (06:56 +0000)]
MFC r270992:
Fix logical error.

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

9 years agoBump __FreeBSD_version after SA-14:18
gjb [Wed, 10 Sep 2014 00:19:33 +0000 (00:19 +0000)]
Bump __FreeBSD_version after SA-14:18

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

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

9 years agoMFC 226041:
jhb [Mon, 8 Sep 2014 21:46:14 +0000 (21:46 +0000)]
MFC 226041:
Export devfs inode number allocator for the kernel consumers.

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

9 years agoMFC 270722:
jhb [Fri, 5 Sep 2014 17:44:10 +0000 (17:44 +0000)]
MFC 270722:
Correct the destroy example.  The -n argument is not needed (and is not
valid).

Approved by: re (gjb for 10)

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

9 years agoMFC 270674:
jhb [Fri, 5 Sep 2014 17:22:20 +0000 (17:22 +0000)]
MFC 270674:
Clarify that the -c argument clears the list of tracepoints specified by
-t (it does not clear all tracepoints).

Approved by: re (gjb for 10)

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

9 years agoMFC r270661:
ae [Wed, 3 Sep 2014 11:17:27 +0000 (11:17 +0000)]
MFC r270661:
  Remove leading '/' from hardlink name when removing them from the
  regular file name. This fixes the problem, when bsdtar can not create
  hardlinks to extracted files.

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

9 years agoMFC r257985:
ae [Mon, 1 Sep 2014 09:00:00 +0000 (09:00 +0000)]
MFC r257985:
  Fix panic with RADIX_MPATH, when RTFREE_LOCKED() called for already
  unlocked route. Use in6_rtalloc() instead of in6_rtalloc1. This helps
  simplify the code and remove several now unused variables.

  PR: 156283

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

9 years agoRegenerate
peter [Sun, 31 Aug 2014 20:23:56 +0000 (20:23 +0000)]
Regenerate

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

9 years agoBackport the separation of the knob that controls the legacy pkg_install
peter [Sun, 31 Aug 2014 20:14:22 +0000 (20:14 +0000)]
Backport the separation of the knob that controls the legacy pkg_install
tools (ie: WITH/WITHOUT_PKGTOOLS) and the pkg bootstrap tool.

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

9 years agoMFC r270728, tzdata2014f
pluknet [Fri, 29 Aug 2014 13:26:11 +0000 (13:26 +0000)]
MFC r270728, tzdata2014f

- Parts of Russia will change times on 2014-10-26.
- Time zone name changes for Asia/Novokuznetsk and Xinjiang and Samoa
  and America/Metlakatla, new zones Asia/Chita and Asia/Srednekolymsk.
- Australia will now use Axxx.
- New zone tab data format.

And lots of historical changes (See
http://mm.icann.org/pipermail/tz-announce/2014-August/000023.html
for the full details.)

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

9 years agoMFC r270510:
truckman [Thu, 28 Aug 2014 01:15:56 +0000 (01:15 +0000)]
MFC r270510:

Catch up to gcc 3.3 -> 3.4 upgrade.

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

9 years agoMFC r270134:
hselasky [Wed, 27 Aug 2014 14:25:18 +0000 (14:25 +0000)]
MFC r270134:
Use the "bSubslotSize" and "bSubFrameSize" fields to obtain the actual
sample size. According to the USB audio frame format specification
from USB.org, the value in the "bBitResolution" field can be less than
the actual sample size, depending on the actual hardware, and should
not be used for this computation.

PR: 192755

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

9 years agoMFC r270133:
hselasky [Wed, 27 Aug 2014 14:20:01 +0000 (14:20 +0000)]
MFC r270133:
Add more USB class codes.

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

9 years agoMFC r269777:
hselasky [Wed, 27 Aug 2014 14:13:47 +0000 (14:13 +0000)]
MFC r269777:
Fix string length argument passed to "sysctl_handle_string()" so that
the complete string is returned by the function and not just only one
byte.

PR: 192544

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

9 years agoBring in a collection of gcc and libstdc++ fixes and updates from head,
dim [Sat, 23 Aug 2014 10:58:16 +0000 (10:58 +0000)]
Bring in a collection of gcc and libstdc++ fixes and updates from head,
most of which are already in stable/10 and stable/9 for some time.

Requested by: danfe
Tested by: danfe and make universe

MFC r228328:
  Make it possible to use the debug versions of std::map and std::multimap
  with clang, by removing two unneeded using declarations.  Otherwise, you
  would get errors similar to:

  /usr/include/c++/4.2/debug/map.h:77:20: error: dependent using declaration resolved to type without 'typename'
using _Base::value_compare;
     ^

  N.B.: Take care when you actually use the debug versions of any
  libstdc++ header.  They are more likely to contain problems, because
  they are exercised far less often, and since the standard library
  complexity guarantees don't always apply anymore, compile times can
  drastically increase.

MFC r228474 (by ed):
  Add support for __COUNTER__.

  __COUNTER__ allows one to obtain incrementing (read: unique) numbers
  from the C preprocesor. This is useful when implementing things like a
  robust implementation of CTASSERT(), which currently fails when using
  it more than once on a single line of code. Probably not likely to cause
  any breakage, but still.

  __COUNTER__ was also added to GCC 4.3, but since that implementation is
  GPLv3 licensed, I took the liberty of implementing it without looking at
  any upstream sources. Therefore, this version is licensed under the same
  license as the rest of the code; GPLv2.

MFC r231336 (by kientzle):
  Implement -print-file-name=include (which is undocumented
  but used by some Linux boot loaders).  This option prints
  out the directory holding the include files needed by
  a freestanding program.  The default implementation of
  this doesn't work on FreeBSD because of the different
  include file layout.  But it's easy to implement:
  just return /usr/include (or the cross-compiling equivalent).

  Reviewed by: kan

MFC r233193:
  Add explicit braces to avoid dangling else in stl_tree.h.  This silences
  the following warning produced by clang trunk:

    In file included from /usr/src/sbin/devd/devd.cc:91:
    In file included from /usr/obj/usr/src/tmp/usr/include/c++/4.2/map:64:
    /usr/obj/usr/src/tmp/usr/include/c++/4.2/bits/stl_tree.h:987:2: error: add explicit braces to avoid dangling else [-Werror,-Wdangling-else]
    else
    ^

MFC r241957:
  Fix several clang warnings in libstdc++, which were exposed by the
  recent atf import.  These changes are purely cosmetic, no functional
  change.

MFC r244776 (by pfg):
  gcc: avoid generating negative values to DW_AT_byte_size.

  There is a bug in gcc (GCC/35998) where dwarf reports
  sizes of unsigned -1 (0xffffffff).

  On NetBSD this generated a faulty CTF entry which then
  caused a segfault in ctfmerge. The issue was worked
  around in NetBSD's Dtrace but since the issue originated
  in gcc, it seems reasonable to fix it here.

  Upstream gcc has been slow to react to this issue and
  the author that submitted the patch is not interested
  in licensing the change to us, so I did an independent
  workaround for the issue.

MFC r251212 (by pfg):
  GCC: bring back experimental support for amdfam10/barcelona CPUs.

  Initial support for the AMD amdfam10 chipsets has been available in the
  gcc43 branch under GPLv2. AMD and some linux distributions (OpenSUSE) did
  a backport of the amdfam10 support and made it available.

  This is a revised subset of the support initially brought in in r236962
  and later reverted. The collateral efects seem to have disappeared but
  it is still recommended to set the CPUTYPE with caution.

  Reviewed by: jkim (ages ago)

MFC r258017 (by pfg):
  cxxfilt: small changes from Apple's developer tools

  From Apple's Developer Tools 4.0 [1]:

  demangle.patch
  2007-05-05  Geoffrey Keating
  (d_name): Detect local-source-name.
  (d_prefix): Likewise.
  (d_unqualified_name): Implement local-source-name.

  libiberty-printf.patch

  [1] http://opensource.apple.com/source/cxxfilt/cxxfilt-9/patches/

MFC r258429 (by pfg):
  libstdc++: merge non-abi changes from Apple's developer tools

  Take some changes from Apple's Developer Tools 4.0 [1]:

  block.patch
  emergency-buffer-reduction.patch
  test_cleanup.patch

  vector_copy_no_alloc.patch
  problem/6473222 copy-constructing a std::vector from an
  empty std::vector calls malloc

  2008-10-27  Howard Hinnant
  stl_tree_system_header.patch
  Added #pragma GCC system_header to stl_tree.h.
  copy_doc.patch
  Corrected documentation concerning copy in stl_algobase.h.
  string_compare.patch
  Fixed basic_string.h, basic_string.tcc, incorrect 64bit to
  32bit narrowing.

  Reference:

  [1] http://opensource.apple.com/source/libstdcxx/libstdcxx-39/patches-4.2.1/

  Obtained from: Apple

MFC r258501 (by pfg):
  gcc: Bring updates from Google's enhanced gcc-4.2.1.

  Google released and enhanced version of gcc-4.2.1 plus their local
  patches for Android[1].

  The patches are owned by Google and the license hasn't been changed
  from  the original GPLv2. We are only bringing a subset of the
  available patches that may be helpful in FreeBSD. Changes specific
  to android are not included.

  From the README.google file[1].

  Patches applied to google_vendor_src_branch/gcc/gcc-4.2.1:

  gcc/Makefile.in
  gcc/c-common.c
  gcc/c-common.h
  gcc/c-opts.c
  gcc/c-typeck.c
  gcc/cp/typeck.c
  gcc/doc/invoke.texi
  gcc/flags.h
  gcc/opts.c
  gcc/tree-flow.h
  gcc/tree-ssa-alias-warnings.c
  gcc/tree-ssa-alias.c

   Backport of -Wstrict-aliasing from mainline.
    Silvius Rus <rus@google.com>

  gcc/coverage.c:
    Patch coverage_checksum_string for PR 25351.
    Seongbae Park <spark@google.com>
    Not yet submitted to FSF.

  gcc/c-opts.c
  gcc/c-ppoutput.c
  gcc/c.opt
  gcc/doc/cppopts.texi
  libcpp/Makefile.in
  libcpp/directives-only.c
  libcpp/directives.c
  libcpp/files.c
  libcpp/include/cpplib.h
  libcpp/init.c
  libcpp/internal.h
  libcpp/macro.c
    Support for -fdirectives-only.
    Ollie Wild <aaw@google.com>.
    Submitted to FSF but not yet approved.

  libstdc++-v3/include/ext/hashtable.h
    http://b/742065
    http://b/629994
    Reduce min size of hashtable for hash_map, hash_set from 53 to 5

  libstdc++-v3/include/ext/hashtable.h
    http://b/629994
    Do not iterate over buckets if hashtable is empty.

  gcc/common.opt
  gcc/doc/invoke.texi
  gcc/flags.h
  gcc/gimplify.c
  gcc/opts.c
    Add Saito's patch for -finstrument-functions-exclude-* options.

  gcc/common.opt
  gcc/doc/invoke.texi
  gcc/final.c
  gcc/flags.h
  gcc/opts.c
  gcc/testsuite/gcc.dg/Wframe-larger-than.c
    Add a new flag -Wframe-larger-than- which enables a new warning
    when a frame size of a function is larger than specified.
    This patch hasn't been integrated into gcc mainline yet.

  gcc/tree-vrp.c
    Add a hack to avoid using ivopts information for pointers starting
    at constant values.

  Reference:

  [1]
  https://android.googlesource.com/toolchain/gcc/+/master/gcc-4.2.1/

  Obtained from: Google Inc.

MFC r258507 (by pfg):
  gcc: Missing makefile changes for r258501.

  pointyhat: me

MFC r258530 (by pfg):
  libcpp: Keep a record of changes from upstream GCC (pre-43).

  This makes it easier to track the changes in the rare event of the code
  being distributed without access to version control.

MFC r258651 (by pfg):
  gcc: Altivec register adjustments from Apple.

  Obtained from: gcc pre-4.3 (rev. 124763; GPLv2)

MFC r258658 (by mdf):
  Fix a segfault / internal compiler error.

  Among other causes, when gcc throws a warning before parsing any tokens,
  the cur_token pointer is at the beginning of malloc'd memory.
  Dereferencing cur_token[-1] can cause a segfault.

  Code taken from OpenBSD
  http://www.openbsd.org/cgi-bin/cvsweb/src/gnu/gcc/libcpp/errors.c
  which was a more complete fix than the one I originally coded.

MFC r258731 (by pfg):
  gcc: Make use of TREE_OVERFLOW_P.

  While it was brought in r258179 only to fix a build issue,
  bringing the rest of the change has the advantage of fixing
  GCC/19978.

  Obtained from: gcc 4.3 (rev. 120505; GPLv2)

MFC r258748 (by pfg):
  gcc: upstream alignment cleanups.

  This solves GCC/32617 and contributes to reduce differences with
  Apple's gcc42.

  Complete some references in the ChangeLog while here.

  Obtained from: gcc 4.3 (rev. 126529, 126588; GPLv2)

MFC r258817 (by pfg):
  libiberty: upstream updates.

  There is a new ChangeLog.gcc43 file but most notable:

  * floatformat.c (get_field): Fix segfault with little-endian word
    order on 64-bit hosts.
    (put_field): Likewise.
    (min): Move definition.

  gcc/cp/ChangeLog
  2007-05-04  Geoffrey Keating  <geoffk@apple.com>

    PR 31775
    * mangle.c (write_mangled_name): Mangle static variable names.
    (write_unqualified_name): Use local-source-name for
    namespace-scope static variables.
  (Completes FreeBSD's r258017 )

  Obtained from: gcc 4.3 (rev. 118552, 120097, 20698, 120702,
   121364, 122972, 126588; GPLv2)

MFC r258826 (by pfg):
  libcpp: Merge fixes from upstream

  GCC preprocessor/29966:
  * macro.c (lex_expansion_token): Save and restore cpp_reader's
  cur_token.
  (_cpp_create_definition): Don't restore cur_token here.
  * lex.c (_cpp_lex_token): Added assertion.

  GCC preprocessor/28709:
  * macro.c (paste_tokens): Remove PASTE_LEFT from the old lhs.

  GCC c/31924
  * expr.c (interpret_float_suffix): Check for invalid suffix.

  GCC preprocessor/14331
  * lex.c (_cpp_get_fresh_line):  Don't warn if no newline at EOF.

  Fixup whitespacing

  Obtained from: gcc per-4.3 (rev. 121340, 124356, 124358, 124730,
    125212, 125255 ; GPLv2)

MFC r258943 (by pfg):
  gcc: On rs6000 update sp_offset depending only on size.

  This fixes a nasty bug introduced in r258651.

  Reported and tested by: Justin Hibbits
  Obtained from: gcc pre-4.3 (rev. 125116; GPLv2)

MFC r259005 (by pfg):
  gcc: Add -flax-vector-conversions

  Obtained from: gcc 4.3 (rev. 120572, 120688; GPLv2)

MFC r259022 (by pfg):
  gcc: Include types in error message for build_binary_op.

  Mostly cosmetic change, again to reduce differences with Apple's gcc.

  Obtained from: gcc 4.3 (rev. 125239; GPLv2)

MFC r259092 (by pfg):
  gcc: new fvisibility-ms-compat option

  Obtained from: gcc 4.3 (rev. 126088; GPLv2)

MFC r259111:
  Use correct casts in gcc's emmintrin.h for the first arguments of the
  following builtin functions:

  * __builtin_ia32_pslldi128() takes __v4si instead of __v8hi
  * __builtin_ia32_psllqi128() takes __v2di instead of __v8hi
  * __builtin_ia32_psradi128() takes __v4si instead of __v8hi

  This should fix the following errors when building the LINT kernel with
  gcc:

  sys/crypto/aesni/aesni_wrap.c:191: error: incompatible type for argument 1 of
  '__builtin_ia32_psradi128'
  sys/crypto/aesni/aesni_wrap.c:195: error: incompatible type for argument 1 of
  '__builtin_ia32_pslldi128'

MFC r259525 (by pfg):
  gcc: fix ICE in rs600 when using -fno-trapping-math.

  Solves GCC-PR target/30485

  Obtained from: gcc 4.3 (rev. 120902; GPLv2)

MFC r259529 (by pfg):
  gcc: small merges from upstream

  Solves GCC issues:
  PR middle-end/32602
  PR middle-end/32603

  Updates the to documentation and processing
  improvement.

  Obtained from: gcc 4.3 (rev. 119427, 126278, 126422; GPLv2)

MFC r259555 (by pfg):
  gcc: add Apple compatible -Wnewline-eof

  GCC 4.2 and previous have always warned about
  "No newline at end of file".

  Upstream GCC removed the warning completely but
  Apple made it an optional warning. Adopt it for
  compatibility with older GCC and clang.

  While here, add comment to complement r258712.

  Obtained from: Apple Inc. (Apple GCC 4.2 - 5531)

MFC r259558 (by pfg):
  gcc: add Apple compatible -Wnewline-eof

  Fix document: "Apple compatible" suits better the origin.

MFC r259649 (by pfg):
  gcc: more diff reductions against Apple GCC.

  Mostly cosmetical changes to aid further merges.

  Obtained from: gcc 4.3 (rev. 120611, 124839; GPLv2)

MFC r259655 (by pfg):
  gcc: merge upstream fix and new feature.

  Fix for PR c++/29928

  Add support for Rvalue references as described here:
  http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2118.html

  Obtained from: gcc 4.3 (rev. 124724, 125211; GPLv2)

MFC r259660 (by pfg):
  gcc: revert Rvalue references.

  They are very useful but at this time I prefer not to figure out
  some  minor conflicts with the bigger Apple's blocks support
  patch that is being worked on for current.

MFC r259841 (by pfg):
  gcc:  Add ability to generate DWARF pubtypes section if
  DEBUG_PUBTYPES_SECTION is defined.

  Obtained from: gcc 4.3 (rev. 118826; GPLv2)

MFC r259873 (by pfg):
  gcc: small enhancements for the arm support.

  Very small updates: fixes GCC-PR target/31152

  Tested by building the cross-compiler.

  Obtained from: gcc 4.3 (rev. r118461, 125973: GPLv2)

MFC r259944 (by pfg):
  gcc: merge small upstream change.

  Backport from mainline:
  2007-04-24  Hui-May Chang <hm.chang@apple.com>

  * reload1.c (merge_assigned_reloads) : Do not merge a RELOAD_OTHER
  instruction with a RELOAD_FOR_OPERAND_ADDRESS instruction.

  Obtained from: gcc 4.3 (rev. r124115: GPLv2)

MFC r260014 (by pfg):
  gcc: Add support for label attributes and "unavailable" attribute.

  Apple GCC has extensions to support for both label attributes and
  an "unavailable" attribute. These are critical for objc but are
  also useful in regular C/C++.

  Apparently at least the label attributes might have found their way to
  upstream GCC but the code doesn't seem available on the GPLv2 tree so
  we are taking the code directly from Apple. To make this clearer we
  are preserving the annoying "APPLE LOCAL" tags and the ChangeLogs
  when they are available.

  Obtained from: Apple GCC 4.2 - 5531

MFC r260099 (by pfg):
  gcc: Fix issue with "unavailable" attribute.

  While here, point where we dropped the support for objc from r260014.

MFC r260310 (by pfg):
  libcpp: misc fixes from Apple's GCC.

  Fixes some bugs detected by Apple:
  #error with unmatched quotes
  pragma mark

  Obtained from: Apple GCC 4.2 - 5553

MFC r263775:
  Avoid "cc1: warning: is shorter than expected" when using GNU cpp in
  combination with dtrace scripts, which have "#!/usr/sbin/dtrace -Cs"
  shebang lines.  This is because dtrace positions the file pointer after
  the shebang line, before passing the file to GNU cpp.

  To fix the warning, adjust the size downwards by the current position,
  after a bit of sanity checking.

  Suggested by: avg

MFC r269948:
  Supplement r259111 by also using correct casts in gcc's emmintrin.h for
  the first argument of the following builtin function:

  * __builtin_ia32_psrlqi128() takes __v2di instead of __v4si

  This should fix the following errors when building the graphics/webp
  port with base gcc:

  lossless_sse2.c:403: error: incompatible type for argument 1 of '__builtin_ia32_psrlqi128'
  lossless_sse2.c:404: error: incompatible type for argument 1 of '__builtin_ia32_psrlqi128'

  Reported by: Jos Chrispijn <ports@webrz.net>

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

9 years agoMFC r255286: don't stop the whole universe build if one kernel fails.
ian [Wed, 20 Aug 2014 00:06:54 +0000 (00:06 +0000)]
MFC r255286: don't stop the whole universe build if one kernel fails.

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

9 years agoMFC 238423,238426,238428,258063,258064,258066,258097,258185,259134:
jhb [Tue, 19 Aug 2014 17:54:15 +0000 (17:54 +0000)]
MFC 238423,238426,238428,258063,258064,258066,258097,258185,259134:
The etcupdate utility is a tool for managing updates to files that are
not updated as part of `make installworld' such as files in /etc.  It
manages updates by doing a three-way merge of changes made to these files
against the local versions.  It is also designed to minimize the amount
of user intervention with the goal of simplifying upgrades for clusters
of machines.

Requested by: peter

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

9 years agoMFC r269566:
hselasky [Wed, 13 Aug 2014 07:11:37 +0000 (07:11 +0000)]
MFC r269566:
Fix for deadlock in USB device side mode.

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

9 years agoMFC r269180:
delphij [Mon, 11 Aug 2014 07:01:29 +0000 (07:01 +0000)]
MFC r269180:

When interval is set to very small value with limited amount of packets,
ping6(8) would quit before the remote side gets a chance to respond.

Solve this by resetting the itimer when we have reached the maximum packet
number have reached, but let the other handling to continue.

PR:        bin/151023
Submitted by:    tjmao at tjmao.net

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

9 years agoMFC r269470: avoid divide-by-zero panic when setting baudrate to 0.
joerg [Fri, 8 Aug 2014 15:04:02 +0000 (15:04 +0000)]
MFC r269470: avoid divide-by-zero panic when setting baudrate to 0.

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