]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
5 years agoFix regression in IPv6 fragment reassembly. [EN-18:09.ip]
gordon [Thu, 27 Sep 2018 18:29:55 +0000 (18:29 +0000)]
Fix regression in IPv6 fragment reassembly. [EN-18:09.ip]

Approved by: so
Security: FreeBSD-EN-18:09.ip

5 years agoFix regression in Lazy FPU remediation. [EN-18:08.lazyfpu]
gordon [Wed, 12 Sep 2018 05:08:49 +0000 (05:08 +0000)]
Fix regression in Lazy FPU remediation. [EN-18:08.lazyfpu]

Approved by: so
Security: FreeBSD-EN-18:08.lazyfpu

5 years agoFix improper elf header parsing. [SA-18:12.elf]
gordon [Wed, 12 Sep 2018 05:07:35 +0000 (05:07 +0000)]
Fix improper elf header parsing. [SA-18:12.elf]

Approved by: so
Security: FreeBSD-SA-18:12.elf
Security: CVE-2018-6924

5 years agoRevis manual pages. [SA-18:08.tcp]
delphij [Wed, 15 Aug 2018 02:30:11 +0000 (02:30 +0000)]
Revis manual pages. [SA-18:08.tcp]

Fix L1 Terminal Fault (L1TF) kernel information disclosure.
[SA-18:09.l1tf]

Fix resource exhaustion in IP fragment reassembly. [SA-18:10.ip]

Fix unauthenticated EAPOL-Key decryption vulnerability.
[SA-18:11.hostapd]

Approved by: so

5 years agoBump patch level and document them.
delphij [Mon, 6 Aug 2018 20:39:27 +0000 (20:39 +0000)]
Bump patch level and document them.

Approved by: so

5 years agoAddress concerns about CPU usage while doing TCP reassembly.
jtl [Mon, 6 Aug 2018 17:47:47 +0000 (17:47 +0000)]
Address concerns about CPU usage while doing TCP reassembly.

Currently, the per-queue limit is a function of the receive buffer
size and the MSS.  In certain cases (such as connections with large
receive buffers), the per-queue segment limit can be quite large.
Because we process segments as a linked list, large queues may not
perform acceptably.

The better long-term solution is to make the queue more efficient.
But, in the short-term, we can provide a way for a system
administrator to set the maximum queue size.

We set the default queue limit to 100.  This is an effort to balance
performance with a sane resource limit.  Depending on their
environment, goals, etc., an administrator may choose to modify this
limit in either direction.

Approved by: so
Security: FreeBSD-SA-18:08.tcp
Security: CVE-2018-6922

5 years ago- Switch releng/11.2 to -RELEASE.
gjb [Thu, 21 Jun 2018 22:59:49 +0000 (22:59 +0000)]
- Switch releng/11.2 to -RELEASE.
- Add the anticipated 11.2-RELEASE date to UPDATING.
- Set a static __FreeBSD_version.

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

5 years agoFinal touches to 11.2-RELEASE release notes:
gjb [Thu, 21 Jun 2018 18:13:04 +0000 (18:13 +0000)]
Final touches to 11.2-RELEASE release notes:
- Remove an empty section that was left over from a previous commit
  to prune empty sections.
- Add a note about a late discovered issue with zfsd(8) (Bugzilla
  228750).  Fix a sentence stop while here.
- Document SA-18:07, which had been included in RC3.
- Fix FreeBSD versions in the installation.html page.

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

5 years agoUpdate releng/11.2 to RC3 as part of the 11.2-RELEASE cycle.
gjb [Fri, 15 Jun 2018 13:49:11 +0000 (13:49 +0000)]
Update releng/11.2 to RC3 as part of the 11.2-RELEASE cycle.

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

5 years agoMFC rr335072, r335089:
kib [Fri, 15 Jun 2018 13:21:37 +0000 (13:21 +0000)]
MFC rr335072, r335089:
Enable eager FPU context switch on i386 and amd64.
CVE: CVE-2018-3665

MFC r335131
Remove printf() in #NM handler.

MFC r335132:
Reorganize code flow in fpudna()/npxdna().

Approved by: re (gjb)

5 years agoMFS11 r335088 (dim):
gjb [Thu, 14 Jun 2018 17:42:36 +0000 (17:42 +0000)]
MFS11 r335088 (dim):
 MFC rr334886:
  Add missed libc++ entries to (Optional)ObsoleteFiles.inc

  Some of these were removed during the libc++ 5.0.0 import, others
  were added in the libc++ 6.0.0 import.

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

5 years agoMFS11 r334872 (ram):
gjb [Thu, 14 Jun 2018 17:42:19 +0000 (17:42 +0000)]
MFS11 r334872 (ram):
 MFC r334657:
  Issue: Utility hangs when  OCS_IOCTL_CMD_MGMT_GET_ALL called in
  parallel on port 0 and port 1.

  Fix: Using static structure for results is corrupting the second
  ioctl request. Removed static for results structure.

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

5 years agoSwitch releng/11.2 to RC2 as part of the 11.2-RELEASE cycle, following
gjb [Fri, 8 Jun 2018 21:47:17 +0000 (21:47 +0000)]
Switch releng/11.2 to RC2 as part of the 11.2-RELEASE cycle, following
r334860.

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

5 years agoFix the ordering of where '$bootable' is set in the second
gjb [Fri, 8 Jun 2018 21:46:11 +0000 (21:46 +0000)]
Fix the ordering of where '$bootable' is set in the second
variable setting, which was moved around as part of prior
commits that were subsequently reverted.

