]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
5 years agoMFC r339914:
tuexen [Sat, 3 Nov 2018 20:35:39 +0000 (20:35 +0000)]
MFC r339914:

Bump the number of fans supported from 8 to 12.
The number of fans on a PowerMac7,3 with liquid cooling is 9.

Approved by: re (kib@)
Reviewed by: andreast@
Differential Revision: https://reviews.freebsd.org/D17754

5 years agoUpdate stable/12 from BETA2 to BETA3 as part of the 12.0-RELEASE
gjb [Thu, 1 Nov 2018 23:56:10 +0000 (23:56 +0000)]
Update stable/12 from BETA2 to BETA3 as part of the 12.0-RELEASE
cycle.

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

5 years agoMFC: r339800 and r339802:
imp [Thu, 1 Nov 2018 21:28:22 +0000 (21:28 +0000)]
MFC: r339800 and r339802:

Fixes to ignore partial DEVICE_PATH items in  BOOT_PARAM objects that are
too short.

Approved by: re@ (glen)

5 years agoMFC r339849: lualoader: Fix try_include error handling
kevans [Thu, 1 Nov 2018 17:37:20 +0000 (17:37 +0000)]
MFC r339849: lualoader: Fix try_include error handling

The previous iteration of try_include attempted to be 'friendly' and error()
out if we hit an error that wasn't ENOENT. This was semi-OK, but fragile as
it relied on pattern matching the error message.

Move the responsibility for handling failure to the caller. Following
a common lua pattern, we'll return the return value of the underlying
require() on success, or false and an error message.

Approved by: re (gjb)

5 years agoMFC r339688:
markj [Thu, 1 Nov 2018 17:36:42 +0000 (17:36 +0000)]
MFC r339688:
Add an #include required after r339686.

Reported by: lwhsu
Approved by: re (gjb)

5 years agoMFC r339616:
markj [Thu, 1 Nov 2018 16:50:19 +0000 (16:50 +0000)]
MFC r339616:
Make it possible to disable NUMA support with a tunable.

PR: 231460
Approved by: re (gjb)

5 years agoMFC r339686:
markj [Thu, 1 Nov 2018 16:00:00 +0000 (16:00 +0000)]
MFC r339686:
Use a vm_domainset iterator in keg_fetch_slab().

Approved by: re (kib)

5 years agoMFC r339924:
hselasky [Thu, 1 Nov 2018 15:47:07 +0000 (15:47 +0000)]
MFC r339924:
Implement the dump_stack() function in the LinuxKPI.

Approved by: re (gjb)
Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies

5 years agoMFC r339661, r339669:
markj [Thu, 1 Nov 2018 15:19:36 +0000 (15:19 +0000)]
MFC r339661, r339669:
Refactor domainset iterators for use by malloc(9) and UMA.

Approved by: re (gjb)

5 years agoMFC r339923:
hselasky [Thu, 1 Nov 2018 14:42:14 +0000 (14:42 +0000)]
MFC r339923:
Implement __KERNEL_DIV_ROUND_UP() function macro in the LinuxKPI.

Approved by: re (kib)
Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies

5 years agoMFC r339868:
hselasky [Thu, 1 Nov 2018 08:59:18 +0000 (08:59 +0000)]
MFC r339868:
Implement dma_pool_zalloc() in the LinuxKPI.

Approved by: re (rgrimes)
Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies

5 years agoMFC r339585:
whu [Thu, 1 Nov 2018 08:08:08 +0000 (08:08 +0000)]
MFC r339585:
 Do not drop UDP traffic when TXCSUM_IPV6 flag is on.

PR: 231797
Submitted by: whu
Reviewed by: dexuan
Obtained from: Kevin Morse
Approved by: re (rgrimes)
Sponsored by: Microsoft

5 years agoMFC r339873:
gjb [Wed, 31 Oct 2018 23:54:36 +0000 (23:54 +0000)]
MFC r339873:
 Set OPTIONS_UNSET in the argument list to env(1), and add
 AVAHI to the list.  This fixes the textproc/docproj build
 seemingly following FLAVORS being added.

 Specifically, the problem with the dependency chain here is:
 - textproc/docproj depends on print/cups, which sets AVAHI=on
   by default;
 - net/avahi-app depends on devel/gobject-introspection, which
   requires python3+;
 - graphics/netpbm depends on graphics/mesa-libs, which can
   only be built with python2.7;
 - textproc/docproj depends on a number of graphics ports for
   font rendering, etc.

MFC r339875:
 Pass _BRANCH in the reldoc target to ensure the correct
 src branch is used when generating the hardware.html page.

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

5 years agoMFC r339677-r339678, r339702, r339805: Lualoader Bugfixes
kevans [Wed, 31 Oct 2018 23:08:49 +0000 (23:08 +0000)]
MFC r339677-r339678, r339702, r339805: Lualoader Bugfixes

r339677:
lualoader: unload upon kernel change if a kernel was previously loaded

In the majority of cases, a kernel is not loaded before we hit the menu.
However, if a password is set, we'll trigger autoboot and have loadelf'd
beforehand. We also need to take into account one dropping to the loader
prompt and twiddling with things manually; if they try to toggle through
kernels, we'll assume they mean it.

r339678:
menu.lua: Abort autoboot sequence on failed command

Currently, a timeout in the menu autoboot sequence would effectively do
nothing. We would return from the autoboot handling, then begin processing
the menu without redrawing it.

This change makes the behavior a little more friendly. Returning the user to
the menu can't have any good effects, so abort the autoboot sequence and
drop to the loader prompt.

r339702:
lualoader: Improve module loading diagnostics

Some fixes:

- Maintain historical behavior more accurately w.r.t verbose_loading;
  verbose_loading strictly prints "${module_name...}" and later "failed!"
  or "ok" based on load success
- With or without verbose_loading, dump command_errbuf on load failure.
  This usually happens prior to ok/failed if we're verbose_loading

r339805:
lualoader: Always return a proper dictionary for blacklist

If module_blacklist isn't specified, we have an empty blacklist; effectively
the same as if module_blacklist="" were specified in loader.conf(5).

This was reported when switching to a BE that predated the module_blacklist
introduction, but the problem is valid all the same and likely to be tripped
over in other scenarios.

Approved by: re (kib)

