]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
6 years agoUpdate stable/11 to BETA2 as part of the 11.2-RELEASE cycle.
gjb [Thu, 17 May 2018 23:59:56 +0000 (23:59 +0000)]
Update stable/11 to BETA2 as part of the 11.2-RELEASE cycle.

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

6 years agoMFC: r333600 (phil)
marius [Thu, 17 May 2018 21:49:34 +0000 (21:49 +0000)]
MFC: r333600 (phil)

Handle thread-local storage (TLS) segments correctly when
copying (objcopy) and displaying (readelf) them.

PR: 227552
Submitted by: kaiw (maintainer)
Approved by: re (gjb)

6 years agoMFC: r333614
marius [Thu, 17 May 2018 21:23:14 +0000 (21:23 +0000)]
MFC: r333614

Let mmcsd_ioctl() ensure appropriate privileges via priv_check(9).

Approved by: re (gjb, kib)

6 years agoMFC: r333613
marius [Thu, 17 May 2018 21:22:19 +0000 (21:22 +0000)]
MFC: r333613

The broken DDR52 support of Intel Bay Trail eMMC controllers rumored
in the commit log of r321385 has been confirmed via the public VLI54
erratum. Thus, stop advertising DDR52 for these controllers.
Note that this change should hardly make a difference in practice as
eMMC chips from the same era as these SoCs most likely support HS200
at least, probably even up to HS400ES.

Approved by: re (gjb, kib)

6 years agoDocument r333410, i386 memory stick installer images now use MBR.
gjb [Thu, 17 May 2018 18:59:12 +0000 (18:59 +0000)]
Document r333410, i386 memory stick installer images now use MBR.

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

6 years agoFurther expand on the description of r333006, noting the ISO images
gjb [Thu, 17 May 2018 18:40:06 +0000 (18:40 +0000)]
Further expand on the description of r333006, noting the ISO images
can now be used to write to a memory stick, as well as a CD.

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

6 years agoDocument r333738, vxge(4) deprecation in FreeBSD 12.
gjb [Thu, 17 May 2018 18:40:05 +0000 (18:40 +0000)]
Document r333738, vxge(4) deprecation in FreeBSD 12.

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

6 years agoDocument r333412, lmc(4) deprecation in FreeBSD 12.
gjb [Thu, 17 May 2018 18:40:04 +0000 (18:40 +0000)]
Document r333412, lmc(4) deprecation in FreeBSD 12.

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

6 years agoDocument r333367, nxge(4) deprecation in FreeBSD 12.
gjb [Thu, 17 May 2018 18:40:03 +0000 (18:40 +0000)]
Document r333367, nxge(4) deprecation in FreeBSD 12.

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

6 years agoDocument r333171, ixgb(4) deprecation in FreeBSD 12.
gjb [Thu, 17 May 2018 18:40:02 +0000 (18:40 +0000)]
Document r333171, ixgb(4) deprecation in FreeBSD 12.

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

6 years agoDocument r332519, various GEOM classes deprecation in FreeBSD 12.
gjb [Thu, 17 May 2018 18:40:01 +0000 (18:40 +0000)]
Document r332519, various GEOM classes deprecation in FreeBSD 12.

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

6 years agoDocument r331882, cm(4) and fpa(4) deprecation in FreeBSD 12.
gjb [Thu, 17 May 2018 18:40:00 +0000 (18:40 +0000)]
Document r331882, cm(4) and fpa(4) deprecation in FreeBSD 12.

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

6 years agoMFC r333229:
kib [Thu, 17 May 2018 17:40:06 +0000 (17:40 +0000)]
MFC r333229:
Add helper macros to hide some boring repeatable ceremonies to define
ifuncs on x86.

Approved by: re (marius)

6 years agoMFC r333079 (imp):
gjb [Thu, 17 May 2018 17:00:49 +0000 (17:00 +0000)]
MFC r333079 (imp):
 No need to make objects here.

 This fixes polluting the src checkout when building arm64/aarch64.

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

6 years agoMFC r333737:
manu [Thu, 17 May 2018 17:00:07 +0000 (17:00 +0000)]
MFC r333737:

release: arm: Format FAT partition as FAT16

r332674 raised the size of the FAT partition from 2MB to 41MB for some
boards. But we format them in FAT12 and this size appears to be to big
for FAT12 and some SoC bootrom cannot cope with that.
Format the msdosfs partition as FAT16,

PR:             228285
Approved by: re (marius)

6 years agoMFC r333499
sbruno [Thu, 17 May 2018 16:32:38 +0000 (16:32 +0000)]
MFC r333499

Add deprecation notice for vxge.

This driver was merged to HEAD one week prior to Exar publicly
announcing theyhad left the Ethernet market. It is not known to be used
and has various code quality issues spotted by Brooks and Hiren. Retire
it in preparation for FreeBSD 12.0.

Submitted by: kbowling
Reported by: rgrimes
Approved by: re (gjb)
Relnotes: yes

6 years agoDocument r333312, tzdata version 2018e.
gjb [Thu, 17 May 2018 15:53:46 +0000 (15:53 +0000)]
Document r333312, tzdata version 2018e.

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

6 years agoDocument r332929, pwd_mkdb(8) deprecation notice when legacy (-l)
gjb [Thu, 17 May 2018 15:53:45 +0000 (15:53 +0000)]
Document r332929, pwd_mkdb(8) deprecation notice when legacy (-l)
mode is used.

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