This is a direct commit to releng/11.2.

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

5 years agoRevert releng/11.2 back to RC1 temporarily, as an additional fix
gjb [Fri, 8 Jun 2018 21:44:15 +0000 (21:44 +0000)]
Revert releng/11.2 back to RC1 temporarily, as an additional fix
for amd64 ISOs is required.

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

5 years agoRename releng/11.2 to RC2 as part of the 11.2-RELEASE cycle, following
gjb [Fri, 8 Jun 2018 14:36:10 +0000 (14:36 +0000)]
Rename releng/11.2 to RC2 as part of the 11.2-RELEASE cycle, following
r334839.

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

5 years agoRestore r332345 and r332346 from head, merged to stable/11 as
gjb [Fri, 8 Jun 2018 14:35:27 +0000 (14:35 +0000)]
Restore r332345 and r332346 from head, merged to stable/11 as
part of r333006, which was reverted in r334735.

r332345 fixes makefs(8) invocation after head revision r331843,
where makefs(8) was updated to be in sync with NetBSD.

r332346 fixes the $bootable variable position so the platformid
option is correctly applied.

This is a direct commit to releng/11.2, as these two revisions
were part of a total of four revisions merge to stable/11 (at
the time) in r333006.

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

5 years agoRevert releng/11.2 back to RC1 due to an issue discovered with
gjb [Fri, 8 Jun 2018 14:00:12 +0000 (14:00 +0000)]
Revert releng/11.2 back to RC1 due to an issue discovered with
amd64 ISOs, pending a fix to be committed shortly.

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

5 years agoUpdate releng/11.2 to RC2 as part of the 11.2-RELEASE cycle.
gjb [Thu, 7 Jun 2018 23:59:19 +0000 (23:59 +0000)]
Update releng/11.2 to RC2 as part of the 11.2-RELEASE cycle.

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

5 years agoMFstable/11 334801
tuexen [Thu, 7 Jun 2018 18:01:31 +0000 (18:01 +0000)]
MFstable/11 334801

Improve compliance with RFC 4895 and RFC 6458.

Silently dicard SCTP chunks which have been requested to be
authenticated but are received unauthenticated no matter if support
for SCTP authentication has been negotiated. This improves compliance
with RFC 4895.

When the application uses the SCTP_AUTH_CHUNK socket option to
request a chunk to be received in an authenticated way, enable
the SCTP authentication extension for the end-point. This improves
compliance with RFC 6458.

Discussed with: Peter Lei
Approved by: re (marius@)

5 years agoFix a typo.
gjb [Thu, 7 Jun 2018 17:08:36 +0000 (17:08 +0000)]
Fix a typo.

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

5 years agoAdd xml:id attributes for diff reduction.
gjb [Thu, 7 Jun 2018 16:35:09 +0000 (16:35 +0000)]
Add xml:id attributes for diff reduction.

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

5 years agoFix a grammatical error.
gjb [Thu, 7 Jun 2018 16:31:05 +0000 (16:31 +0000)]
Fix a grammatical error.

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

5 years agoConnect the installation page to the build.
gjb [Thu, 7 Jun 2018 16:26:28 +0000 (16:26 +0000)]
Connect the installation page to the build.
Update the release version in installation/article.xml.

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

5 years agoDocument pkg(8) version.
gjb [Thu, 7 Jun 2018 16:21:16 +0000 (16:21 +0000)]
Document pkg(8) version.

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

5 years agorelnotes/article.xml:
gjb [Thu, 7 Jun 2018 16:21:15 +0000 (16:21 +0000)]
relnotes/article.xml:
- Remove empty sections.
- Move the 'hardware support' section, containing only
  driver information, to the 'device drivers' section.

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

5 years agoDocument r334789, dhclient(8) allow to superscede interface-mtu
gjb [Thu, 7 Jun 2018 16:21:14 +0000 (16:21 +0000)]
Document r334789, dhclient(8) allow to superscede interface-mtu

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

5 years agoerrata/article.xml:
gjb [Thu, 7 Jun 2018 16:21:12 +0000 (16:21 +0000)]
errata/article.xml:
- Prune stale entries from 11.1-RELEASE.
- Add an xml:id for diff reduction.

hardware/article.xml:
- Add an xml:id for diff reduction.

installation/article.xml:
- Add an xml:id for diff reduction.

readme/article.xml:
- Fix a malformed URL and mailing list reference.

readme/article.xml:
- Update the xml:id to match that used by readme/article.xml
  for consistency.

release.ent:
- Update versions, and switch from 'snapshot' to 'release'.

security.xml:
- Remove reference to 10.x.

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

5 years agoMFC: r334443 (by cem@) MF stable/11: r334787
marius [Thu, 7 Jun 2018 15:51:23 +0000 (15:51 +0000)]
MFC: r334443 (by cem@) MF stable/11: r334787

dhclient(8): allow to supersede interface-mtu option

In some cases broken DHCP servers might send invalid MTU value, so allow to
use 'supersede' in dhclient.conf to override this. When superseded value is
0, MTU value is not updated at all.

PR: 206721
Submitted by: novel@
Reported by: <jimp AT pfsense.org>
Approved by: re (gjb)
Relnotes: yes (potentially surprising behavior change w/ broken dhcpd mtu)
Differential Revision: https://reviews.freebsd.org/D15484