5 years agoMFC r339843: Fix jail examples in jib, jng, README
dteske [Wed, 31 Oct 2018 23:07:47 +0000 (23:07 +0000)]
MFC r339843: Fix jail examples in jib, jng, README

Submitted by: Ryan Moeller <ryan@freqlabs.com>
Reported by: Ryan Moeller <ryan@freqlabs.com>
Approved by: re (gjb)
Sponsored by: Smule, Inc.
Differential Revision: https://reviews.freebsd.org/D17697

5 years agoMFhead r339643:
glebius [Wed, 31 Oct 2018 23:02:59 +0000 (23:02 +0000)]
MFhead r339643:

  Fix ipw_start(), where logic was reverted in r287197.

PR 232554
Approved by: re (kib)

5 years agoMFC r339601, r339603:
markj [Wed, 31 Oct 2018 19:28:05 +0000 (19:28 +0000)]
MFC r339601, r339603:
Swap in processes unless there's a global memory shortage.

Approved by: re (gjb)

5 years agoMFhead r339596:
glebius [Wed, 31 Oct 2018 18:01:02 +0000 (18:01 +0000)]
MFhead r339596:

  If we lost race or were migrated during bucket allocation for the per-CPU
  cache, then we put new bucket on generic bucket cache. However, code didn't
  honor UMA_ZONE_NOBUCKETCACHE flag, so potentially we could start a cache
  on a zone that clearly forbids that. Fix this.

Approved by: re (gjb)

5 years agoMFC r339931,r339933:
bz [Wed, 31 Oct 2018 14:03:48 +0000 (14:03 +0000)]
MFC r339931,r339933:

   As a follow-up to r339930 (r339951 in stable/12) and various reports
   implement logging in case we fail during module load because the pcpu
   or vnet module sections are full.
   We did return a proper error but not leaving any indication to the
   user as to what the actual problem was.

   Even worse, on 12/13 currently we are seeing an unrelated error (ENOSYS
   instead of ENOSPC, which gets skipped over in kern_linker.c) to be
   printed which made problem diagnostics even harder.

PR: 228854

Approved by: re (kib)

5 years agoMFC r339930:
bz [Wed, 31 Oct 2018 12:50:39 +0000 (12:50 +0000)]
MFC r339930:

   With more excessive use of modules, more kernel parts working with
   VIMAGE, and feature richness and global state increasing the 8k of
   vnet module space are no longer sufficient for people and loading
   multiple modules, e.g., pf(4) and ipl(4) or ipsec(4) will fail on
   the second module.

   Increase the module space to 8 * PAGE_SIZE which should be enough
   to hold multiple firewalls, ipsec, multicast (as in the old days was
   a problem), epair, carp, and any kind of other vnet enabled modules.

   Sadly this is a global byte array part of the vnet_set, so we cannot
   dynamically change its size;  otherwise a TUNABLE would have been
   a better solution.

PR: 228854
   Reported by: Ernie Luzar, Marek Zarychta

Approved by: re (kib)

5 years agoMFC r339682:
bz [Wed, 31 Oct 2018 12:49:18 +0000 (12:49 +0000)]
MFC r339682:

  rip6_input() inp validation after epoch(9)

  After r335924 rip6_input() needs inp validation to avoid
  working on FREED inps.

  Apply the relevant bits from r335497,r335501 (rip_input() change)
  to the IPv6 counterpart.

PR: 232194
  Reviewed by: rgrimes, ae (,hps)

Approved by: re (kib)

5 years agoMFC r339586:
bz [Wed, 31 Oct 2018 12:05:45 +0000 (12:05 +0000)]
MFC r339586:

  In bhyve's fbuf emulation improve the overall "usage" message and
  for the vga option, rather than printing the entire option string,
  only print vga (as we do for everything else).

MFC r339681:

  Allow the bhyve VNC server to listen on IPv6 for incoming connections.

  Alternatively to IPv4 address:port this will allow to listen on IPv6
  link-local (incl. scope), a specific address, or ::.  Addresses have
  to be given in RFC2732 format so that [::]:port parsing will work.

  This patch also starts to introduce WITH_INET/INET6_SUPPORT to bhyve.

PR: 232018
  Submitted by: Dave Rush (northwoodlogic.free gmail.com) (original)
  Reviewed by: Dave Rush (updated verison)

Approved by: re (kib)

5 years agoMFC r339452, r339664:
markj [Wed, 31 Oct 2018 02:02:12 +0000 (02:02 +0000)]
MFC r339452, r339664:
Create some global domainsets and refactor NUMA registration.

Approved by: re (kib)

5 years agoMFC r339848: mport tzdata 2018g
philip [Wed, 31 Oct 2018 01:57:51 +0000 (01:57 +0000)]
MFC r339848: mport tzdata 2018g

Approved by: re (kib)

5 years agoMFC r339934:
markj [Tue, 30 Oct 2018 23:09:04 +0000 (23:09 +0000)]
MFC r339934:
Revert r336984.

Approved by: re (kib)

5 years agoRestore backward compatibility for "attach" verb.
delphij [Tue, 30 Oct 2018 15:11:34 +0000 (15:11 +0000)]
Restore backward compatibility for "attach" verb.

In r332361 and r333439, two new parameters were added to geli attach
verb using gctl_get_paraml, which requires the value to be present.
This would prevent old geli(8) binary from attaching geli(4) device
as they have no knowledge about the new parameters.

Restore backward compatibility by treating the absense of these two
values as seeing the default value supplied by userland.

PR: 232595
Reviewed by: oshogbo
Approved by: re (rgrimes)

5 years agoMFC r339685
vmaffione [Tue, 30 Oct 2018 14:25:16 +0000 (14:25 +0000)]
MFC r339685

netmap: add man page for the vale-ctl program

Added man page for vale-ctl program.
Small fixes to vale-ctl, including the support for -m option
(to specify the netmap memory allocator id).

Approved by: re (rgrimes)

5 years agoMFC r339659:
vmaffione [Tue, 30 Oct 2018 10:01:15 +0000 (10:01 +0000)]
MFC r339659:

netmap: add man page for the bridge program

Added bridge(8).
Also, minor fixes to the netmap "bridge" application:
 - indentation fixes and code cleanup
 - better usage description
 - better processing of netmap flags

Approved by: re (rgrimes)

5 years agoMFC r339639:
vmaffione [Tue, 30 Oct 2018 08:36:36 +0000 (08:36 +0000)]
MFC r339639:

netmap: align codebase to the current upstream (sha 8374e1a7e6941)

Changelist:
    - Move large parts of VALE code to a new file and header netmap_bdg.[ch].
      This is useful to reuse the code within upcoming projects.
    - Improvements and bug fixes to pipes and monitors.
    - Introduce nm_os_onattach(), nm_os_onenter() and nm_os_onexit() to
      handle differences between FreeBSD and Linux.
    - Introduce some new helper functions to handle more host rings and fake
      rings (netmap_all_rings(), netmap_real_rings(), ...)
    - Added new sysctl to enable/disable hw checksum in emulated netmap mode.
    - nm_inject: add support for NS_MOREFRAG

Approved by: re (gjb)

5 years agoMFC r339626:
np [Tue, 30 Oct 2018 05:04:18 +0000 (05:04 +0000)]
MFC r339626:

cxgbe(4): Use automatic cidx updates with ofld and ctrl queues.

The bits that explicitly request cidx updates do not work reliably with
all possible WRs that can be sent over the queue.  The F_FW_WR_EQUIQ
requests that still remain may also have to be replaced with explicit
credit flush WRs in the future.

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

5 years agoMFC r339869,r339870:
tuexen [Mon, 29 Oct 2018 20:08:19 +0000 (20:08 +0000)]
MFC r339869,r339870:

Remove empty line.

Reported by: gjb@
Approved by: re (gjb@)

5 years agoMFC r339791:
tuexen [Mon, 29 Oct 2018 19:01:47 +0000 (19:01 +0000)]
MFC r339791:

Add initial descriptions for SCTP related MIB variable.
This work was mostly done by Marie-Helene Kvello-Aune.

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

5 years agoMFC r339600:
hselasky [Mon, 29 Oct 2018 14:06:20 +0000 (14:06 +0000)]
MFC r339600:
Make sure returned value is checked and assert a valid refcount.
While at it fix a print: Unsigned types cannot be negative.

Reviewed by: kib, mjg
Approved by: re (gjb)
Differential revision: https://reviews.freebsd.org/D17616
Sponsored by: Mellanox Technologies

5 years agoMFC r339588:
hselasky [Mon, 29 Oct 2018 13:17:41 +0000 (13:17 +0000)]
MFC r339588:
Resolve deadlock between epoch(9) and various network interface
SX-locks, during if_purgeaddrs(), by not allowing to hold the epoch
read lock over typical network IOCTL code paths. This is a regression
issue after r334305.

Reviewed by: ae (network)
Approved by: re (kib)
Differential revision: https://reviews.freebsd.org/D17647
Sponsored by: Mellanox Technologies

5 years agoMFC r339587:
hselasky [Mon, 29 Oct 2018 12:08:15 +0000 (12:08 +0000)]
MFC r339587:
Added support for formula-based arbitrary baud rates, in contrast to
the current fixed values, which enables use of rates above 1 Mbps.
Improved the detection of HXD chips, and the status flag handling as
well.

Submitted by: Gabor Simon <gabor.simon75@gmail.com>
PR: 225932
Approved by: re (kib)
Differential revision: https://reviews.freebsd.org/D16639
Sponsored by: Mellanox Technologies

5 years agoMFC r339740:
ae [Sun, 28 Oct 2018 18:21:14 +0000 (18:21 +0000)]
MFC r339740:
  Use correct format specificator to print setdscp action.

  PR: 232642
Approved by: re (rgrimes)

5 years agoMFC r339548:
vmaffione [Sun, 28 Oct 2018 07:50:15 +0000 (07:50 +0000)]
MFC r339548:

man: fix vale(4) port naming

The current documentation describing the syntax of a VALE port is wrong.
This patch fixes it to make it consistent.

Approved by: re (gjb)

5 years agoFollow up on r331936. gets_s(3) will also fail in the same way that
cy [Sun, 28 Oct 2018 00:57:39 +0000 (00:57 +0000)]
Follow up on r331936. gets_s(3) will also fail in the same way that
gets(3) does. This was missed in r331936.

Reported by: emaste@
Approved by: re (kib@)

5 years agoMFC r339489:
yuripv [Sat, 27 Oct 2018 21:17:01 +0000 (21:17 +0000)]
MFC r339489:

Add -b/-l options to localedef(1) to specify output endianness and use
it appropriately when building share/ctypedef and share/colldef.

This makes the resulting locale data in EL->EB (amd64->powerpc64) cross
build and in the native EB build match.  Revert the changes done to libc
in r308170 as they are no longer needed.

PR:             231965
Reviewed by:    bapt, emaste, sbruno, 0mp
Approved by:    re (gjb), kib (mentor)
Differential Revision:  https://reviews.freebsd.org/D17603

5 years agoMFC r339514:
jhibbits [Sat, 27 Oct 2018 03:16:32 +0000 (03:16 +0000)]
MFC r339514:

powerpcspe: Implement SPE exception handling

The Signal Processing Engine (SPE) found in Freescale e500 cores (and
others) offloads IEEE-754 compliance (NaN, Inf handling, overflow,
underflow) to software, most likely as a means of simplifying the APU
silicon.  Some software, like AbiWord, needs full IEEE-754 compliance,
including NaN handling.  Implement the necessary bits to enable it.

Approved by: re(kib)

5 years agoMFC r339532 (by glebius):
ae [Fri, 26 Oct 2018 10:20:03 +0000 (10:20 +0000)]
MFC r339532 (by glebius):
  Fix exiting an epoch(9) we never entered. May happen only with MAC.

Approved by: re (kib)

5 years agoUpdate stable/12 from BETA1 to BETA2 as part of the 12.0-RELEASE
gjb [Fri, 26 Oct 2018 00:00:13 +0000 (00:00 +0000)]
Update stable/12 from BETA1 to BETA2 as part of the 12.0-RELEASE
cycle.

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

5 years agoMFC r339741:
gjb [Thu, 25 Oct 2018 19:57:42 +0000 (19:57 +0000)]
MFC r339741:
 Update SHLIB_VERSION_NUMBER following the OpenSSL shared library
 number bump.

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

5 years agoMFC r339703:
brooks [Thu, 25 Oct 2018 17:00:39 +0000 (17:00 +0000)]
MFC r339703:

Deprecate a number of less used 10 and 10/100 Ethernet devices.

The current deprecated list is: ae, bm, cs, de, dme, ed, ep, ex, fe,
pcn, sf, sn, tl, tx, txp, vx, wb, xe