6 years agoDocument r332460, makefs(8) default block and fragment sizes
gjb [Thu, 17 May 2018 15:53:44 +0000 (15:53 +0000)]
Document r332460, makefs(8) default block and fragment sizes
synced with newfs(8).

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

6 years agoDocument r322753, mount(8) 'autoro' option addition.
gjb [Thu, 17 May 2018 15:53:44 +0000 (15:53 +0000)]
Document r322753, mount(8) 'autoro' option addition.

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

6 years agoDocument r333006, amd64 hybrid ISO images.
gjb [Thu, 17 May 2018 15:53:43 +0000 (15:53 +0000)]
Document r333006, amd64 hybrid ISO images.

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

6 years agoDocument r332947, etdump(1) utility addition.
gjb [Thu, 17 May 2018 15:53:42 +0000 (15:53 +0000)]
Document r332947, etdump(1) utility addition.

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

6 years agoDocument r328138, indent(1) supports the SIMPLE_BACKUP_SUFFIX
gjb [Thu, 17 May 2018 15:53:41 +0000 (15:53 +0000)]
Document r328138, indent(1) supports the SIMPLE_BACKUP_SUFFIX
environment variable also used by patch(1).

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

6 years agoDocument r322509, top(1) enhancement to filter on multiple user
gjb [Thu, 17 May 2018 15:53:40 +0000 (15:53 +0000)]
Document r322509, top(1) enhancement to filter on multiple user
names.

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

6 years agoDocument r327837, lint(1) is no longer built and installed by
gjb [Thu, 17 May 2018 15:53:39 +0000 (15:53 +0000)]
Document r327837, lint(1) is no longer built and installed by
default.

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

6 years agoBump copyright year.
gjb [Thu, 17 May 2018 15:53:37 +0000 (15:53 +0000)]
Bump copyright year.

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

6 years agoDocument r322555, various bsdgrep(1) pattern matching fixes.
gjb [Thu, 17 May 2018 15:53:36 +0000 (15:53 +0000)]
Document r322555, various bsdgrep(1) pattern matching fixes.

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

6 years agoDocument r322525, rgrep(1) hard link addition.
gjb [Thu, 17 May 2018 15:53:35 +0000 (15:53 +0000)]
Document r322525, rgrep(1) hard link addition.

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

6 years agoDocument r324124, getconf(1) '-a' flag addition.
gjb [Thu, 17 May 2018 15:53:34 +0000 (15:53 +0000)]
Document r324124, getconf(1) '-a' flag addition.

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

6 years agoDocument r328139, du(1) '--si' option.
gjb [Thu, 17 May 2018 15:53:33 +0000 (15:53 +0000)]
Document r328139, du(1) '--si' option.

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

6 years agoDocument r328495, dtc(1) update from upstream.
gjb [Thu, 17 May 2018 15:53:32 +0000 (15:53 +0000)]
Document r328495, dtc(1) update from upstream.

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

6 years agoDocument r331465, BSD-licensed diff(1) imported from OpenBSD.
gjb [Thu, 17 May 2018 15:53:31 +0000 (15:53 +0000)]
Document r331465, BSD-licensed diff(1) imported from OpenBSD.

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

6 years agoMFC r333228
kib [Thu, 17 May 2018 15:24:53 +0000 (15:24 +0000)]
MFC r333228
Implement support for ifuncs in the kernel linker on x86.

MFC r333411:
Avoid calls to bzero() before ireloc

Approved by: re (marius)

6 years agoMFC r333458:
ae [Thu, 17 May 2018 10:01:47 +0000 (10:01 +0000)]
MFC r333458:
  Fix the printing of rule comments.

  Change uint8_t type of opcode argument to int in the print_opcode()
  function. Use negative value to print the rest of opcodes, because
  zero value is O_NOP, and it can't be uses for this purpose.

  Reported by: lev
Approved by: re (gjb)

6 years agoMFC 332891,332892: Fixes for atomic_*cmpset() on arm.
jhb [Wed, 16 May 2018 21:04:19 +0000 (21:04 +0000)]
MFC 332891,332892: Fixes for atomic_*cmpset() on arm.

332891:
Fix some harmless type mismatches in the ARM atomic_cmpset implementations.

The return value of atomic_cmpset() and atomic_fcmpset() is an int (which
is really a bool) that has the values 0 or 1.  Some of the inlines were
using the type being operated on (e.g. uint32_t) as either the return type
of the function, or the type of a local 'ret' variable used to hold the
return value.  Fix all of these to just use plain 'int'.  Due to C promotion
rules and the fact that the value can only be 0 or 1, these should all be
harmless.

332892:
Implement 32-bit atomic_fcmpset() in userland for armv4/v5.

- Add an implementation of atomic_fcmpset_32() using RAS for armv4/v5.
  This fixes recent world breakage due to use of atomic_fcmpset() in
  userland.
- While here, be more careful to not expose wrapper macros for 64-bit
  atomic_*cmpset to userland for armv4/v5 as only 32-bit cmpset is
  implemented.

This has been reviewed, but not runtime-tested, but should fix the arm.arm
and arm.armeb worlds that have been broken for a while.

Approved by: re (kib)

6 years agoMFC r333436: only launch getty if underlying device exists
imp [Wed, 16 May 2018 13:18:37 +0000 (13:18 +0000)]
MFC r333436: only launch getty if underlying device exists

Note: pc98 isn't run under VM, so I didn't do a direct commit to it.

Approved by: re@ (gjb@)