5 years agoMFstable/11 334732:
tuexen [Wed, 6 Jun 2018 22:34:20 +0000 (22:34 +0000)]
MFstable/11 334732:

Don't overflow a buffer if we receive an INIT or INIT-ACK chunk
without a RANDOM parameter but with a CHUNKS or HMAC-ALGO parameter.
Please note that sending this combination violates the specification.

Thanks to Ronald E. Crane for reporting the issue for the userland
stack.

Approved by: re (gjb@)

5 years agoMFstable/11 334731
tuexen [Wed, 6 Jun 2018 22:02:44 +0000 (22:02 +0000)]
MFstable/11 334731

Limit the retransmission timer for SYN-ACKs by TCPTV_REXMTMAX.

Use the same logic to handle the SYN-ACK retransmission when sent from
the syn cache code as when sent from the main code.

Approved by: re (gjb@)
Sponsored by: Netflix, Inc.

5 years agoMFstable/11 r334730
tuexen [Wed, 6 Jun 2018 21:23:42 +0000 (21:23 +0000)]
MFstable/11 r334730

Ensure net.inet.tcp.syncache.rexmtlimit is limited by TCP_MAXRXTSHIFT.

If the sysctl variable is set to a value larger than TCP_MAXRXTSHIFT+1,
the array tcp_syn_backoff[] is accessed out of bounds.

Discussed with: jtl@
Approved by: re (gjb)
Sponsored by: Netflix, Inc.

5 years agoRemove the r333006 entry following r334735.
gjb [Wed, 6 Jun 2018 20:32:39 +0000 (20:32 +0000)]
Remove the r333006 entry following r334735.

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

5 years agoRevert r333006:
gjb [Wed, 6 Jun 2018 20:31:15 +0000 (20:31 +0000)]
Revert r333006:

 This revision implemented hybrid ISOs for the amd64
 architecture, however it was discovered to have caused
 a regression in booting legacy-mode (BIOS/CSM).

 This restores the way ISOs were previously created, as
 the cause (and differences between head and stable/11
 and releng/11.2) have not been entirely identified.

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

5 years agoMFstable/11 r334728:
tuexen [Wed, 6 Jun 2018 20:28:17 +0000 (20:28 +0000)]
MFstable/11 r334728:

Ensure we are not dereferencing a NULL pointer.

CID: 1385266
Approved by: re (marius@)

5 years agoFix two grammatical errors.
gjb [Tue, 5 Jun 2018 22:27:36 +0000 (22:27 +0000)]
Fix two grammatical errors.

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

5 years agoAdd xml:id to the article tag for diff reduction when regenerating
gjb [Tue, 5 Jun 2018 21:55:40 +0000 (21:55 +0000)]
Add xml:id to the article tag for diff reduction when regenerating
the relnotes page.

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

5 years agoDocument r333343, ixl(4) version 1.9.9-k.
gjb [Tue, 5 Jun 2018 21:41:26 +0000 (21:41 +0000)]
Document r333343, ixl(4) version 1.9.9-k.

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

5 years agoAdjust wording for r334444 to be more consistent with the text
gjb [Tue, 5 Jun 2018 21:41:25 +0000 (21:41 +0000)]
Adjust wording for r334444 to be more consistent with the text
for i386 memstick images.

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

5 years agoDocument r333417, smartpqi(4) addition.
gjb [Tue, 5 Jun 2018 21:41:24 +0000 (21:41 +0000)]
Document r333417, smartpqi(4) addition.

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

5 years agoDocument r333166, Apollo Lake boot issue fix.
gjb [Tue, 5 Jun 2018 21:41:23 +0000 (21:41 +0000)]
Document r333166, Apollo Lake boot issue fix.

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

5 years agoDocument r334444, amd64 memstick images now use MBR instead of GPT.
gjb [Tue, 5 Jun 2018 21:41:22 +0000 (21:41 +0000)]
Document r334444, amd64 memstick images now use MBR instead of GPT.

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

5 years agoDocument r334458, libxo(3) version 0.9.0.
gjb [Tue, 5 Jun 2018 21:41:21 +0000 (21:41 +0000)]
Document r334458, libxo(3) version 0.9.0.

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

5 years agoDocument r332040, ocs_fc(4) addition.
gjb [Tue, 5 Jun 2018 21:41:20 +0000 (21:41 +0000)]
Document r332040, ocs_fc(4) addition.

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

5 years agoDocument r331058, ng_pppoe(4) user-supplied Host-Uniq tag support.
gjb [Tue, 5 Jun 2018 21:41:19 +0000 (21:41 +0000)]
Document r331058, ng_pppoe(4) user-supplied Host-Uniq tag support.

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

5 years agoDocument r329581, fix to ICMPv6 redirects.
gjb [Tue, 5 Jun 2018 21:41:18 +0000 (21:41 +0000)]
Document r329581, fix to ICMPv6 redirects.

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

5 years agoDocument r329010, loader(8) quote parsing improvements.
gjb [Tue, 5 Jun 2018 21:41:17 +0000 (21:41 +0000)]
Document r329010, loader(8) quote parsing improvements.

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

5 years agoDocument r327920, SW_WATCHDOG is now dynamic.
gjb [Tue, 5 Jun 2018 21:41:16 +0000 (21:41 +0000)]
Document r327920, SW_WATCHDOG is now dynamic.

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

5 years agoDocument r325730, ipfw(4) Dummynet AQM packet marking L2/L3.
gjb [Tue, 5 Jun 2018 21:41:15 +0000 (21:41 +0000)]
Document r325730, ipfw(4) Dummynet AQM packet marking L2/L3.

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