The list was defined as part of FCP-0101. Per the FCP, devices may be
removed from the deprecation list if enough users are found or they are
converted to iflib.

FCP: https://github.com/freebsd/fcp/blob/master/fcp-0101.md
Approved by: re (gjb)
Reviewed by: rgrimes
Differential Revision: https://reviews.freebsd.org/D17654

5 years agoMFC r339618:
tijl [Thu, 25 Oct 2018 16:01:10 +0000 (16:01 +0000)]
MFC r339618:

Define linuxkpi readq for 64-bit architectures.  It is used by drm-kmod.
Currently the compiler picks up the definition in machine/cpufunc.h.

Add compiler memory barriers to read* and write*.  The Linux x86
implementation of these functions uses inline asm with "memory" clobber.
The Linux x86 implementation of read_relaxed* and write_relaxed* uses the
same inline asm without "memory" clobber.

Implement ioread* and iowrite* in terms of read* and write* so they also
have memory barriers.

Qualify the addr parameter in write* as volatile.

Like Linux, define macros with the same name as the inline functions.

Only define 64-bit versions on 64-bit architectures because generally
32-bit architectures can't do atomic 64-bit loads and stores.

Regroup the functions a bit and add brief comments explaining what they do:
- __raw_read*, __raw_write*: atomic, no barriers, no byte swapping
- read_relaxed*, write_relaxed*: atomic, no barriers, little-endian
- read*, write*: atomic, with barriers, little-endian

Add a comment that says our implementation of ioread* and iowrite*
only handles MMIO and does not support port IO.

Reviewed by: hselasky
Approved by: re (gjb)

5 years agoMFC r339709:
kib [Thu, 25 Oct 2018 15:49:59 +0000 (15:49 +0000)]
MFC r339709:
Bump base OpenSSL libraries versions to avoid conflict with port's libraries.

Approved by: re (gjb)

5 years agoMFC r339493: add wdc as an alias for wds
imp [Thu, 25 Oct 2018 15:35:12 +0000 (15:35 +0000)]
MFC r339493: add wdc as an alias for wds

wdc is the preferred name for Western Digital. wds should never
have been committed in the first place. Add wdc as an alias for 12
and in 13 we'll retire the undocumented wds.

Approved by: re@ (kib)

5 years agoMFC r339451: objcopy: restore behaviour required by GCC's build
emaste [Thu, 25 Oct 2018 15:18:54 +0000 (15:18 +0000)]
MFC r339451: objcopy: restore behaviour required by GCC's build

In r339350 filter_reloc() was removed, to fix the case of stripping
statically linked binaries with relocations (which may come from ifunc
use, for example).  As a side effect this changed the behaviour when
stripping object files - the output was broken both before and after
r339350, in different ways.  Unfortunately GCC's build process relies
on the previous behaviour, so:

- Revert r339350, restoring filter_reloc().
- Fix an unitialized variable use (commited as r3638 in ELF Tool Chain).
- Change filter_reloc() to omit relocations referencing removed
  symbols, while retaining relocations with no symbol reference.
- Retain the entire relocation section if it references the dynamic
  symbol table (fix from kaiw in D17596).

PR: 232176
Approved by: re (gjb, kib)
Sponsored by: The FreeBSD Foundation

5 years agoMFC r339684:
gjb [Thu, 25 Oct 2018 15:11:18 +0000 (15:11 +0000)]
MFC r339684:
 Reduce the GCE image size to 27G to be lower than the free
 quota limit.

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

5 years agoMFC r339582:
hselasky [Thu, 25 Oct 2018 14:53:24 +0000 (14:53 +0000)]
MFC r339582:
Drop sequencer mutex around uiomove() and make sure we don't move more bytes
than is available, else a panic might happen.

Found by: Peter Holm <peter@holm.cc>
Approved by: re (rgrimes)
Sponsored by: Mellanox Technologies

5 years agoMFC r339584:
slavash [Thu, 25 Oct 2018 14:07:28 +0000 (14:07 +0000)]
MFC r339584:
mlx5: Notify user that the ConnectX-6 shutdown its port due to power limitation

If power exceed the slot limit, or slot limit is unknown the ConnectX-6
firmware will shutdown its port.
Inform the user via debug message.

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

5 years agoMFC r339581:
hselasky [Thu, 25 Oct 2018 12:27:16 +0000 (12:27 +0000)]
MFC r339581:
Fix off-by-one which can lead to panics.

Found by: Peter Holm <peter@holm.cc>
Approved by: re (kib)
Sponsored by: Mellanox Technologies

5 years agoMFC: r339562 (remove obsolete drivers from GENERIC)
imp [Thu, 25 Oct 2018 05:18:25 +0000 (05:18 +0000)]
MFC:  r339562 (remove obsolete drivers from GENERIC)

Remove the drivers we'd planned on removing from 12.x from GENERIC.

Approved by: re@ (rgrimes@)

5 years agoMFC r339509: Fix loader.conf(5) "password" feature
dteske [Wed, 24 Oct 2018 23:13:53 +0000 (23:13 +0000)]
MFC r339509: Fix loader.conf(5) "password" feature

Restore the ability to prevent the user from interrupting the boot process
without first entering the password stored in loader.conf(5).

PR: kern/207069
Reported by: david@dcrosstech.com
Approved by: re (rgrimes)
Sponsored by: Smule, Inc.

5 years agoMFC r339547:
kp [Wed, 24 Oct 2018 17:32:31 +0000 (17:32 +0000)]
MFC r339547:

vlan: Fix panic with lagg and vlan

vlan_lladdr_fn() is called from taskqueue, which means there's no vnet context
set. We can end up trying to send ARP messages (through the iflladdr_event
event), which requires a vnet context.

PR: 227654
Approved by: re (kib)

5 years agoRemove debug.witness.trace=0 from the installer sysctl.conf(5),
gjb [Tue, 23 Oct 2018 16:24:26 +0000 (16:24 +0000)]
Remove debug.witness.trace=0 from the installer sysctl.conf(5),
which should have been removed from stable/12 post-branch.

This is a direct commit to stable/12.

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

5 years agoMFC 339475: improve drm messaging in driver and UPDATING
imp [Tue, 23 Oct 2018 03:30:14 +0000 (03:30 +0000)]
MFC 339475: improve drm messaging in driver and UPDATING