6 years agoMFC r333404, r333405:
kib [Wed, 16 May 2018 11:06:39 +0000 (11:06 +0000)]
MFC r333404, r333405:
Remove PG_U from the recursive pte for kernel pmap' PML4 page
and from the rest of the kernel pmap ptes.

Approved by: re (marius)

6 years agoMFC r331340, r331342, r331472, r332050, r333276, r333448:
np [Tue, 15 May 2018 18:41:01 +0000 (18:41 +0000)]
MFC r331340, r331342, r331472, r332050, r333276, r333448:

r331340:
cxgbe(4): Tunnel congestion drops on a port should be cleared when the
stats for that port are cleared.

r331342:
cxgbe(4): Do not read MFG diags information from custom boards.

r331472:
cxgbe(4): Always initialize requested_speed to a valid value.

This fixes an avoidable EINVAL when the user tries to disable AN after
the port is initialized but l1cfg doesn't have a valid speed to use.

r332050:
cxgbe(4): Always display an error message if SIOCSIFFLAGS will leave
IFF_UP and IFF_DRV_RUNNING out of sync.  ifhwioctl in the kernel pays no
attention to the return code from the driver ioctl during SIOCSIFFLAGS
so these messages are the only indication that the ioctl was called but
failed.

r333276:
cxgbe(4): Update all firmwares to 1.19.1.0.

r333448:
cxgbe(4): Disable write-combined doorbells by default.

This had been the default behavior but was changed accidentally as part
of the recent iw_cxgbe+OFED overhaul.  Fix another bug in that change
while here: the global knob affects all the adapters in the system and
should be left alone by per-adapter code.

Approved by: re@ (marius@)
Sponsored by: Chelsio Communications

6 years agoMFC r333521:
kib [Tue, 15 May 2018 12:11:52 +0000 (12:11 +0000)]
MFC r333521:
PROC_PDEATHSIG_CTL will appear first in 11.2.

Approved by: re (marius)

6 years agoMFC r333244:
ae [Tue, 15 May 2018 11:43:05 +0000 (11:43 +0000)]
MFC r333244:
  Immediately propagate EACCES error code to application from tcp_output.

  In r309610 and r315514 the behavior of handling EACCES was changed, and
  tcp_output() now returns zero when EACCES happens. The reason of this
  change was a hesitation that applications that use TCP-MD5 will be
  affected by changes in project/ipsec.

  TCP-MD5 code returns EACCES when security assocition for given connection
  is not configured. But the same error code can return pfil(9), and this
  change has affected connections blocked by pfil(9). E.g. application
  doesn't return immediately when SYN segment is blocked, instead it waits
  when several tries will be failed.

  Actually, for TCP-MD5 application it doesn't matter will it get EACCES
  after first SYN, or after several tries. Security associtions must be
  configured before initiating TCP connection.

  I left the EACCES in the switch() to show that it has special handling.

  Reported by: Andreas Longwitz <longwitz at incore dot de>
Approved by: re (marius)

6 years agoMFC r333504:
kib [Tue, 15 May 2018 11:25:10 +0000 (11:25 +0000)]
MFC r333504:
Remove dead declaration.

Approved by: re (marius)

6 years agoHandle the difference between HEAD and stable/11 tests build.
kib [Tue, 15 May 2018 10:10:14 +0000 (10:10 +0000)]
Handle the difference between HEAD and stable/11 tests build.
This is a direct commit to stable/11.

PR: 228018, 228233
Tested by: Helge Oldach <freebsd@oldach.net>
Sponsored by: The FreeBSD Foundation
Approved by: re (marius)

6 years agoMFC r333362:
hselasky [Tue, 15 May 2018 09:40:52 +0000 (09:40 +0000)]
MFC r333362:
Fix for missing network interface address event when adding the default IPv6
based link-local address.

The default link local address for IPv6 is added as part of bringing the
network interface up. Move the call to "EVENTHANDLER_INVOKE(ifaddr_event,)"
from the SIOCAIFADDR_IN6 ioctl(2) handler to in6_notify_ifa() which should
catch all the cases of adding IPv6 based addresses to a network interface.
Add a witness warning in case the event handler is not allowed to sleep.

Approved by: re (marius)
Reviewed by: network (ae), kib
Differential Revision: https://reviews.freebsd.org/D13407
Sponsored by: Mellanox Technologies

6 years agoMFC r331906:
gonzo [Tue, 15 May 2018 02:26:50 +0000 (02:26 +0000)]
MFC r331906:

Approved by: re (gjb)

Fix accidental USB port resets by GPIO on Zynq/Zedboard boards

The Zynq/Zedboard GPIO driver attempts to tri-state all GPIO pins on
boot up but the order in which I reset the hardware can cause the pins
to be briefly held low before being tri-stated.  This is a problem on
boards that use GPIO pins to reset devices.

In particular, the Zybo and ZC-706 boards use a GPIO pin as a USB PHY
reset.  If U-boot enables the USB port before booting the kernel, the
GPIO driver attach causes a glitch on the USB PHY reset and the USB
port loses power.  My fix is to have the GPIO driver leave the pins in
whatever configuration U-boot placed them.

PR: 225713
Submitted by: Thomas Skibo <thoma555-bsd@yahoo.com>

6 years agoMFC SVN r329188,329334,329353,329914,329995-329996: DTrace Enhancements
dteske [Tue, 15 May 2018 00:00:44 +0000 (00:00 +0000)]
MFC SVN r329188,329334,329353,329914,329995-329996: DTrace Enhancements