5 years agoDocument r324175, ng_iface(4) system crash fix.
gjb [Tue, 5 Jun 2018 21:41:14 +0000 (21:41 +0000)]
Document r324175, ng_iface(4) system crash fix.

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

5 years agoDocument r323447, support for multiple realtime clocks.
gjb [Tue, 5 Jun 2018 21:41:13 +0000 (21:41 +0000)]
Document r323447, support for multiple realtime clocks.

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

5 years agoDocument r322340, fdescfs(5) updates for Linux-specific /dev/fd
gjb [Tue, 5 Jun 2018 21:41:12 +0000 (21:41 +0000)]
Document r322340, fdescfs(5) updates for Linux-specific /dev/fd
and /proc/self/fd behavior.

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

5 years agoDocument r321519, boot code and loader check for unsupported ZFS
gjb [Tue, 5 Jun 2018 21:41:11 +0000 (21:41 +0000)]
Document r321519, boot code and loader check for unsupported ZFS
feature flags.

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

5 years agoDocument r321007, msul support in Linuxulator.
gjb [Tue, 5 Jun 2018 21:41:10 +0000 (21:41 +0000)]
Document r321007, msul support in Linuxulator.

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

5 years agoDocument r330733, zfsd(8) updated to work with any GEOM provider.
gjb [Tue, 5 Jun 2018 21:41:09 +0000 (21:41 +0000)]
Document r330733, zfsd(8) updated to work with any GEOM provider.

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

5 years agoFix missing "_max" in the r326322 entry.
gjb [Tue, 5 Jun 2018 21:41:08 +0000 (21:41 +0000)]
Fix missing "_max" in the r326322 entry.

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

5 years agoDocument r326322, p1003_1b.aio_listio_max is now a tunable.
gjb [Tue, 5 Jun 2018 21:41:06 +0000 (21:41 +0000)]
Document r326322, p1003_1b.aio_listio_max is now a tunable.

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

5 years agoMerge r334562 from stable/11 to releng/11.2. r334562 MFC'd the
np [Mon, 4 Jun 2018 20:34:53 +0000 (20:34 +0000)]
Merge r334562 from stable/11 to releng/11.2.  r334562 MFC'd the
following revisions to stable/11: r333650, r333652, r333682, r334406,
r334409-r334410, and r334489.

r333650:
cxgbe(4): Claim some more T5 and T6 boards.

r333652:
cxgbe(4): Add support for two more flash parts.

r333682:
cxgbe(4): Fall back to a failsafe configuration built into the firmware
if an error is reported while pre-processing the configuration file that
the driver attempted to use.

Also, allow the user to explicitly use the built-in configuration with
hw.cxgbe.config_file="built-in"

r334406:
cxgbe(4): Consider all supported speeds when building the ifmedia list
for a port.  Fix other related issues while here:
- Require port lock for access to link_config.
- Allow 100Mbps operation by tracking the speed in Mbps.  Yes, really.
- New port flag to indicate that the media list is immutable.  It will
  be used in future refinements.

This also fixes a bug where the driver reports incorrect media with
recent firmwares.

r334409:
cxgbe(4): Implement ifm_change callback.

r334410:
cxgbe(4): Use ifm for ifmedia just like the rest of the kernel.

No functional change.

r334489:
cxgbe(4): Include full duplex mediaopt in media that can be reported as
active.  Always report full duplex in active media.

Approved by: re@ (gjb@, kib@)
Sponsored by: Chelsio Communications

5 years agoSwitch releng/11.2 back to RC1 following r334469.
gjb [Fri, 1 Jun 2018 01:35:54 +0000 (01:35 +0000)]
Switch releng/11.2 back to RC1 following r334469.

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

5 years agoSwitch the dvd1 pkg(8) configuration to use the quarterly branch,
gjb [Fri, 1 Jun 2018 01:34:37 +0000 (01:34 +0000)]
Switch the dvd1 pkg(8) configuration to use the quarterly branch,
as part of the BETA->RC switch.

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

5 years agoRename releng/11.2 back to BETA3 temporarily, as I missed a file
gjb [Fri, 1 Jun 2018 01:33:48 +0000 (01:33 +0000)]
Rename releng/11.2 back to BETA3 temporarily, as I missed a file
that needs updating when branching, because I am an idiot.

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

5 years agoCopy stable/11@r334458 to releng/11.2 as part of the 11.2-RELEASE
gjb [Fri, 1 Jun 2018 00:22:49 +0000 (00:22 +0000)]
Copy stable/11@r334458 to releng/11.2 as part of the 11.2-RELEASE
cycle.

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

5 years agoMFC r334068 (phil):
gjb [Thu, 31 May 2018 23:55:59 +0000 (23:55 +0000)]
MFC r334068 (phil):
 Import libxo-0.9.0:
  - Add xo_format_is_numeric() with improved logic to decide if format
    strings are numeric, so json output quotes them
  - Convert docs to sphinx/rst
  - update tests

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

5 years agoAkin r302691 in head, synchronize the build stripping for the disc1
marius [Thu, 31 May 2018 23:48:27 +0000 (23:48 +0000)]
Akin r302691 in head, synchronize the build stripping for the disc1
image with that of the bootonly image (but similarly modulo games
and groff(1)) as the amd64 disc1 image is overflowing. This also
removes the redundant MK_LLDB.

This is a direct commit to stable/11 rather than a MFC of r302691 as
the the disc1 image stripping previously has been directly modified
in stable/11 by r303027.