Approved by: re@ (rgrimes)

5 years agoMFC r339503: Import tzdata 2018f
philip [Tue, 23 Oct 2018 01:39:26 +0000 (01:39 +0000)]
MFC r339503: Import tzdata 2018f

Approved by: re (kib)

5 years agoMFC r339462: make upgrade from previous FreeBSD versions less painful
eugen [Mon, 22 Oct 2018 17:27:36 +0000 (17:27 +0000)]
MFC r339462: make upgrade from previous FreeBSD versions less painful
and make previously working configuration like this work again:

gif_interfaces="gif0"
gifconfig_gif0="1.1.1.1 2.2.2.2"
ifconfig_gif0="inet 192.168.1.1 192.168.1.2 netmask 255.255.255.252"

PR: 204700
Approved by: re (gjb)

5 years agoUncomment -DNDEBUG in stable/12 after branching stable/12.
gjb [Sun, 21 Oct 2018 17:38:52 +0000 (17:38 +0000)]
Uncomment -DNDEBUG in stable/12 after branching stable/12.
This edit was a mistake in head, and should have been applied
to stable/12 upon branching, not head.

This is a direct commit to stable/12.

Reported by: jbeich, dim
Approved by: re (kib)
Sponsored by: The FreeBSD Foundation

5 years ago- Prune svn:mergeinfo from the new branch, as nothing has been merged
gjb [Fri, 19 Oct 2018 00:24:23 +0000 (00:24 +0000)]
- Prune svn:mergeinfo from the new branch, as nothing has been merged
  here.
- Remove debugging from GENERIC* kernel configurations
- Enable MALLOC_PRODUCTION
- Default dumpdev=NO
- Remove UPDATING entry regarding debugging features
- Switch 12.0 from -ALPHA10 to -BETA1 to prepare for builds.

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

5 years agoDo not flush cache for PCIe config window.
kib [Thu, 18 Oct 2018 20:49:16 +0000 (20:49 +0000)]
Do not flush cache for PCIe config window.

Apparently AMD machines cannot tolerate this. This was uncovered by
r339386, where cache flush started really flushing the requested range.

Introduce pmap_mapdev_pciecfg(), which simply does not flush cache
comparing with pmap_mapdev().  It assumes that the MCFG region was
never accessed through the cacheable mapping, which is most likely
true for machine to boot at all.

Note that i386 does not need the change, since the architecture
handles access per-page due to the KVA shortage, and page remapping
already does not flush the cache.

Reported and tested by: mjg, Mike Tancsa <mike@sentex.net>
Reviewed by: alc
Sponsored by: The FreeBSD Foundation
Approved by: re (gjb)
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D17612

5 years agoIn r78161 the lookup_set linker method was introduced which optionally
bz [Thu, 18 Oct 2018 20:20:41 +0000 (20:20 +0000)]
In r78161 the lookup_set linker method was introduced which optionally
returns the section start and stop locations as well as a count if the
caller asks for them.
There was only one out-of-file consumer of count which did not actually
use it and hence was eliminated in r339407.
In r194784 parse_dpcpu(), and in r195699 parse_vnet() (a copy of the
former) started to use the link_elf_lookup_set() interface internally
also asking for the count.

count is computed as the difference of the void **stop - void **start
locations and as such, if the absoulte numbers
(stop - start) % sizeof(void *) != 0
a round-down happens, e.g., **stop 0x1003 - **start 0x1000 => count 0.

To get the section size instead of "count is the number of pointer
elements in the section", the parse_*() functions do a
count *= sizeof(void *).
They use the result to allocate memory and copy the section data
into the "master" and per-instance memory regions with a size of
count.

As a result of count possibly round-down this can miss the last
bytes of the section.  The good news is that we do not touch
out of bounds memory during these operations (we may at a later stage
if the last bytes would overflow the master sections).
Given relocation in elf_relocaddr() works based on the absolute
numbers of start and stop, this means that we can possibly try to
access relocated data which was never copied and hence we get
random garbage or at best zeroed memory.

Stop the two (last) consumers of count (the parse_*() functions)
from using count as well, and calculate the section size based on
the absolute numbers of stop and start and use the proper size for
the memory allocation and data copies.  This will make the symbols
in the last bytes of the pcpu or vnet sections be presented as
expected.

PR: 232289
Approved by: re (gjb)
MFC after: 2 weeks

5 years agoThe handling of RST segments in the SYN-RCVD state exists in the
tuexen [Thu, 18 Oct 2018 19:21:18 +0000 (19:21 +0000)]
The handling of RST segments in the SYN-RCVD state exists in the
code paths. Both are not consistent and the one on the syn cache code
does not conform to the relevant specifications (Page 69 of RFC 793
and Section 4.2 of RFC 5961).

This patch fixes this:
* The sequence numbers checks are fixed as specified on
  page Page 69 RFC 793.
* The sysctl variable net.inet.tcp.insecure_rst is now honoured
  and the behaviour as specified in Section 4.2 of RFC 5961.

Approved by: re (gjb@)
Reviewed by: bz@, glebius@, rrs@,
Differential Revision: https://reviews.freebsd.org/D17595
Sponsored by: Netflix, Inc.

5 years agoCorrect the comment for the 20181015 entry in ObsoleteFiles.inc.
gjb [Thu, 18 Oct 2018 19:07:15 +0000 (19:07 +0000)]
Correct the comment for the 20181015 entry in ObsoleteFiles.inc.

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

5 years agoThe local_unbound service will configure and bootstrap itself, but only
des [Thu, 18 Oct 2018 18:33:44 +0000 (18:33 +0000)]
The local_unbound service will configure and bootstrap itself, but only
if a network connection is available.  This is not an issue when running
'service local_unbound setup' interactively, but can be on a diskless
system where local_unbound self-configures on every boot.  To address
this, add explicit dependencies on netwait and defaultroute.

Submitted by: eugen
Approved by: re (gjb)

5 years agoAdd support for DNS-over-TLS to the local_unbound service.
des [Thu, 18 Oct 2018 15:35:13 +0000 (15:35 +0000)]
Add support for DNS-over-TLS to the local_unbound service.

Approved by: re (kib)

5 years agoSupport RISC-V implementations that do not manage the A and D bits
br [Thu, 18 Oct 2018 15:25:07 +0000 (15:25 +0000)]
Support RISC-V implementations that do not manage the A and D bits
(e.g. RocketChip, lowRISC and derivatives).