r329188: Use tabs in io.d, fix alignment issues, remove extra newlines
r329334: Add errno definitions to /usr/lib/dtrace/errno.d
r329353: Add inline to errno.d for translating int to string
r329914: Updates and enhancements to io.d to aid DTrace scripting
r329995: Updates and enhancements to signal.d to aid DTrace scripting
r329996: Consistent casing for fallback SIGCHLD (s/Unknown/unknown/)

MFC SVN r330559-330560,330672,332865-332867,333513-333519: dwatch(1)

r330559: Introduce dwatch(1) as a tool for making DTrace more useful
r330560: Bump dwatch(1) internal version from 1.0-beta-91 to 1.0
r330672: Fix display of wrong pid from dtrace_sched(4)
r332865: Add `-dev' option to aid debugging of profiles
r332866: Add profile for send(2)/recv(2) syscalls
r332867: Remove the line used to demonstrate `-dev' option
r333513: Bugfix, usage displayed with `-1Q'
r333514: Separate default values so `-[BK] num' don't affect usage
r333515: Simplify info message test
r333516: Export ARGV to profiles loaded via load_profile()
r333517: Allow `-E code' to override profile EVENT_DETAILS
r333518: Expose process for ip/tcp/udp
r333519: Refactor sendrecv profile

Reviewed by: markj, gnn, bdrewery (head; earlier version)
Approved by: re (gjb)
Relnotes: yes
Sponsored by: Smule, Inc.
Differential Revision: https://reviews.freebsd.org/D15418

6 years agoMFC r332317, r332439, r332442
gonzo [Mon, 14 May 2018 23:12:30 +0000 (23:12 +0000)]
MFC r332317, r332439, r332442

Approved by: re

r332317:
[man] Fix return type of BUS_ADD_CHILD(9)

Fix return type of BUS_ADD_CHILD(9) in SYNOPSYS section,
it should be device_t, not int

PR: 207389

r332439:
Fix quotes in the example code in syslog(3) BUGS section

mdoc treats verbatim quotes in .Dl as a string delimiter and does
not pass them to the rendered output. Use special char \*q to specify
double quote

PR: 216755

r332442:
Bump .Dd value (forgot to do this in r332439)

6 years agoMFC r303848
sbruno [Mon, 14 May 2018 22:56:41 +0000 (22:56 +0000)]
MFC r303848

Repair trivial panic in ng_uncallout.  Fixes bugzilla #211031

PR: 211031
Approved by: re (gjb)

6 years agoMFC r333239:
pfg [Mon, 14 May 2018 19:20:37 +0000 (19:20 +0000)]
MFC r333239:
msdosfs: long names of files are created incorrectly.

This fixes a regression that happened in r120492 (2003) where libkiconv
was introduced and we went from checking unlen to checking for '\0'.

PR: 111843
Patch by: Damjan Jovanovic
Approved by: re (gjb)

6 years agoMFC r333473:
gjb [Mon, 14 May 2018 17:43:43 +0000 (17:43 +0000)]
MFC r333473:
 Add a special GCE_LICENSE variable to Makefile.gce, which when set,
 will include license metadata in the resultant GCE image.

 GCE_LICENSE is unset by default, as it primarily pertains to images
 produced by the FreeBSD Project, but for downstream FreeBSD consumers,
 it can be set in the make(1) environment in the format of:

   --licenses="projects/PROJECT_ID/global/licenses/LICENSE_NAME"

 The "license" is not a license, per se, but required metadata that
 is required by the GCE marketplace.  For the FreeBSD Project, the
 license name is simply 'freebsd', with the description of 'FreeBSD'.

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

6 years agoMFC r333493:
trasz [Mon, 14 May 2018 15:35:54 +0000 (15:35 +0000)]
MFC r333493:

Set kldxref_enable="YES" for ARM images. Without it, the images are missing
the /boot/kernel/linker.hints file, which breaks loading some of the modules
with dependencies, eg cfiscsi.ko.

This is a minimal fix for ARM images, in order to safely MFC it before
11.2-RELEASE.  Afterwards, however, I believe we should actually just change
the default (as in, etc/defaults/rc.conf).  The reason is that it's required
for every image that's being cross-built, as kldxref(1) cannot handle files
for non-native architectures.  For the one that is not - amd64 - having it
on by default doesn't change anything - the script is noop if the linker.hints
already exists.

The long-term solution would be to rewrite kldxref(1) to handle other
architectures, and generate linker.hints at build time.

Approved by: re (marius@)
Sponsored by: DARPA, AFRL

6 years agoMFC r333460:
kib [Sun, 13 May 2018 17:44:26 +0000 (17:44 +0000)]
MFC r333460:
Add the test program to examine CPU behaviour for pop ss issue
CVE-2018-8897.

Approved by: re (marius)

6 years agoMFC r332504:
kib [Sat, 12 May 2018 11:40:34 +0000 (11:40 +0000)]
MFC r332504:
Set PG_G global mapping bit on the trampoline ptes.

Approved by: re (marius)

6 years agoMFC r332450:
kib [Sat, 12 May 2018 11:18:14 +0000 (11:18 +0000)]
MFC r332450:
Optimize context switch for PTI on PCID pmap.

Approved by: re (marius)

6 years agor285910 attempted to make shutdown() be POSIX compliant by returning
jtl [Sat, 12 May 2018 01:55:24 +0000 (01:55 +0000)]
r285910 attempted to make shutdown() be POSIX compliant by returning
ENOTCONN when shutdown() is called on unconnected sockets.  This change was
slightly modified by r316874, which returns ENOTCONN in the case of an
unconnected datagram socket, but still runs the shutdown code for the
socket.  This specifically supports the case where the user-space code is
using the shutdown() call to wakeup another thread blocked on the socket.

In PR 227259, a user is reporting that they have code which is using
shutdown() to wakup another thread blocked on a stream listen socket.  This
code is failing, while it used to work on FreeBSD 10 and still works on
Linux.

It seems reasonable to add another exception to support something users are
actually doing, which used to work on FreeBSD 10, and still works on Linux.
And, it seems like it should be acceptable to POSIX, as we still return
ENOTCONN.

This is a direct commit to stable/11.  The listen socket code changed
substantially in head, and the code change there will be substantially
more complex.  In the meantime, it seems to make sense to commit this
trivial fix to stable/11 given the fact that users appear to depend on
this behavior, this appears to have been an unintended change in stable/11,
and we did not announce the change.

PR: 227259
Reviewed by: ed
Approved by: re (gjb)
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D15021
Tested by: Eric Masson (emss at free.fr)

6 years agoCreate a sun7i-a20-bananapi.dtb hard link to bananapi.dtb to fix
gjb [Fri, 11 May 2018 21:46:53 +0000 (21:46 +0000)]
Create a sun7i-a20-bananapi.dtb hard link to bananapi.dtb to fix
a boot failure on the Banana Pi SoC.

This is a direct commit to stable/11, as the sun7i-a20-bananapi.dtb
file exists in head, but appears to have been part of a larger
rework of dtb-related files that may have larger consequences than
hard link creation.  Note: creating a hard link to dtb files was
an original fix in 12-CURRENT beforehand, introduced in r319603.

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

6 years agoMFC r333329, r333366, r333373
shurd [Fri, 11 May 2018 20:40:26 +0000 (20:40 +0000)]
MFC r333329, r333366, r333373

r333329: Fix off-by-one error requesting tx interrupt
r333366: Cleanup queues when iflib_device_register fails
r333373: Log iflib_tx_structures_setup failure in function

Approved by: re (gjb@)
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D15354

6 years agoRename stable/11 from PRERELEASE to BETA1 as part of the 11.2-RELEASE
gjb [Thu, 10 May 2018 23:58:33 +0000 (23:58 +0000)]
Rename stable/11 from PRERELEASE to BETA1 as part of the 11.2-RELEASE
cycle.

Update the default pkg(8) repository to the 'quarterly' branch to
prevent further 11.2 builds from downgrading packages when invoking
'pkg upgrade' for the duration of the cycle.

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

6 years agoMFC r333003
davidcs [Wed, 9 May 2018 19:52:33 +0000 (19:52 +0000)]
MFC r333003
Upgraded FW Related Files to version 5.4.67

Approved by:re(gjb)

6 years agoMFC r333019 r333046 r333085 r333086 r333132
sbruno [Wed, 9 May 2018 16:14:12 +0000 (16:14 +0000)]
MFC r333019 r333046 r333085 r333086 r333132

smartpqi(4):
- Microsemi SCSI driver for PQI controllers.
- Found on newer model HP servers.
- Restrict to AMD64 only as per developer request.

The driver provides support for the new generation of PQI controllers
from Microsemi. This driver is the first SCSI driver to implement the
PQI queuing model and it will replace the aacraid driver for Adaptec
Series 9 controllers.  HARDWARE Controllers supported by the driver include:

    HPE Gen10 Smart Array Controller Family
    OEM Controllers based on the Microsemi Chipset.

Approved by: re (gjb@)
Relnotes: yes

6 years agoMFC r333158:
mav [Wed, 9 May 2018 15:22:40 +0000 (15:22 +0000)]
MFC r333158:
Clean enclosure_table when resetting num_enc_table_entries to zero.

Garbage left there by r325363 in some scenarios found to lead to later
enclosure mapping failures.

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

6 years agoMFC r332966: Add deprecation notice for lmc(4)
emaste [Wed, 9 May 2018 14:50:32 +0000 (14:50 +0000)]
MFC r332966: Add deprecation notice for lmc(4)

We intend to remove support before FreeBSD 12 is branched.  These are
available only as 32-bit PCI devices.  The driver has an ambiguous
license and I have not been successful in contacting the driver's author
in order to address this.

The planned deprecation has been announced on -current and -stable; if
we receive feedback that the driver is still useful and we are able to
resolve the license issue this deprecation notice can be reverted.

Relnotes: Yes
Approved by: re
Sponsored by: The FreeBSD Foundation

6 years agoMFC r332446: switch i386 memstick installer images to MBR
emaste [Wed, 9 May 2018 14:38:07 +0000 (14:38 +0000)]
MFC r332446: switch i386 memstick installer images to MBR

Some BIOSes have trouble booting from GPT in non-UEFI mode.  This is
commonly reported with Lenovo laptops, including my x220.  As we do not
currently support booting FreeBSD/i386 via UEFI there's no reason to
prefer GPT.

The "vestigial swap partition" was added in r265017 to work around an
issue with loader's GPT support, so we should not need it when using
MBR.

We may want to make the same change to amd64, although the issue there is
mitigated by such systems booting via UEFI in the common case.

PR: 227422
Approved by: re
Relnotes: Yes
Sponsored by: The FreeBSD Foundation

6 years agoMFC r333182:
kib [Wed, 9 May 2018 11:47:05 +0000 (11:47 +0000)]
MFC r333182:
mlx5en: Always allow VLAN id 0.

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

6 years agoBelatedly bump copyright year.
gjb [Tue, 8 May 2018 18:03:08 +0000 (18:03 +0000)]
Belatedly bump copyright year.

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

6 years agoDocument EN-18:05, EN-18:06, SA-18:06.
gjb [Tue, 8 May 2018 17:59:25 +0000 (17:59 +0000)]
Document EN-18:05, EN-18:06, SA-18:06.

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

6 years agoMFC r333368: Prepare DB# handler for deferred trigger of watchpoints.
emaste [Tue, 8 May 2018 17:03:33 +0000 (17:03 +0000)]
MFC r333368: Prepare DB# handler for deferred trigger of watchpoints.

Prepare DB# handler for deferred trigger of watchpoints.

Since pop %ss/mov %ss instructions defer all interrupts and exceptions
for the next instruction, it is possible that the userspace watchpoint
trap executes on the first instruction of the kernel entry for
syscall/bpt.

In this case, DB# should be treated similarly to NMI: on amd64 we must
always load GSBASE even if the trap comes from kernel mode, and load
the kernel page table root into %cr3.  Moreover, the trap must
use the dedicated stack, because we are still on the user stack when
trapped on syscall entry.

For i386, we must reload %cr3.  The syscall instruction is not configured,
so there is no issue with executing on user stack when trapping.

Due to some CPU erratas it is not always possible to detect that the
userspace watchpoint triggered by inspecting %dr6.  In trap(), compare the
trap %rip with the known unsafe entry points and if matched pretend that
the watchpoint did not fire at all.

Thank you to the MSRC Incident Response Team, and in particular Greg
Lenti and Nate Warfield, for coordinating the response to this issue
across multiple vendors.

Thanks to Computer Recycling at The Working Center of Kitchener for
making hardware available to allow us to test the patch on additional
CPU families.

Reviewed by: jhb
Discussed with: Matthew Dillon
Tested by: emaste
Approved by: re (so blanket)
Security: CVE-2018-8897
Security: FreeBSD-SA-18:06.debugreg
Sponsored by: The FreeBSD Foundation

6 years agoMFC r333210
sbruno [Tue, 8 May 2018 16:56:14 +0000 (16:56 +0000)]
MFC r333210

Deprecation notice for nxge(4).  This driver will not appear
in FreeBSD 12 or later.

Approved by: re (gjb@)
Relnotes: yes

6 years agoMFC: r308728, r314369, r315243, r316026, r316581, r316616, r318359,
shurd [Tue, 8 May 2018 15:51:40 +0000 (15:51 +0000)]
MFC: r308728, r314369, r315243, r316026, r316581, r316616, r318359,
r319922, r319990, r321481, r323232-323233, r323321, r323874, r323955,
r324323, r324964, r325169, r325488, r325620, r326985, r326999-327001,
r327003, r329335

Update bnxt to latest -CURRENT.

Approved by: re (gjb@)
Differential Revision: https://reviews.freebsd.org/D15143

6 years agoMFC r333125:
kib [Tue, 8 May 2018 10:56:06 +0000 (10:56 +0000)]
MFC r333125:
Turn off IBRS on suspend.

Approved by: re (marius)

6 years agoMFC r333091:
kib [Tue, 8 May 2018 10:18:24 +0000 (10:18 +0000)]
MFC r333091:
Eliminate some vm object relocks in vm fault.

Approved by: re (marius)

6 years agoMFC r333208:
kib [Tue, 8 May 2018 10:03:32 +0000 (10:03 +0000)]
MFC r333208:
Style.

Approved by: re (marius)

6 years agoMFC r332877: Correct size for allocation and bzero of fdsr.
delphij [Tue, 8 May 2018 05:10:06 +0000 (05:10 +0000)]
MFC r332877: Correct size for allocation and bzero of fdsr.

Approved by: re (gjb)

6 years agoMFC r333149: ixl(4): Update to 1.9.9-k
erj [Mon, 7 May 2018 23:23:11 +0000 (23:23 +0000)]
MFC r333149: ixl(4): Update to 1.9.9-k

Major changes:

- Support for descriptor writeback mode (required by ixlv(4) for AVF support)
- Ability to disable firmware LLDP agent by user
- Fix for TX queue hang when using TSO
- Separate descriptor ring sizes for TX and RX rings

Approved by: re (marius)
Relnotes: yes
Sponsored by: Intel Corporation

6 years agoMFC r333253-r333254
shurd [Mon, 7 May 2018 23:10:02 +0000 (23:10 +0000)]
MFC r333253-r333254

Fixes invalid free()s when iflib_queues_alloc() fails, and remove unused
brscp variable.

Approved by: re (gjb@)

6 years agoDirect commit to stable/11 to fix botched r333338
shurd [Mon, 7 May 2018 22:33:40 +0000 (22:33 +0000)]
Direct commit to stable/11 to fix botched r333338

netmap nm_intr is not part of stable/11

Approved by: re (marius@)
Sponsored by: Limelight Networks

6 years agoMerge iflib changes to 11-STABLE
shurd [Mon, 7 May 2018 21:42:22 +0000 (21:42 +0000)]
Merge iflib changes to 11-STABLE

MFC r300147, r300153, r300154, r300215, r301563, r301567,
r302372, r307560, r307562, r307563, r307568, r308792, r311039,
r311837, r312755, r312903, r312905, r312924, r313248, r315217,
r315245, r315288, r316278, r316281, r316502, r316596, r317756,
r319917, r319921, r319984, r319989, r320059, r320609, r320611,
r321253, r321629, r321630, r322337, r322338, r322823, r323077,
r323825, r323876, r323879, r323887, r323941, r323942, r323943,
r323944, r323954, r324038, r324318, r324937, r325166, r325167,
r325168, r325201, r325241, r325245, r325487, r325494, r325901,
r326033, r326369, r326370, r326432, r326577, r326578, r326702,
r326706, r326775, r327013, r327017, r327052, r327072, r327098,
r327242, r327244, r327247, r329651, r329742, r330289, r330715,
r330721, r332419, r332422, r332729

Reviewed by: sbruno
Approved by: re (delphij@)
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D15142

6 years agoMFC r326571: ifconfig(8): Display extended compliance code string for SFP transceivers
erj [Mon, 7 May 2018 21:26:05 +0000 (21:26 +0000)]
MFC r326571:  ifconfig(8): Display extended compliance code string for SFP transceivers

Approved by: re (marius, gjb)

6 years agoMFC r319797, r320972:
erj [Mon, 7 May 2018 20:41:24 +0000 (20:41 +0000)]
MFC r319797, r320972:

r319797:
ixl(4)/ixlv(4): Fix some busdma tags and improper map NULL.

r320972:
ixl(4)/ixlv(4): Stop leaking every busdma entry in receive path

Approved by: re (marius)

6 years agoMFC r333262, r333264:
gjb [Mon, 7 May 2018 16:21:53 +0000 (16:21 +0000)]
MFC r333262, r333264:

 r333262:
  Ensure the ports and src trees are available on GCE images,
  satisfying a requirement to allow FreeBSD to be considered
  a top-tier supported OS in Google Compute Engine.

 r333264:
  Fix a typo.

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

6 years agoMFC r333108:
hselasky [Mon, 7 May 2018 15:07:26 +0000 (15:07 +0000)]
MFC r333108:
Define USEC_PER_MSEC and USEC_PER_SEC in the LinuxKPI.

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

6 years agoMFC r333247: Import tzdata 2018e
philip [Mon, 7 May 2018 06:58:19 +0000 (06:58 +0000)]
MFC r333247: Import tzdata 2018e

North Korea switches back to +09 on 2018-05-05.

This version more correctly models time stamps in time zones with
negative DST such as Europe/Dublin (from 1971 on), Europe/Prague
(1946/7), and Africa/Windhoek (1994/2017).  This does not affect the
UT offsets, only time zone abbreviations and the tm_isdst flag.

Approved by: re (kib)

6 years agoMFC r333234: zfs_ioctl: avoid out-of-bound read
emaste [Fri, 4 May 2018 14:49:37 +0000 (14:49 +0000)]
MFC r333234: zfs_ioctl: avoid out-of-bound read

admbugs: 796
Submitted by: Domagoj Stolfa <ds815@cam.ac.uk>
Reported by: Ilja Van Sprundel <ivansprundel@ioactive.com>
Approved by: re (early MFC as an EN candidate)

6 years agoMFC r332997:
brooks [Thu, 3 May 2018 20:05:57 +0000 (20:05 +0000)]
MFC r332997:

Translate 32-bit ifmedia requests into native ones.

We use transformation rather than accessors as virtually ever driver
implements SIOCGIFMEDIA and all would have to be touched.

Keep the code readable by always performing copies and (possiably no-op)
transforms.

Reviewed by: jhb, kib
Obtained from: CheriBSD
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D14996

6 years agoMFC r333092: sh: Don't have [ match any [[:class:]]
jilles [Thu, 3 May 2018 19:47:25 +0000 (19:47 +0000)]
MFC r333092: sh: Don't have [ match any [[:class:]]

6 years agoMFC r333115:
slavash [Thu, 3 May 2018 16:19:47 +0000 (16:19 +0000)]
MFC r333115:
libibumad/umad.c: In get_port, ignore sysctl get rate errors

This can cause ibpanic in ibstat when width is not set properly
as can occur when Ethernet port is connected to InfiniBand fabric.

ibpanic: [8167] main: stat of IB device 'mlx5_0' failed: m

With this change, Rate is displayed as 0 with ibstat for
this scenario.

Approved by:    hselasky (mentor), kib (mentor)
Sponsored by:   Mellanox Technologies

6 years agoMFC: r330803
marius [Thu, 3 May 2018 15:47:42 +0000 (15:47 +0000)]
MFC: r330803

Use FALLTHROUGH.

6 years agoMFC: r327312, r327842, r327865
marius [Thu, 3 May 2018 15:40:56 +0000 (15:40 +0000)]
MFC: r327312, r327842, r327865

- Add initial support for Intel Ice Lake and Cannon Lake Ethernet MACs.
- Add workaround for Intel Sky Lake and Kabby Lake Ethernet MAC erratum
  1.5.4.5.
- Fix uses of 1 << 31.

6 years agoMFC r333016:
ae [Thu, 3 May 2018 08:17:12 +0000 (08:17 +0000)]
MFC r333016:
  Merge r1.22-1.23 from NetBSD:
    Don't assume M_PKTHDR is set only on the first mbuf of the chain.
    The check is replaced by (m1 != m), which is equivalent to the previous
    code: we want to modify m->m_pkthdr.len only when 'm' was not passed in
    m_adj().

    Fix a pretty bad mistake, that has always been there:
     m_adj(m1, -(m1->m_len - roff));
     if (m1 != m)
   m->m_pkthdr.len -= (m1->m_len - roff);

    This is wrong: m_adj() will modify m1->m_len, so we're using a wrong
    value when manually adjusting m->m_pkthdr.len.

  Reported by: Maxime Villard <max at m00nbsd dot net>
  Obtained from: NetBSD

6 years agoMFC r332886:
ae [Thu, 3 May 2018 08:15:32 +0000 (08:15 +0000)]
MFC r332886:
  icmp6_reflect() sends ICMPv6 message with new IPv6 header. So, it is
  considered as originated by our host packet. And thus rcvif should be
  NULL, since it is used by ipfw(4) to determine that packet was originated
  from this host. Some of icmp6_reflect() consumers reuse mbuf and m_pkthdr
  without resetting rcvif pointer. To avoid this always reset m_pkthdr.rcvif
  pointer to NULL in icmp6_reflect(). Also remove such line and comment
  describing this from icmp6_error(), since it does not longer matters.

  PR: 227674

6 years agoMFC r332752: set kdb_why to "trap" when calling kdb_trap from trap_fatal
avg [Thu, 3 May 2018 07:47:03 +0000 (07:47 +0000)]
MFC r332752: set kdb_why to "trap" when calling kdb_trap from trap_fatal

This will allow to hook a ddb script to "kdb.enter.trap" event.
Previously there was no specific name for this event, so it could only
be handled by either "kdb.enter.unknown" or "kdb.enter.default" hooks.
Both are very unspecific.

Having a specific event is useful because the fatal trap condition is
very similar to panic but it has an additional property that the current
stack frame is the frame where the trap occurred.  So, both a register
dump and a stack bottom dump have additional information that can help
analyze the problem.

I have added the event only on architectures that have trap_fatal()
function defined.  I haven't looked at other architectures.  Their
maintainers can add support for the event later.

Sample script:
kdb.enter.trap=bt; show reg; x/aS $rsp,20; x/agx $rsp,20

Sponsored by: Panzura

6 years agoMFC r332730: don't check for kdb reentry in trap_fatal(), it's impossible
avg [Thu, 3 May 2018 07:31:09 +0000 (07:31 +0000)]
MFC r332730: don't check for kdb reentry in trap_fatal(), it's impossible

Sponsored by: Panzura

6 years agoMFC r333100:
hselasky [Thu, 3 May 2018 07:29:08 +0000 (07:29 +0000)]
MFC r333100:
Improve fix in r304629 by allowing configuration of the behaviour
through a SYSCTL instead of a compile time define.

Add quirk by default for all LynxPoint XHCI controllers.

PR: 227602
Sponsored by: Mellanox Technologies

6 years agoMFC r332559: mountd: fix a crash when getgrouplist reports too many groups
avg [Thu, 3 May 2018 07:28:04 +0000 (07:28 +0000)]
MFC r332559: mountd: fix a crash when getgrouplist reports too many groups

Sponsored by: Panzura

6 years agoMFC r332426: allow ZFS pool to have temporary name for duration of current import
avg [Thu, 3 May 2018 06:34:07 +0000 (06:34 +0000)]
MFC r332426: allow ZFS pool to have temporary name for duration of current import

The change adds -t <name> option to zpool create and -t option to zpool
import in its form with an old name and a new name.  This allows to
import (or create) a pool under a name that's different from its real,
permanent name without affecting that name.  This is useful when working
with VM images or images of other physical systems if they happen to
have a ZFS pool with the same name as the host system.

Sponsored by: Panzura (porting)

6 years agoMFC r333084:
kp [Wed, 2 May 2018 20:15:02 +0000 (20:15 +0000)]
MFC r333084:

pfctl: Don't break connections on skipped interfaces on reload

On reload we used to first flush everything, including the list of skipped
interfaces.  This can lead to termination of these connections if they send
packets before the new configuration is applied.

Note that this doesn't currently happen on 12 or 11, because of special EACCES
handling introduced in r315514. This special behaviour in tcp_output() may
change, hence the fix in pfctl.

PR: 214613
Submitted by: Andreas Longwitz <longwitz at incore.de>

6 years agoMFC r333137:
sbruno [Wed, 2 May 2018 15:21:51 +0000 (15:21 +0000)]
MFC r333137:

ixgb(4):  Add deprecation notice for this old and busted 10GE adapter.

This is a prequisite before we remove the driver from -current.

6 years agoMFC r332940:
kib [Wed, 2 May 2018 08:26:59 +0000 (08:26 +0000)]
MFC r332940:
Carefully update stack guard bytes inside __guard_setup().

6 years agoMFC r332932:
kib [Wed, 2 May 2018 08:24:59 +0000 (08:24 +0000)]
MFC r332932:
Correct undesirable interaction between caching of %cr4 in bhyve and
invltlb_glob().

6 years agoMFC r333026:
kib [Wed, 2 May 2018 08:19:06 +0000 (08:19 +0000)]
MFC r333026:
Handle Apollo Lake errata APL31.

MFC r333034:
Tweaks for r333026.

6 years agoMFC r333025:
kib [Wed, 2 May 2018 08:16:38 +0000 (08:16 +0000)]
MFC r333025:
Some style and minor code improvements for idle selection.