Approved by: re (gjb)

5 years agoMFC: r327364, r334293
marius [Thu, 31 May 2018 22:20:31 +0000 (22:20 +0000)]
MFC: r327364, r334293

- Add AHCI/XHCI device IDs found on AMD 1950X+X399 system
- Describe Fresco Logic FL1100 USB 3.0 controllers.

Approved by: re (gjb)

5 years agoMFC r334310, r334337:
gjb [Thu, 31 May 2018 20:01:58 +0000 (20:01 +0000)]
MFC r334310, r334337:

 r334310 (imp):
  Teach ufs_module.c about bsd labels and probe 'a' partition.

  If the check for a UFS partition at offset 0 on the disk fails, check
  to see if there's a BSD disklabel at block 1 (standard) or at offset
  512 (install images assume 512 sector size). If found, probe for UFS
  on the 'a' partition.

  This fixes UEFI booting images from a BSD labeled MBR slice when the
  'a' partiton isn't at offset 0. This is a stop-gap fix since we plan
  on removing boot1.efi in FreeBSD 12. We can't easily do that for 11.2,
  however, hence the short MFC window.

 r334337 (emaste):
  switch amd64 memstick installer images to MBR

  A good number of BIOSes have trouble booting from GPT in non-UEFI
  mode.

  With this change amd64 memsticks remain dual-mode (booting from either
  UEFI or CSM); the partitioning type is just switched from GPT to MBR.

PR: 227954

Note, there are two changes specific to stable/11 where there is code
that had diverged from head and never merged back.  The two changes are
an include in stand/efi/boot1/ufs_module.c, replacing sys/disk/bsd.h
with sys/disklabel.h and replacing BSD_MAGIC with DISKMAGIC in the
same file.  The latter two are direct commits to stable/11 in order to
avoid unexpected regressions at this point of the 11.2 cycle.  Thank
you to imp@ for pointing out what changes needed to be made.

Approved by: re (marius)

Sponsored by: The FreeBSD Foundation

5 years agoMFC r333176:
tuexen [Thu, 31 May 2018 16:48:08 +0000 (16:48 +0000)]
MFC r333176:

Fix in the documentation that the default hop limit is not 30, but
the value of the sysctl variable net.inet6.ip6.hlim.
This is true since
https://svnweb.freebsd.org/base?view=revision&revision=122574

The default of 30 (which was correct up to r122574) was incorrectly
documented in
https://svnweb.freebsd.org/base?view=revision&revision=130268

Thanks to Timo Voelker for makeing me aware of the inconsistency
between to code and the documentation.

Approved by: re@ (marius)

5 years agoMFC r333382:
tuexen [Thu, 31 May 2018 16:14:45 +0000 (16:14 +0000)]
MFC r333382:

When reporting ERROR or ABORT chunks, don't use more data
that is guaranteed to be contigous.
Thanks to Felix Weinrank for finding and reporting this bug
by fuzzing the usrsctp stack.

MFC r333386:

Fix two typos reported by N. J. Mann, which were introduced in
https://svnweb.freebsd.org/changeset/base/333382 by me.

Approved by: re@ (marius)

5 years agoMFC r334176:
brooks [Thu, 31 May 2018 16:01:10 +0000 (16:01 +0000)]
MFC r334176:

Indicate the brk/sbrk are deprecated and not portable.

More firmly suggest mmap(2) instead.

Include the history of arm64 and riscv shipping without brk/sbrk.

Mention that sbrk(0) produces unreliable results.

Approved by: re (kib)
Reviewed by: emaste, Marcin Cieślak
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D15535

5 years agoMFC r333186:
tuexen [Thu, 31 May 2018 16:00:03 +0000 (16:00 +0000)]
MFC r333186:

Send an ICMPv6 PacketTooBig message in case of forwading a packet which
is too big for the outgoing interface and no firewall is involed.
This problem was introduced in
https://svnweb.freebsd.org/changeset/base/324996
Thanks to Irene Ruengeler for finding the bug and testing the fix.

Approved by: re

5 years agoMFC r329276,r329451,r330294,r330414,r330415,r330418,r331109,r332394,r332398,
mjg [Thu, 31 May 2018 15:58:28 +0000 (15:58 +0000)]
MFC r329276,r329451,r330294,r330414,r330415,r330418,r331109,r332394,r332398,
    r333831:

    rwlock: diff-reduction of runlock compared to sx sunlock

==

    Undo LOCK_PROFILING pessimisation after r313454 and r313455

    With the option used to compile the kernel both sx and rw shared ops would
    always go to the slow path which added avoidable overhead even when the
    facility is disabled.

    Furthermore the increased time spent doing uncontested shared lock acquire
    would be bogusly added to total wait time, somewhat skewing the results.

    Restore old behaviour of going there only when profiling is enabled.

    This change is a no-op for kernels without LOCK_PROFILING (which is the
    default).

==

    sx: fix adaptive spinning broken in r327397

    The condition was flipped.

    In particular heavy multithreaded kernel builds on zfs started suffering
    due to nested sx locks.

    For instance make -s -j 128 buildkernel:

    before: 3326.67s user 1269.62s system 6981% cpu 1:05.84 total
    after: 3365.55s user 911.27s system 6871% cpu 1:02.24 total