RISC-V page table entries support A (accessed) and D (dirty) bits. The
spec makes hardware support for these bits optional. Implementations that
do not manage these bits in hardware raise page faults for accesses to a
valid page without A set and writes to a writable page without D set.
Check for these types of faults when handling a page fault and fixup the
PTE without calling vm_fault if they occur.

Reviewed by: jhb, markj
Approved by: re (gjb)
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D17424

5 years agoRevert r339421 due to unintended files included to commit.
br [Thu, 18 Oct 2018 15:17:58 +0000 (15:17 +0000)]
Revert r339421 due to unintended files included to commit.

Reported by: ian
Approved by: re (gjb)
Sponsored by: DARPA, AFRL

5 years agoSupport RISC-V implementations that do not manage the A and D bits
br [Thu, 18 Oct 2018 15:08:14 +0000 (15:08 +0000)]
Support RISC-V implementations that do not manage the A and D bits
(e.g. RocketChip, lowRISC and derivatives).

RISC-V page table entries support A (accessed) and D (dirty) bits. The
spec makes hardware support for these bits optional. Implementations that
do not manage these bits in hardware raise page faults for accesses to a
valid page without A set and writes to a writable page without D set.
Check for these types of faults when handling a page fault and fixup the
PTE without calling vm_fault if they occur.

Reviewed by: jhb, markj
Approved by: re (gjb)
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D17424

5 years agoFix typos from r339409.
jamie [Thu, 18 Oct 2018 15:02:57 +0000 (15:02 +0000)]
Fix typos from r339409.

Reported by: maxim
Approved by: re (gjb)

5 years agor334853 added a "socket destructor" callback. However, as implemented, it
jtl [Thu, 18 Oct 2018 14:20:15 +0000 (14:20 +0000)]
r334853 added a "socket destructor" callback. However, as implemented, it
was really a "socket close" callback.

Update the socket destructor functionality to run when a socket is
destroyed (rather than when it is closed). The original submitter has
confirmed that this change satisfies the intended use case.

Suggested by: rwatson
Submitted by: Michio Honda <micchie at sfc.wide.ad.jp>
Tested by: Michio Honda <micchie at sfc.wide.ad.jp>
Approved by: re (kib)
Differential Revision: https://reviews.freebsd.org/D17590

5 years agoWhile preparing to move init(8) to its own package as indicated
bz [Thu, 18 Oct 2018 02:07:30 +0000 (02:07 +0000)]
While preparing to move init(8) to its own package as indicated
in r339413, a current pkgbase update problem came up.  For users
testing pkgbase at the moment there is no (automatic) way to pick
up new base packages (yet).
As a result rather than also moving init(8) to its own package,
back out the part of the change in r339413 that moved rc* to its
own package and defer creating new packages until the
infrastructure is in place to handle these cases.
Both init and rc* are considered too problematic to be lost by
early adaptors at this stage.

Discussed with: brd
Reviewed by: brd
Approved by: re (gjb)

5 years agoFix modules/nvdimm build issues after r339391 by adding a dependency
bz [Thu, 18 Oct 2018 00:51:42 +0000 (00:51 +0000)]
Fix modules/nvdimm build issues after r339391 by adding a dependency
to the SRC list.  Sort the list while changing the line.

Reported by: ci.f.o, make -j24 buildkernel
Approved by: re (gjb)

5 years agoFix spelling of an error message and add warning to another error
bz [Wed, 17 Oct 2018 16:54:13 +0000 (16:54 +0000)]
Fix spelling of an error message and add warning to another error
case in tunefs(8).

Reviewed by: imp (2017 version of the same diff)
Approved by: re (gjb)
Differential Revision: https://reviews.freebsd.org/D10046

5 years agoMove the rc framework out of sbin/init into libexec/rc.
bz [Wed, 17 Oct 2018 16:49:11 +0000 (16:49 +0000)]
Move the rc framework out of sbin/init into libexec/rc.

The reasons for this are forward looking to pkgbase:
 * /sbin/init is a special binary; try not to replace it with
   every package update because an rc script was touched.
   (a follow-up commit will make init its own package)
 * having rc in its own place will allow more easy replacement
   of the rc framework with alternatives, such as openrc.

Discussed with: brd (during BSDCam), kmoore
Requested by: cem, bz
PR: 231522
Approved by: re (gjb)

5 years agoRevert r315571 for share/timedef/ca_IT.ISO8859-15.src, ca_IT is Catalan
yuripv [Wed, 17 Oct 2018 16:38:44 +0000 (16:38 +0000)]
Revert r315571 for share/timedef/ca_IT.ISO8859-15.src, ca_IT is Catalan
in Italy, and is not related to Canada.

While here, remove the header as we do NOT currently use CLDR data to
generate timedef, and it's misleading.

PR: 225855
Reviewed by: bapt
Approved by: re (gjb), kib (mentor)
Differential Revision: https://reviews.freebsd.org/D17551

5 years agoAdd a new jail permission, allow.read_msgbuf. When true, jailed processes
jamie [Wed, 17 Oct 2018 16:11:43 +0000 (16:11 +0000)]
Add a new jail permission, allow.read_msgbuf.  When true, jailed processes
can see the dmesg buffer (this is the current behavior).  When false (the
new default), dmesg will be unavailable to jailed users, whether root or
not.

The security.bsd.unprivileged_read_msgbuf sysctl still works as before,
controlling system-wide whether non-root users can see the buffer.

PR: 211580
Submitted by: bz
Approved by: re@ (kib@)
MFC after: 3 days

5 years agostrptime: fix parsing of tm_year when both %C and %y appear in the
yuripv [Wed, 17 Oct 2018 14:51:43 +0000 (14:51 +0000)]
strptime: fix parsing of tm_year when both %C and %y appear in the
format string in arbitrary order.  This makes the related test cases in
lib/libc/tests/time (not yet connected to the build) pass.

While here, don't error on negative tm_year value based on the
APPLICATION USAGE in
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/time.h.html
(glibc does the same):

tm_year is a signed value; therefore, years before 1900 may be represented.

Approved by: re (gjb), kib (mentor)
Differential Revision: https://reviews.freebsd.org/D17550

5 years agoThe countp argument passed to linker_file_lookup_set() in
bz [Wed, 17 Oct 2018 10:31:08 +0000 (10:31 +0000)]
The countp argument passed to linker_file_lookup_set() in
linker_load_dependencies() is unused, so no need to ask for the
value in first place.  Remove the unused "count" variable.

Approved by: re (kib)

5 years agoAdd initial driver for ACPI NFIT-enumerated NVDIMMs.
kib [Tue, 16 Oct 2018 20:12:35 +0000 (20:12 +0000)]
Add initial driver for ACPI NFIT-enumerated NVDIMMs.

Driver enumerates NVDIMMs.  Besides, for each found System Physical
Address (SPA) range, spaN geom provider is created, which allows
formatting and mounting the region as the normal volume.  Also,
/dev/nvdimm_spaN node is created, which can be read/written/mapped by
userspace, the mapping is zero-copy.

No support for block access methods implemented, labels are not
parsed.   No management interfaces are provided.

Tested by: Intel, NetApp
Sponsored by: The FreeBSD Foundation
Approved by: re (gjb)
MFC after: 2 weeks

5 years agoReparent a child of pdfork(2) to its reaper when the procdesc is closed.
markj [Tue, 16 Oct 2018 20:06:56 +0000 (20:06 +0000)]
Reparent a child of pdfork(2) to its reaper when the procdesc is closed.

Unconditionally reparenting to PID 1 breaks the procctl(2) reaper
functionality.

Add a regression test for this case.

Reviewed by: kib
Approved by: re (gjb)
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D17589

5 years agoFix for reception of large full speed isochronous frames via the transaction
hselasky [Tue, 16 Oct 2018 18:47:13 +0000 (18:47 +0000)]
Fix for reception of large full speed isochronous frames via the transaction
translator, when using the DWC OTG USB controller driver. Make sure to re-try
getting the complete split packets until a DATA0 packet is received. Larger
isochronous frames may be split into multiple MDATA packets terminated
by a single DATA0 packet.

PR: 230434
MFC after: 3 days
Approved by: re (gjb)
Sponsored by: Mellanox Technologies

5 years agoGet rid unneccessary useless calls to lseek(2) from getgrent(3).
trasz [Tue, 16 Oct 2018 18:17:07 +0000 (18:17 +0000)]
Get rid unneccessary useless calls to lseek(2) from getgrent(3).
Looks like this:

 fstatat(AT_FDCWD,"/etc/nsswitch.conf",{ mode=-rw-r--r-- ,inode=2167001,size=390,blksize=32768 },0x0) = 0 (0x0)
 open("/etc/group",O_RDONLY|O_CLOEXEC,0666)      = 3 (0x3)
 fstat(3,{ mode=-rw-r--r-- ,inode=2166927,size=919,blksize=32768 }) = 0 (0x0)
-lseek(3,0x0,SEEK_CUR)                           = 0 (0x0)
-lseek(3,0x0,SEEK_SET)                           = 0 (0x0)
 read(3,"# $FreeBSD: release/10.0.0/etc/g"...,32768) = 919 (0x397)
 close(3)                                        = 0 (0x0)

Reviewed by: kib
Approved by: re (gjb)
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D17571

5 years agoProvide pmap_large_map() KPI on amd64.
kib [Tue, 16 Oct 2018 17:28:10 +0000 (17:28 +0000)]
Provide pmap_large_map() KPI on amd64.

The KPI allows to map very large contigous physical memory regions
into KVA, which are not covered by DMAP.

I see both with QEMU and with some real hardware started shipping, the
regions for NVDIMMs might be very far apart from the normal RAM, and
we expect that at least initial users of NVDIMM could install very
large amount of such memory.  IMO it is not reasonable to extend DMAP
to cover that far-away regions both because it could overflow existing
4T window for DMAP in KVA, and because it costs in page table pages
allocations, for gap and for possibly unused NV RAM.

Also, KPI provides some special functionality for fast cache flushing
based on the knowledge of the NVRAM mapping use.

Reviewed by: alc, markj
Sponsored by: The FreeBSD Foundation
Approved by: re (gjb)
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D17070