==

    locks: fix a corner case in r327399

    If there were exactly rowner_retries/asx_retries (by default: 10) transitions
    between read and write state and the waiters still did not get the lock, the
    next owner -> reader transition would result in the code correctly falling
    back to turnstile/sleepq where it would incorrectly think it was waiting
    for a writer and decide to leave turnstile/sleepq to loop back. From this
    point it would take ts/sq trips until the lock gets released.

    The bug sometimes manifested itself in stalls during -j 128 package builds.

    Refactor the code to fix the bug, while here remove some of the gratituous
    differences between rw and sx locks.

==

    sx: don't do an atomic op in upgrade if it cananot succeed

    The code already pays the cost of reading the lock to obtain the waiters
    flag. Checking whether there is more than one reader is not a problem and
    avoids dirtying the line.

    This also fixes a small corner case: if waiters were to show up between
    reading the flag and upgrading the lock, the operation would fail even
    though it should not. No correctness change here though.

==

    mtx: tidy up recursion handling in thread lock

    Normally after grabbing the lock it has to be verified we got the right one
    to begin with. However, if we are recursing, it must not change thus the
    check can be avoided. In particular this avoids a lock read for non-recursing
    case which found out the lock was changed.

    While here avoid an irq trip of this happens.

==

    locks: slightly depessimize lockstat

    The slow path is always taken when lockstat is enabled. This induces
    rdtsc (or other) calls to get the cycle count even when there was no
    contention.

    Still go to the slow path to not mess with the fast path, but avoid
    the heavy lifting unless necessary.

    This reduces sys and real time during -j 80 buildkernel:
    before: 3651.84s user 1105.59s system 5394% cpu 1:28.18 total
    after: 3685.99s user 975.74s system 5450% cpu 1:25.53 total
    disabled: 3697.96s user 411.13s system 5261% cpu 1:18.10 total

    So note this is still a significant hit.

    LOCK_PROFILING results are not affected.

==

    rw: whack avoidable re-reads in try_upgrade

==

    locks: extend speculative spin waiting for readers to drain

    Now that 10 years have passed since the original limit of 10000 was
    committed, bump it a little bit.

    Spinning waiting for writers is semi-informed in the sense that we always
    know if the owner is running and base the decision to spin on that.
    However, no such information is provided for read-locking. In particular
    this means that it is possible for a write-spinner to completely waste cpu
    time waiting for the lock to be released, while the reader holding it was
    preempted and is now waiting for the spinner to go off cpu.

    Nonetheless, in majority of cases it is an improvement to spin instead of
    instantly giving up and going to sleep.

    The current approach is pretty simple: snatch the number of current readers
    and performs that many pauses before checking again. The total number of
    pauses to execute is limited to 10k. If the lock is still not free by
    that time, go to sleep.

    Given the previously noted problem of not knowing whether spinning makes
    any sense to begin with the new limit has to remain rather conservative.
    But at the very least it should also be related to the machine. Waiting
    for writers uses parameters selected based on the number of activated
    hardware threads. The upper limit of pause instructions to be executed
    in-between re-reads of the lock is typically 16384 or 32678. It was
    selected as the limit of total spins. The lower bound is set to
    already present 10000 as to not change it for smaller machines.

    Bumping the limit reduces system time by few % during benchmarks like
    buildworld, buildkernel and others. Tested on 2 and 4 socket machines
    (Broadwell, Skylake).

    Figuring out how to make a more informed decision while not pessimizing
    the fast path is left as an exercise for the reader.

==

    fix uninitialized variable warning in reader locks

Approved by: re (marius)

5 years agoMFC SVN r334261-334262,334359: dwatch(1) touch-ups
dteske [Wed, 30 May 2018 18:27:48 +0000 (18:27 +0000)]
MFC SVN r334261-334262,334359: dwatch(1) touch-ups

r334261: Guard against error when given -t "*..."
r334262: Eliminate ANSI dimming in developer mode
r334359: Fix "-t test" for post-processing profiles

Bump FreeBSD_version directly in stable/11 for ports IGNORE (as in r334290)

Reviewed by: gjb
Approved by: re (gjb)
Sponsored by: Smule, Inc.

5 years agoMFC 333606: Make the common interrupt entry point labels local labels.
jhb [Tue, 29 May 2018 13:54:34 +0000 (13:54 +0000)]
MFC 333606: Make the common interrupt entry point labels local labels.

Kernel debuggers depend on symbol names to find stack frames with a
trapframe rather than a normal stack frame.  The labels used for the
shared interrupt entry point for the PTI and non-PTI cases did not
match the existing patterns confusing debuggers.  Add the '.L' prefix
to mark these symbols as local so they are not visible in the symbol
table.

Approved by: re (kib)

5 years agoMFC r334038:
kib [Tue, 29 May 2018 13:24:42 +0000 (13:24 +0000)]
MFC r334038:
Enable IBRS when entering an interrupt handler from usermode.

Approved by: re (marius)

5 years agoMFC r334027: xen-blkback: do not use state 3
royger [Tue, 29 May 2018 07:51:24 +0000 (07:51 +0000)]
MFC r334027: xen-blkback: do not use state 3

Linux will not connect to a backend that's in state 3
(XenbusStateInitialised), it needs to be in state 2
(XenbusStateInitWait) for Linux to attempt to connect to the
backend.

Approved by: re (kib)

5 years agoMFC r333990, r333992:
kib [Mon, 28 May 2018 10:55:09 +0000 (10:55 +0000)]
MFC r333990, r333992:
Add missed barrier for pm_gen/pm_active interaction.

Approved by: re (marius)