5 years agoapropos/whatis: use output of manpath(1) to set defpaths if -M is not
yuripv [Tue, 16 Oct 2018 17:17:11 +0000 (17:17 +0000)]
apropos/whatis: use output of manpath(1) to set defpaths if -M is not
specified.  This fixes searching the paths specified in
/usr/local/etc/man.d/*.conf, as currently apropos/whatis from mandoc
suite aren't aware about them.

PR: 227922
Reviewed by: bapt
Approved by: re (gjb), kib (mentor)
Differential Revision: https://reviews.freebsd.org/D17454

5 years agoAdd clwb().
kib [Tue, 16 Oct 2018 17:00:42 +0000 (17:00 +0000)]
Add clwb().

Reviewed by: alc, markj
Sponsored by: The FreeBSD Foundation
Approved by: re (gjb)
MFC after: 3 days
Differential revision: https://reviews.freebsd.org/D17070

5 years agoInvalidate TLB on a local hart.
br [Tue, 16 Oct 2018 16:03:17 +0000 (16:03 +0000)]
Invalidate TLB on a local hart.

This was missed in r339367 ("Various fixes for TLB management on RISC-V.").

This fixes operation on lowRISC.

Reviewed by: jhb
Approved by: re (gjb)
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D17583

5 years agopw: (file == NULL) check is always false in read_userconfig(), remove
yuripv [Tue, 16 Oct 2018 16:00:41 +0000 (16:00 +0000)]
pw: (file == NULL) check is always false in read_userconfig(), remove
it.  Drop the now unused _PATH_PW_CONF definition. [1]

While here, change the last remaining hardcoded "/etc" to _PATH_PWD.

Noted by: glebius [1]
Reviewed by: eugen
Approved by: re (gjb), kib (mentor)
Differential Revision: https://reviews.freebsd.org/D17575

5 years agoPlug sendfile(2) on a listening socket with proper error code.
glebius [Tue, 16 Oct 2018 15:57:16 +0000 (15:57 +0000)]
Plug sendfile(2) on a listening socket with proper error code.

Reported by: ngie
Reviewed by: ngie
Approved by: re (delphij)

5 years agoIn r338102, the TCP reassembly code was substantially restructured. Prior
jtl [Tue, 16 Oct 2018 14:41:09 +0000 (14:41 +0000)]
In r338102, the TCP reassembly code was substantially restructured. Prior
to this change, the code sometimes used a temporary stack variable to hold
details of a TCP segment. r338102 stopped using the variable to hold
segments, but did not actually remove the variable.

Because the variable is no longer used, we can safely remove it.

Approved by: re (gjb)

5 years agoUpdate head from ALPHA9 to ALPHA10 as part of the 12.0-RELEASE
gjb [Tue, 16 Oct 2018 14:16:39 +0000 (14:16 +0000)]
Update head from ALPHA9 to ALPHA10 as part of the 12.0-RELEASE
cycle.

This is expected to be the final ALPHA build of this release
cycle, prior to branching stable/12.

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

5 years agoImport CK as of commit 5221ae2f3722a78c7fc41e47069ad94983d3bccb.
jtl [Tue, 16 Oct 2018 02:30:13 +0000 (02:30 +0000)]
Import CK as of commit 5221ae2f3722a78c7fc41e47069ad94983d3bccb.
This fixes two problems, one where epoch calls could occur before all
the readers had exited the epoch section, and one where the epoch calls
could be unnecessarily delayed.

Approved by: re (glebius)

5 years agoSkip VDEV_IO_DONE stage only for ZIO_TYPE_FREE.
mav [Mon, 15 Oct 2018 21:59:24 +0000 (21:59 +0000)]
Skip VDEV_IO_DONE stage only for ZIO_TYPE_FREE.

Device removal code uses zio_vdev_child_io() with ZIO_TYPE_NULL parent,
that never happened before.  It confused FreeBSD-specific TRIM code,
which does not use VDEV_IO_DONE for logical ZIO_TYPE_FREE ZIOs.  As
result of that stage being skipped device removal ZIOs leaked references
and memory that supposed to be freed by VDEV_IO_DONE, making it stuck.

It is a quick patch rather then a nice fix, but hopefully we'll be able
to drop it all together when alternative TRIM implementation finally get
landed.

PR: 228750, 229007
Discussed with: allanjude, avg, smh
Approved by: re (delphij)
MFC after: 5 days
Sponsored by: iXsystems, Inc.

5 years agoCorrect COMPAT* macro names in syscalls.master
kevans [Mon, 15 Oct 2018 21:35:57 +0000 (21:35 +0000)]
Correct COMPAT* macro names in syscalls.master

Both ^/sys/compat/freebsd32/syscalls.master and ^/sys/kern/syscalls.master
cited "COMPAT[n] #ifdef" instead of "COMPAT_FREEBSD[n] #ifdef" in places.

Approved by: re (glebius)

5 years agoAvoid OOB reads in memmem(3).
glebius [Mon, 15 Oct 2018 20:20:57 +0000 (20:20 +0000)]
Avoid OOB reads in memmem(3).

commit 51bdcdc424bd7169c8cccdc2de7cad17f5ea0f70
Author: Alexander Monakov <amonakov@ispras.ru>
Date:   Fri Jun 30 00:35:33 2017 +0300

    fix OOB reads in Xbyte_memmem

    Reported by Leah Neukirchen.

Reviewed by: emaste
Approved by: re (kib)

5 years agopw: respect path specified using -V when writing pw.conf, and -C is not
yuripv [Mon, 15 Oct 2018 20:11:53 +0000 (20:11 +0000)]
pw: respect path specified using -V when writing pw.conf, and -C is not
explicitly specified.  -V path is already used to determine which file
to read default values from, so it's only logical to write them to the
same file.

PR: 231653
Reviewed by: eugen, bapt
Approved by: re (gjb), kib (mentor)
Differential Revision: https://reviews.freebsd.org/D17566

5 years agoPrevent flex(1) from generating calls to isatty(3) - and, in turn,
trasz [Mon, 15 Oct 2018 19:48:36 +0000 (19:48 +0000)]
Prevent flex(1) from generating calls to isatty(3) - and, in turn,
TIOCGETA ioctls - when parsing nsswitch.conf(5).

Reviewed by: imp, markj
Approved by: re (gjb)
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D17564

5 years agoVarious fixes for TLB management on RISC-V.
jhb [Mon, 15 Oct 2018 18:56:54 +0000 (18:56 +0000)]
Various fixes for TLB management on RISC-V.

- Remove the arm64-specific cpu_*cache* and cpu_tlb_flush* functions.
  Instead, add RISC-V specific inline functions in cpufunc.h for the
  fence.i and sfence.vma instructions.
- Catch up to changes in the arm64 pmap and remove all the cpu_dcache_*
  calls, pmap_is_current, pmap_l3_valid_cacheable, and PTE_NEXT bits from
  pmap.
- Remove references to the unimplemented riscv_setttb().
- Remove unused cpu_nullop.
- Add a link to the SBI doc to sbi.h.
- Add support for a 4th argument in SBI calls.  It's not documented but
  it seems implied for the asid argument to SBI_REMOVE_SFENCE_VMA_ASID.
- Pass the arguments from sbi_remote_sfence*() to the SEE.  BBL ignores
  them so this is just cosmetic.
- Flush icaches on other CPUs when they resume from kdb in case the
  debugger wrote any breakpoints while the CPUs were paused in the IPI_STOP
  handler.
- Add SMP vs UP versions of pmap_invalidate_* similar to amd64.  The
  UP versions just use simple fences.  The SMP versions use the
  sbi_remove_sfence*() functions to perform TLB shootdowns.  Since we
  don't have a valid pm_active field in the riscv pmap, just IPI all
  CPUs for all invalidations for now.
- Remove an extraneous TLB flush from the end of pmap_bootstrap().
- Don't do a TLB flush when writing new mappings in pmap_enter(), only if
  modifying an existing mapping.  Note that for COW faults a TLB flush is
  only performed after explicitly clearing the old mapping as is done in
  other pmaps.
- Sync the i-cache on all harts before updating the PTE for executable
  mappings in pmap_enter and pmap_enter_quick.  Previously the i-cache was
  only sync'd after updating the PTE in pmap_enter.
- Use sbi_remote_fence() instead of smp_rendezvous in pmap_sync_icache().

Reviewed by: markj
Approved by: re (gjb, kib)
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D17414

5 years agoAdd support for Error Recovery
davidcs [Mon, 15 Oct 2018 18:39:33 +0000 (18:39 +0000)]
Add support for Error Recovery

Submitted by:Vaishali.Kulkarni@cavium.com
Approved by:re(kib)
MFC after:5 days