5 years agor334229 mismerged and broke kernel options CAM_IOSCHED_DYNAMIC.
sbruno [Sun, 27 May 2018 23:52:41 +0000 (23:52 +0000)]
r334229 mismerged and broke kernel options CAM_IOSCHED_DYNAMIC.

Fix that on this holiday weekend.

Approved by: re (implicit)

5 years agoActivate Wake On Lan features for Ice Lake and Cannon Lake devices.
sbruno [Sat, 26 May 2018 20:02:39 +0000 (20:02 +0000)]
Activate Wake On Lan features for Ice Lake and Cannon Lake devices.

This is a direct commit to stable/11 as its not needed in -current.

PR: 228302
Submitted by: Kaho Toshikazu <kaho@elam.kais.kyoto-u.ac.jp>
Approved by: re (kib)

5 years agoMFC r334111:
kib [Sat, 26 May 2018 14:31:54 +0000 (14:31 +0000)]
MFC r334111:
Note that PT_SETSTEP is auto-cleared.

Approved by: re (marius)

5 years agoMFC r323829
sbruno [Fri, 25 May 2018 23:18:06 +0000 (23:18 +0000)]
MFC r323829
  cam iosched: Add a handler for the quanta sysctl to enforce valid
               values

MFC r323831
    cam iosched: Schedule cam_iosched_ticker() quanta times per second

PR: 221956 221957
Submitted by: imp
Approved by: re (marius)

5 years agoMFC r334050, r334051:
markj [Fri, 25 May 2018 19:16:05 +0000 (19:16 +0000)]
MFC r334050, r334051:
Flush caches before initiating a microcode update on Intel CPUs.

Approved by: re (gjb, kib)

5 years agoMFC r334064:
kib [Fri, 25 May 2018 18:07:20 +0000 (18:07 +0000)]
MFC r334064:
Fix UP build.

Approved by: re (gjb)

5 years agoMFC r333392-r333393, r333427
cy [Fri, 25 May 2018 06:25:33 +0000 (06:25 +0000)]
MFC r333392-r333393, r333427

r333392:
Fix memory leak. (CID 1199373).

r333393:
Document intentional fallthrough. (CID 976535)

r333427:
Fix style error introduced in r333393.

Reported by: jhb, imp, phk

Approved by: re (delphij)

5 years agoUpdate stable/11 to BETA3 as part of the 11.2-RELEASE cycle.
gjb [Fri, 25 May 2018 00:00:00 +0000 (00:00 +0000)]
Update stable/11 to BETA3 as part of the 11.2-RELEASE cycle.

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

5 years agoMFC: r333955
marius [Thu, 24 May 2018 23:11:25 +0000 (23:11 +0000)]
MFC: r333955

- Unbreak booting sparc64 kernels after the metadata unification in
  r329190 (MFCed to stable/11 in r332150); sparc64 kernels are always
  64-bit but with that revision in place, the loader was treating them
  as 32-bit ones.
- In order to reduce the likelihood of this kind of breakage in the
  future, #ifdef out md_load() on sparc64 and make md_load_dual() -
  which is currently local to metadata.c anyway - static.
- Make md_getboothowto() - also local to metadata.c - static.
- Get rid of the unused DTB pointer on sparc64.

Approved by: re (kib)

5 years agoMFC: r333792
shurd [Thu, 24 May 2018 18:53:29 +0000 (18:53 +0000)]
MFC: r333792

Avoid spurious warnings when hardware LRO is enabled by not attempting
to configure invalid VNICs.

Approved by: re (gjb)
Submitted by:   bhargava.marreddy@broadcom.com
Sponsored by:   Broadcom Limited

5 years agoMFC r334004:
kib [Thu, 24 May 2018 13:17:24 +0000 (13:17 +0000)]
MFC r334004:
Add Intel Spec Store Bypass Disable control.

This also includes the i386/include/pcpu.h part of the r334018.

Security: CVE-2018-3639
Approved by: re (gjb)

5 years agoMFC r334004:
kib [Thu, 24 May 2018 12:14:14 +0000 (12:14 +0000)]
MFC r334004:
Add definition for Intel Speculative Store Bypass Disable MSR bits.

Security: CVE-2018-3639
Approved by: re (gjb)

5 years agoMFC r334003:
kib [Thu, 24 May 2018 11:59:33 +0000 (11:59 +0000)]
MFC r334003:
Preserve other bits in IA32_SPEC_CTL MSR when changing the IBRS and
STIBP states.

Approved by: re (gjb)

5 years agoMFC r333986:
ae [Thu, 24 May 2018 11:02:21 +0000 (11:02 +0000)]
MFC r333986:
  Remove check for matching the rulenum, ruleid and rule pointer from
  dyn_lookup_ipv[46]_state_locked(). These checks are remnants of not
  ready to be committed code, and they are there by accident.
  Due to the race these checks can lead to creating of duplicate states
  when concurrent threads in the same time will try to add state for two
  packets of the same flow, but in reverse directions and matched by
  different parent rules.

  Reported by: lev

MFC r334039:
  Restore the ability to keep states after parent rule deletion.

  This feature is disabled by default and was removed when dynamic states
  implementation changed to be lockless. Now it is reimplemented with small
  differences - when dyn_keep_states sysctl variable is enabled,
  dyn_match_ipv[46]_state() function doesn't match child states of deleted
  rule. And thus they are keept alive until expired. ipfw_dyn_lookup_state()
  function does check that state was not orphaned, and if so, it returns
  pointer to default_rule and its position in the rules map. The main visible
  difference is that orphaned states still have the same rule number that
  they have before parent rule deleted, because now a state has many fields
  related to rule and changing them all atomically to point to default_rule
  seems hard enough.

  Reported by: <lantw44 at gmail.com>
Approved by: re (kib)

5 years agoMFC r333892:
kib [Tue, 22 May 2018 14:36:46 +0000 (14:36 +0000)]
MFC r333892:
Fix PCID+PTI pmap operations on Xen/HVM.

Approved by: re (marius)

5 years agoMFC r333891:
kib [Tue, 22 May 2018 14:25:40 +0000 (14:25 +0000)]
MFC r333891:
Fix IBRS handling around MWAIT.

Approved by: re (marius)

5 years agoMFC r333896:
kib [Tue, 22 May 2018 14:08:54 +0000 (14:08 +0000)]
MFC r333896:
Style.

Approved by: re (marius)

5 years agoMFC r333099: Included opt_stack.h in Makefile, to fix module build outside kernel...
ram [Tue, 22 May 2018 10:23:12 +0000 (10:23 +0000)]
MFC r333099: Included opt_stack.h in Makefile, to fix module build outside kernel build environment.

PR: 227823
Reported by: eugen
Approved by: re

5 years agoMFC r333492:
ken [Mon, 21 May 2018 18:59:34 +0000 (18:59 +0000)]
MFC r333492:
  ------------------------------------------------------------------------
  r333492 | ken | 2018-05-11 08:50:26 -0600 (Fri, 11 May 2018) | 10 lines

  Clear out the entire structure, not just the size of a pointer to it.

  sys/dev/ocs/ocs_os.c:
   In ocs_thread_create(), use sizeof(*thread) (instead of
   sizeof(thread)) as the size argument to memset so that we clear
   out the entire thread structure instead of just a few bytes of it.

  Submitted by: jtl

  ------------------------------------------------------------------------

Approved by: re (marius, gjb)

5 years agoMFC r333715:
dim [Sun, 20 May 2018 16:03:21 +0000 (16:03 +0000)]
MFC r333715:

Pull in r322325 from upstream llvm trunk (by Matthias Braun):

  PeepholeOpt cleanup/refactor; NFC

  - Less unnecessary use of `auto`
  - Add early `using RegSubRegPair(AndIdx) =` to avoid countless
    `TargetInstrInfo::` qualifications.
  - Use references instead of pointers where possible.
  - Remove unused parameters.
  - Rewrite the CopyRewriter class hierarchy:
     - Pull out uncoalescable copy rewriting functionality into
       PeepholeOptimizer class.
     - Use an abstract base class to make it clear that rewriters are
       independent.
  - Remove unnecessary \brief in doxygen comments.
  - Remove unused constructor and method from ValueTracker.
  - Replace UseAdvancedTracking of ValueTracker with DisableAdvCopyOpt
    use.

Even though upstream marked this as "No Functional Change", it does
contain some functional changes, and these fix a compiler hang for one
particular source file in the devel/godot port.

Approved by: re (kib)
PR: 228261

5 years agoMFC r333623:
hselasky [Sat, 19 May 2018 19:09:41 +0000 (19:09 +0000)]
MFC r333623:
Add support for setting type of service, TOS, for outgoing RDMA connections
in the krping kernel test utility.

Approved by: re (gjb)
Sponsored by: Mellanox Technologies

5 years agoMFC r333534:
kib [Sat, 19 May 2018 18:02:46 +0000 (18:02 +0000)]
MFC r333534:
Add a test for vm86(2).

Approved by: re (gjb)

6 years agoUpdate stable/11 to BETA2 as part of the 11.2-RELEASE cycle.
gjb [Fri, 18 May 2018 14:59:04 +0000 (14:59 +0000)]
Update stable/11 to BETA2 as part of the 11.2-RELEASE cycle.

As 11.2-BETA2 needs to be rebuilt, this commit marks the real point
in time for the rename.

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

6 years agoMFC r315733, r315737, r315740, r330054:
gjb [Fri, 18 May 2018 14:57:58 +0000 (14:57 +0000)]
MFC r315733, r315737, r315740, r330054:

 r315733 (imp):
  Impelemnt ttys onifexists in init.

  Implement a new init(8) option in /etc/ttys. If this option is present
  on the entry in /etc/ttys, the entry will be active if and only if it
  exists.  If the name starts with a '/', it will be considered an
  absolute path. If not, it will be a path relative to /dev.

  This allows one to turn off video console getty that aren't present
  (while running a getty on them even when they aren't the system
  console). Likewise with serial ports.

  It differs from onifconsole in only requiring the device exist rather
  than it be listed as one of the system consoles.

 r315737 (ngie):
  Unbreak world by adding sys/stat.h for stat(2)

 r315740 (imp):
  Simplify the code a little.

 r330054 (trasz):
  Improve missing tty handling in init(8).  This removes a check that did
  nothing - it was checking for ENXIO, which, with devfs, is no longer
  returned - and was badly placed anyway, and replaces it with similar
  one that works, and is done just before starting getty, instead of being
  done when rereading ttys(5).

  From the practical point of view, this makes init(8) handle disappearing
  terminals (eg /dev/ttyU*) gracefully, without unneccessary getty restarts
  and resulting error messages.

Reported by: Bart Ender, Andre Albsmeier
PR: 228315
Blocks: 11.2-BETA2
Approved by: re (marius)
Sponsored by: The FreeBSD Foundation