]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
4 years agobridge tests: Test for #216510
kp [Sun, 26 Apr 2020 16:27:03 +0000 (16:27 +0000)]
bridge tests: Test for #216510

We used to have an issue with recursive locking with
net.link.bridge.inherit_mac. This causes us to send an ARP request while
we hold the BRIDGE_LOCK, which used to cause us to acquire the
BRIDGE_LOCK again. We can't re-acquire it, so this caused a panic.

Now that we no longer need to acquire the BRIDGE_LOCK for
bridge_transmit() this should no longer panic. Test this.

PR: 216510
Reviewed by: emaste, philip
MFC after: 2 months
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D24251

4 years agobridge: epoch-ification
kp [Sun, 26 Apr 2020 16:22:35 +0000 (16:22 +0000)]
bridge: epoch-ification

Run the bridge datapath under epoch, rather than under the
BRIDGE_LOCK().

We still take the BRIDGE_LOCK() whenever we insert or delete items in
the relevant lists, but we use epoch callbacks to free items so that
it's safe to iterate the lists without the BRIDGE_LOCK.

Tests on mercat5/6 shows this increases bridge throughput significantly,
from 3.7Mpps to 18.6Mpps.

Reviewed by: emaste, philip, melifaro
MFC after: 2 months
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D24250

4 years agopf: Improve input validation
kp [Sun, 26 Apr 2020 16:16:39 +0000 (16:16 +0000)]
pf: Improve input validation

If we pass an anchor name which doesn't exist pfr_table_count() returns
-1, which leads to an overflow in mallocarray() and thus a panic.

Explicitly check that pfr_table_count() does not return an error.

Reported-by: syzbot+bd09d55d897d63d5f4f4@syzkaller.appspotmail.com
Reviewed by: melifaro
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D24539

4 years agomac_bsdextended: ATFify the tests
asomers [Sun, 26 Apr 2020 15:51:46 +0000 (15:51 +0000)]
mac_bsdextended: ATFify the tests

The new tests have more complete setup and cleanup, are more granular, and
correctly annotate expected failures and skipped tests. A follow-up commit
will resolve a conflict with the fusefs tests (bug 244229).

MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D24257

4 years agoFix order of arguments in fib[46]_lookup calls in SCTP.
melifaro [Sun, 26 Apr 2020 13:02:42 +0000 (13:02 +0000)]
Fix order of arguments in fib[46]_lookup calls in SCTP.

r360292 introduced the wrong order, resulting in returned
 nhops not being referenced, despite the fact that references
 were requested. That lead to random GPF after using SCTP sockets.

Special defined macro like IPV[46]_SCOPE_GLOBAL will be introduced
 soon to reduce the chance of putting arguments in wrong order.

Reported-by: syzbot+5c813c01096363174684@syzkaller.appspotmail.com
4 years agoProperly update AD field length in hccontrol(8).
hselasky [Sun, 26 Apr 2020 08:31:08 +0000 (08:31 +0000)]
Properly update AD field length in hccontrol(8).

While at it use strtol() instead of atoi() to support hexadecimal
numbers aswell as 10-base numbers.

Submitted by: Marc Veldman <marc@bumblingdork.com>
PR: 245899
MFC after: 1 week
Sponsored by: Mellanox Technologies

4 years agoFix handling of NMIs from unknown sources (BMC, hypervisor)
vangyzen [Sun, 26 Apr 2020 00:41:29 +0000 (00:41 +0000)]
Fix handling of NMIs from unknown sources (BMC, hypervisor)

Release kernels have no KDB backends enabled, so they discard an NMI
if it is not due to a hardware failure.  This includes NMIs from
IPMI BMCs and hypervisors.

Furthermore, the interaction of panic_on_nmi, kdb_on_nmi, and
debugger_on_panic is confusing.

Respond to all NMIs according to panic_on_nmi and debugger_on_panic.
Remove kdb_on_nmi.  Expand the meaning of panic_on_nmi by making
it a bitfield.  There are currently two bits: one for NMIs due to
hardware failure, and one for all others.  Leave room for more.

If panic_on_nmi and debugger_on_panic are both true, don't actually panic,
but directly enter the debugger, to allow someone to leave the debugger
and [hopefully] resume normal execution.

Reviewed by: kib
MFC after: 2 weeks
Relnotes: yes: machdep.kdb_on_nmi is gone; machdep.panic_on_nmi changed
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D24558

4 years agoAvoid the GEOM topology lock recursion when we automatically expand a pool.
pjd [Sat, 25 Apr 2020 21:45:31 +0000 (21:45 +0000)]
Avoid the GEOM topology lock recursion when we automatically expand a pool.

The steps to reproduce the problem:

mdconfig -a -t swap -s 3g -u 0
gpart create -s GPT md0
gpart add -t freebsd-zfs -s 1g md0
zpool create -o autoexpand=on foo md0p1
gpart resize -i 1 -s 2g md0

4 years agoAdd g_topology_locked() macro that returns true if we already hold the GEOM
pjd [Sat, 25 Apr 2020 21:41:09 +0000 (21:41 +0000)]
Add g_topology_locked() macro that returns true if we already hold the GEOM
topology lock.

4 years agoFix race between prebuilding libsbuf and libgeom
dim [Sat, 25 Apr 2020 20:24:41 +0000 (20:24 +0000)]
Fix race between prebuilding libsbuf and libgeom

The latter needs the former, but with a multi-job build on a fast
machine, the race is sometimes lost. This leads to "ld: error: unable to
find library -lsbuf", when linking libgeom.so.

Submitted by: kevans
MFC after: 3 days

4 years agorelease: arm64: rockpro64: Set hw.ncpu to 4
manu [Sat, 25 Apr 2020 20:00:44 +0000 (20:00 +0000)]
release: arm64: rockpro64: Set hw.ncpu to 4

Since there is known issue with big.LITTLE set the number of CPU to 4
which is the number present in the LITTLE cluster.

4 years agoarm64: rockchip: rk805: Use a tailq for the attached regulator
manu [Sat, 25 Apr 2020 15:34:48 +0000 (15:34 +0000)]
arm64: rockchip: rk805: Use a tailq for the attached regulator

Store the attached regulator in a tailq to later find them in ofw_map.
While here, do not attempt to attach a regulator without a name, a node
might exists but if it doesn't have a name the regulator is unused.

MFC after: 1 month

4 years agolibc: partially revert r326576
cem [Sat, 25 Apr 2020 14:24:54 +0000 (14:24 +0000)]
libc: partially revert r326576

In r326576 ("use @@@ instead of @@ in __sym_default"), an earlier version of
the phabricator-discussed patch was inadvertently committed.  The commit
message claims that @@@ means that weak is not needed, but that was due to a
misunderstanding of the use of weak symbols in this context by the submitted
in the first draft of the patch; the description text was not updated to
match the discussion.  As discussed in phabricator, weak is needed for
symbol interposing because of the behavior of our rtld, and is widely used
elsewhere in libc.

This partial revert restores the approved version of the patch and permits
symbol interposing for openat.

Reported by: Raymond Ramsden <rramsden AT isilon.com>
Reviewed by: dim, emaste, kib (2017)
Discussed with: kib (2020)
Differential Revision: https://reviews.freebsd.org/D11653

4 years agoFix LINT build #2 after r360292.
melifaro [Sat, 25 Apr 2020 11:35:38 +0000 (11:35 +0000)]
Fix LINT build #2 after r360292.

Pointyhat to: melifaro

4 years agoFix LINT build broken by r360292.
melifaro [Sat, 25 Apr 2020 10:31:56 +0000 (10:31 +0000)]
Fix LINT build broken by r360292.

4 years agoFix userland build broken by r360292.
melifaro [Sat, 25 Apr 2020 09:25:06 +0000 (09:25 +0000)]
Fix userland build broken by r360292.

4 years agoReorder initialization steps for given pin.
mmel [Sat, 25 Apr 2020 09:17:49 +0000 (09:17 +0000)]
Reorder initialization steps for given pin.
If pin is switched from fixed function to GPIO, it should have prepared
direction, pull-up/down and default value before function gets switched.
Otherwise we may produce unwanted glitch on output pin.
Right order of drive strength settings is questionable, but I think that
is slightly safer to do it also before function switch.

This fixes serial port corruption observed after DT 5.6 import.

MFC after: 1 week

4 years agoConvert route caching to nexthop caching.
melifaro [Sat, 25 Apr 2020 09:06:11 +0000 (09:06 +0000)]
Convert route caching to nexthop caching.

This change is build on top of nexthop objects introduced in r359823.

Nexthops are separate datastructures, containing all necessary information
 to perform packet forwarding such as gateway interface and mtu. Nexthops
 are shared among the routes, providing more pre-computed cache-efficient
 data while requiring less memory. Splitting the LPM code and the attached
 data solves multiple long-standing problems in the routing layer,
 drastically reduces the coupling with outher parts of the stack and allows
 to transparently introduce faster lookup algorithms.

Route caching was (re)introduced to minimise (slow) routing lookups, allowing
 for notably better performance for large TCP senders. Caching works by
 acquiring rtentry reference, which is protected by per-rtentry mutex.
 If the routing table is changed (checked by comparing the rtable generation id)
 or link goes down, cache record gets withdrawn.

Nexthops have the same reference counting interface, backed by refcount(9).
This change merely replaces rtentry with the actual forwarding nextop as a
 cached object, which is mostly mechanical. Other moving parts like cache
 cleanup on rtable change remains the same.

Differential Revision: https://reviews.freebsd.org/D24340

4 years agoRemove Mac OS/X macros that did nothing for FreeBSD.
rmacklem [Sat, 25 Apr 2020 02:18:59 +0000 (02:18 +0000)]
Remove Mac OS/X macros that did nothing for FreeBSD.

The macros CAST_USER_ADDR_T() and CAST_DOWN() were used for the Mac OS/X
port. The first of these macros was a no-op for FreeBSD and the second
is no longer used.
This patch gets rid of them. It also deletes the "mbuf_t" typedef which
is no longer used in the FreeBSD code from nfskpiport.h

This patch should not change semantics.

4 years agoPut advertising data in correct place.
hselasky [Sat, 25 Apr 2020 00:57:48 +0000 (00:57 +0000)]
Put advertising data in correct place.

Submitted by: Marc Veldman <marc@bumblingdork.com>
PR: 245848
MFC after: 1 week
Sponsored by: Mellanox Technologies

4 years agofreebsd-update: rehash certs
kevans [Sat, 25 Apr 2020 00:14:17 +0000 (00:14 +0000)]
freebsd-update: rehash certs

With the inclusion of caroot bits, we'll need to also rehash on update as we
do in mergemaster/etcupdate.

If certctl's installed on the system, just unconditionally rehash. This
isn't an expensive operation, and we can refine it to compare
INDEX-{OLD,NEW} later if we really want to.

Reviewed by: emaste, allanjude
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D21805

4 years agoDon't indirect user pointers directly in two 802.11s ioctls.
jhb [Fri, 24 Apr 2020 22:10:02 +0000 (22:10 +0000)]
Don't indirect user pointers directly in two 802.11s ioctls.

IEEE80211_MESH_RTCMD_ADD was invoking memcmp() to validate the
supplied address directly on the user pointer rather than first doing
a copyin() and validating the copied value.

IEEE80211_MESH_RTCMD_DELETE was passing the user pointer directly to
ieee80211_mesh_rt_del() rather than copying the user buffer into a
temporary kernel buffer.

Reviewed by: brooks, kib
Obtained from: CheriBSD
MFC after: 2 weeks
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D24562

4 years agoFix a typo
0mp [Fri, 24 Apr 2020 22:04:14 +0000 (22:04 +0000)]
Fix a typo

Reported by: pstef
MFC after: 2 days

4 years agoFix invalid use of macros and two typos
0mp [Fri, 24 Apr 2020 22:02:22 +0000 (22:02 +0000)]
Fix invalid use of macros and two typos

It turns out that currently mandoc(1) is not handling Fl in Ss
correctly (maybe it never was). Let's just replace "Fl S \&Ss ..."
with "-S ...". After all, this subsection title is stylized anyway, so Fl
is not that helpful.

MFC after: 2 weeks

4 years agoFix a race in pmap_emulate_modified().
markj [Fri, 24 Apr 2020 21:21:49 +0000 (21:21 +0000)]
Fix a race in pmap_emulate_modified().

pmap_emulate_modify() was assuming that no changes to the pmap could
take place between the TLB signaling the fault and
pmap_emulate_modify()'s acquisition of the pmap lock, but that's clearly
not even true in the uniprocessor case, nevermind the SMP case.

Submitted by: Nathaniel Filardo <nwf20@cl.cam.ac.uk>
Reviewed by: kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D24523

4 years agoFix a race between _pmap_unwire_ptp() and MipsDoTLBMiss().
markj [Fri, 24 Apr 2020 21:21:23 +0000 (21:21 +0000)]
Fix a race between _pmap_unwire_ptp() and MipsDoTLBMiss().

MipsDoTLBMiss() will load a segmap entry or pde, check that it isn't
zero, and then chase that pointer to a physical page. If that page has
been freed in the interim, it will read garbage and go on to populate
the TLB with it.

This can happen because pmap_unwire_ptp zeros out the pde and
vm_page_free_zero()s the ptp (or, recursively, zeros out the segmap
entry and vm_page_free_zero()s the pdp) without interlocking against
MipsDoTLBMiss(). The pmap is locked, and pvh_global_lock may or may not
be held, but this is not enough. Solve this issue by inserting TLB
shootdowns within _pmap_unwire_ptp(); as MipsDoTLBMiss() runs with IRQs
deferred, the IPIs involved in TLB shootdown are sufficient to ensure
that MipsDoTLBMiss() sees either a zero segmap entry / pde or a non-zero
entry and the pointed-to page still not freed.

Submitted by: Nathaniel Filardo <nwf20@cl.cam.ac.uk>
Reviewed by: kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D24491

4 years agoFix handling of 1GB mappings in the arm64 minidump code.
markj [Fri, 24 Apr 2020 18:47:57 +0000 (18:47 +0000)]
Fix handling of 1GB mappings in the arm64 minidump code.

For such mappings we need to dump 512 page table pages, not one, and
they need to be included in the pmap size recorded in the minidump
header.

MFC after: 2 weeks
Sponsored by: Juniper Networks, Klara Inc.

4 years agoRemove an obsolete TODO comment from several minidump implementations.
markj [Fri, 24 Apr 2020 18:47:42 +0000 (18:47 +0000)]
Remove an obsolete TODO comment from several minidump implementations.

The comment referenced a non-existent function, and these minidump
implementations already buffer discontiguous physical data pages by
mapping them into a single VA range that gets passed to the dump device,
so there is no real advantage in batching calls to blk_write().

The RISC-V and MIPS minidump implementations still write a page at a
time and so would benefit from some form of batching.

MFC after: 2 weeks
Sponsored by: Juniper Networks, Klara Inc.

4 years agoAdd PINE64 ROCK64 config for generation of release images
manu [Fri, 24 Apr 2020 16:33:07 +0000 (16:33 +0000)]
Add PINE64 ROCK64 config for generation of release images

4 years agoAdd PINE64 ROCKPro64 config for generation of release images
manu [Fri, 24 Apr 2020 16:32:25 +0000 (16:32 +0000)]
Add PINE64 ROCKPro64 config for generation of release images

Submitted by: Daniel Engberg
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D22538

4 years agoAdd support for generating release images using GPT for ARM
manu [Fri, 24 Apr 2020 16:31:27 +0000 (16:31 +0000)]
Add support for generating release images using GPT for ARM

Submitted by: Daniel Engberg (Original version)
Differential Revision: https://reviews.freebsd.org/D22537

4 years agoMap family 0x5F (Denverton) to goldmont.
mav [Fri, 24 Apr 2020 16:05:35 +0000 (16:05 +0000)]
Map family 0x5F (Denverton) to goldmont.

According to the 325462-071US document, they should be the same.

MFC after: 1 week

4 years agoAdd family 0x5F (Denverton) to PMC_CPU_INTEL_ATOM_GOLDMONT.
mav [Fri, 24 Apr 2020 15:09:30 +0000 (15:09 +0000)]
Add family 0x5F (Denverton) to PMC_CPU_INTEL_ATOM_GOLDMONT.

According to the 325462-071US document, they should be the same.

MFC after: 1 week

4 years agoRename two commands to match the Bluetooth specification in hccontrol(8).
hselasky [Fri, 24 Apr 2020 14:53:55 +0000 (14:53 +0000)]
Rename two commands to match the Bluetooth specification in hccontrol(8).
Fix some bad spelling while at it.

Submitted by: Marc Veldman <marc@bumblingdork.com>
PR: 245868
MFC after: 1 week
Sponsored by: Mellanox Technologies

4 years agoStop setting PG_U in bootstrap mappings.
markj [Fri, 24 Apr 2020 13:53:40 +0000 (13:53 +0000)]
Stop setting PG_U in bootstrap mappings.

These mappings are never visible to userspace as they get replaced when
the amd64 pmap is bootstrapped, but there is no need to set PG_U in the
first place.

Reviewed by: alc, kib
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D24547

4 years agoUPDATING: Fix the date of the closefrom(2) entry
kevans [Fri, 24 Apr 2020 12:57:03 +0000 (12:57 +0000)]
UPDATING: Fix the date of the closefrom(2) entry

Apologies; my internal calendar says it's still February, but that doesn't
seem to match reality where we've apparently advanced two months.

4 years agoUPDATING: add a note about closefrom(2) marked COMPAT12
kevans [Fri, 24 Apr 2020 12:54:35 +0000 (12:54 +0000)]
UPDATING: add a note about closefrom(2) marked COMPAT12

Some of the consumers in-base may make it enticing enough to ensure that
COMPAT_FREEBSD12, which is notably a fairly light option at the moment, is
included in custom kernel configs.

Suggested by: netchild
Casualty: mail jail

4 years agoRemove PCI_IO_WINDOW_OFFSET from the pci host generic fdt attachment.
andrew [Fri, 24 Apr 2020 11:03:15 +0000 (11:03 +0000)]
Remove PCI_IO_WINDOW_OFFSET from the pci host generic fdt attachment.

It doesn't seem to be needed, and breaks booting under bhyve/arm64.

Discussed with: br
MFC after: 2 weeks
Sponsored by: Innovate UK

4 years agoccp: add a new hardware ID, found on AMD Ryzen 3 3200U
avg [Fri, 24 Apr 2020 10:20:54 +0000 (10:20 +0000)]
ccp: add a new hardware ID, found on AMD Ryzen 3 3200U

pciconf reports the device as:
Family 17h (Models 10h-1fh) Platform Security Processor

dmesg:
ccp0: <AMD CCP-5a> mem 0xfe500000-0xfe5fffff,0xfe68c000-0xfe68dfff at device 0.2 on pci4
crypto: assign ccp0 driver id 1, flags 0x1000000

MFC after: 1 week

4 years agoBuild the arm64 loader with -ffixed-x18
andrew [Fri, 24 Apr 2020 10:03:11 +0000 (10:03 +0000)]
Build the arm64 loader with -ffixed-x18

This stops the compiler from using the x18 register. Some UEFI
implementations assume this will be preserved when calling the Boot
Services.

MFC after: 2 weeks
Sponsored by: Innovate UK

4 years agoacpi_video: fix a crash in detach with an LCD output
avg [Fri, 24 Apr 2020 09:32:20 +0000 (09:32 +0000)]
acpi_video: fix a crash in detach with an LCD output

The crash happened because of a video output object was removed from a
wrong container, crt_units instead of lcd_units.

MFC after: 1 week

4 years agoAdd support for LE advertising to hccontrol(8).
hselasky [Fri, 24 Apr 2020 08:07:59 +0000 (08:07 +0000)]
Add support for LE advertising to hccontrol(8).

Submitted by: Marc Veldman <marc@bumblingdork.com>
PR: 245848
MFC after: 1 week
Sponsored by: Mellanox Technologies

4 years agoacpi_iicbus: set device description in the probe method
avg [Fri, 24 Apr 2020 07:55:39 +0000 (07:55 +0000)]
acpi_iicbus: set device description in the probe method

Kernel prints the device announcement before the attach method is
called, so if the correct description is not set by the probe method,
then the announcement would have an incorrect one.

MFC after: 1 week

4 years agoig4: ensure that drivers always attach in correct order
avg [Fri, 24 Apr 2020 07:49:21 +0000 (07:49 +0000)]
ig4: ensure that drivers always attach in correct order

Use DRIVER_MODULE_ORDERED(SI_ORDER_ANY) so that ig4's ACPI attachment
happens after iicbus and acpi_iicbus drivers are registered.

I have seen a problem where iicbus attached under ig4 instead of
acpi_iicbus when ig4.ko was loaded with kldload.  I believe that that
happened because ig4 driver was a first driver to register, it attached
and created an iicbus child.  Then iicbus driver was registered and,
since it was the only driver that could attach to the iicbus child
device, it did exactly that.  After that acpi_iicbus driver was
registered.  It would be able to attach to the iicbus device, but it was
already attached, so nothing happened.

MFC after: 2 weeks

4 years agoImport tzdata 2020a
philip [Fri, 24 Apr 2020 05:05:58 +0000 (05:05 +0000)]
Import tzdata 2020a

Changes: https://github.com/eggert/tz/blob/2020a/NEWS

MFC after: 3 days

4 years agosysent: re-roll after 360236 (AUE_CLOSERANGE used)
kevans [Fri, 24 Apr 2020 01:30:33 +0000 (01:30 +0000)]
sysent: re-roll after 360236 (AUE_CLOSERANGE used)

4 years agoclose_range(2): use newly assigned AUE_CLOSERANGE
kevans [Fri, 24 Apr 2020 01:30:00 +0000 (01:30 +0000)]
close_range(2): use newly assigned AUE_CLOSERANGE

4 years agobsm: add AUE_CLOSERANGE
kevans [Fri, 24 Apr 2020 01:27:25 +0000 (01:27 +0000)]
bsm: add AUE_CLOSERANGE

AUE_CLOSERANGE has been accepted upstream as 43265; AUE_REALPATHAT has now
been upstreamed.

4 years agoUpdate jemalloc to version 5.2.1
vangyzen [Thu, 23 Apr 2020 23:57:43 +0000 (23:57 +0000)]
Update jemalloc to version 5.2.1

Revert r354606 to restore r354605.

Apply one line from jemalloc commit d01b425e5d1e1 in hash_x86_128()
to fix the build with gcc, which only allows a fallthrough attribute
to appear before a case or default label.

Submitted by: jasone in r354605
Discussed with: jasone
Reviewed by: bdrewery
MFC after: never, due to gcc 4.2.1
Relnotes: yes
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D24522

4 years agocxgbe/crypto: Fix the key size in a couple of places to catch up with
np [Thu, 23 Apr 2020 23:54:23 +0000 (23:54 +0000)]
cxgbe/crypto: Fix the key size in a couple of places to catch up with
the recent OCF refactor.

Sponsored by: Chelsio Communications

4 years agolibc: Shortcut if_indextoname() if index == 0
kp [Thu, 23 Apr 2020 21:16:51 +0000 (21:16 +0000)]
libc: Shortcut if_indextoname() if index == 0

If the index we're trying to convert is 0 we can avoid a potentially
expensive call to getifaddrs(). No interface has an ifindex of zero, so
we can handle this as an error: set the errno to ENXIO and return NULL.

Submitted by: Nick Rogers
Reviewed by: lutz at donnerhacke.de
MFC after: 2 weeks
Sponsored by: RG Nets
Differential Revision: https://reviews.freebsd.org/D24524

4 years agotrim(8): candelete() returns wrong results because fd is opened O_WRONLY
allanjude [Thu, 23 Apr 2020 20:14:59 +0000 (20:14 +0000)]
trim(8): candelete() returns wrong results because fd is opened O_WRONLY

This was discovered while using trim(8) to test bhyve trim

Reviewed by: asomers
Differential Revision: https://reviews.freebsd.org/D24371

4 years agoAdd VIRTIO_BLK_T_DISCARD (TRIM) support to the bhyve virtio-blk backend
allanjude [Thu, 23 Apr 2020 19:20:58 +0000 (19:20 +0000)]
Add VIRTIO_BLK_T_DISCARD (TRIM) support to the bhyve virtio-blk backend

This will advertise support for TRIM to the guest virtio-blk driver and
perform the DIOCGDELETE ioctl on the backing storage if it supports it.

Thanks to Jason King and others at Joyent and illumos for expanding on
my original patch, adding improvements including better error handling
and making sure to following the virtio spec.

Submitted by: Jason King <jason.king@joyent.com> (improvements)
Reviewed by: jhb
Obtained from: illumos-joyent (improvements)
MFC after: 1 month
Relnotes: yes
Sponsored by: Klara Inc.
Differential Revision: https://reviews.freebsd.org/D21707

4 years agoarm64: rockchip: Fix TSADC on RK3328
manu [Thu, 23 Apr 2020 19:16:20 +0000 (19:16 +0000)]
arm64: rockchip: Fix TSADC on RK3328

The TSADC familiy is a little bit more complex than V2 and V3.
Early revision do not use syscon and do not use qsel (RK3288).
Next revision still do not use syscon but uses qsel (RK3328).
Final revision use both.

Submitted by: peterj
MFC after: 1 month

4 years agodumpon.8: Update minimum key size language
cem [Thu, 23 Apr 2020 18:04:52 +0000 (18:04 +0000)]
dumpon.8: Update minimum key size language

dumpon(8) has not accepted 1024-bit RSA keys since prior to r339784 (2018-10).
The manual page language was not updated at that time (oops).  The minimum
accepted is 2048 bits, which is also a good default choice.

Sponsored by: Dell EMC Isilon

4 years agoEKCD: Preload error strings, PRNG seed; use OAEP padding
cem [Thu, 23 Apr 2020 17:56:48 +0000 (17:56 +0000)]
EKCD: Preload error strings, PRNG seed; use OAEP padding

Preload OpenSSL ERR string data so that the formatted error messages are
vaguely meaningful. Add OpenSSL error information to the RSA_public_encrypt()
operation failure case in one-time key generation.

For obsolescent OpenSSL versions (*cough* FIPS *cough*), pre-seed the PRNG
before entering Cap mode, as old versions of OpenSSL are unaware of kernel
RNG interfaces aside from /dev/random (such as the long-supported kern.arnd, or
the slightly more recent getentropy(3) or getrandom(2)). (RSA_public_encrypt()
wants a seeded PRNG to randomize the "PS" portion of PKCS 1.5 padding or the
"MGF" pseudo-random function in OAEP padding.)

Switch dumpon to encrypt the one-time key with OAEP padding (recommended since
1998; RFC2437) rather than the obsolescent PKCS 1.5 padding (1993; RFC2313).

Switch decryptcore to attempt OAEP decryption first, and try PKCS 1.5
decryption on failure. This is intended only for transition convenience, and
we should obsolete support for non-OAEP padding in a release or two.

Reviewed by: markj
MFC After: 2 weeks
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D24534

4 years agoacpi_ec(4): Don't probe erroneously if success occurred
cem [Thu, 23 Apr 2020 17:30:03 +0000 (17:30 +0000)]
acpi_ec(4): Don't probe erroneously if success occurred

In r360131, acpi_ec probe was changed to not clobber an error status prior to
several error cases that did not explicitly set the error variable before
goto'ing the exit path.  However, I did not notice that the error variable was
not set to success in the success path.  That caused all successful probes to
fail, which is obviously undesirable.

PR: 245778
Reported by: Neel Chauhan <neel AT neelc.org>, Evilham <contact AT evilham.com>
Tested by: Evilham
X-MFC-With: r360131

4 years agoFix PowerPC segfault.
cy [Thu, 23 Apr 2020 14:08:40 +0000 (14:08 +0000)]
Fix PowerPC segfault.

The segfault fix was originally developed by our upstream, sqlite.org,
to address S/390 and Sparc segfaults, both of which are big endian.
Our PowerPC is also big endian, which this patch also fixes.

Reported by: Mark Millard <marklmi at yahoo.com>
Tested by: Mark Millard <marklmi at yahoo.com>
Obtained from: https://www.sqlite.org/src/vinfo/04885763c4cd00cb?diff=1
https://sqlite.org/forum/forumpost/672291a5b2
MFC after: 1 month
X-MFC with: r360221, 360221

4 years agoMFV r360158:
cy [Thu, 23 Apr 2020 13:58:11 +0000 (13:58 +0000)]
MFV r360158:

Update sqlite3-3.31.0 (3310000) --> sqlite3-3.31.1 (3310100)

Tested by: Mark Millard <marklmi at yahoo.com>
With to be committed PowerPC patch
MFC after: 1 month
X-MFC with: r360221

4 years agoIn preparation for update to sqlite3-3.31.1 (3310100),
cy [Thu, 23 Apr 2020 13:46:34 +0000 (13:46 +0000)]
In preparation for update to sqlite3-3.31.1 (3310100),
recommit r357201: MFV r357163, which was reverted by r357522
due to segfault under PowerPc.

Update sqlite3-3.30.1 (3300100) --> sqlite3-3.31.0 (3310000)

MFC after: 1 month

4 years agoMake nfslockd depend on xdr.
kib [Thu, 23 Apr 2020 09:37:22 +0000 (09:37 +0000)]
Make nfslockd depend on xdr.

This is needed after r360036.

Reported by: netchild
Sponsored by: The FreeBSD Foundation

4 years agoConvert rtentry field accesses into nhop field accesses.
melifaro [Thu, 23 Apr 2020 08:04:20 +0000 (08:04 +0000)]
Convert rtentry field accesses into nhop field accesses.

One of the goals of the new routing KPI defined in r359823 is to entirely
 hide`struct rtentry` from the consumers. It will allow to improve routing
 subsystem internals and deliver more features much faster.

This commit is mostly mechanical change to eliminate direct struct rtentry
 field accesses.

The only notable difference is AF_LINK gateway encoding.

AF_LINK gw is used in routing stack for operations with interface routes
 and host loopback routes.
In the former case it indicates _some_ non-NULL gateway, as the interface
 is the same as in rt_ifp in kernel and rtm_ifindex in rtsock reporting.
In the latter case the interface index inside gateway was used by the IPv6
 datapath to verify address scope for link-local interfaces.

Kernel uses struct sockaddr_dl for this type of gateway. This structure
 allows for specifying rich interface data, such as mac address and interface
 name. However, this results in relatively large structure size - 52 bytes.
Routing stack fils in only 2 fields - sdl_index and sdl_type, which reside
 in the first 8 bytes of the structure.

In the new KPI, struct nhop_object tries to be cache-efficient, hence
 embodies gateway address inside the structure. In the AF_LINK case it
 stores stortened version of the structure - struct sockaddr_dl_short,
 which occupies 16 bytes. After D24340 changes, the data inside AF_LINK
 gateway will not be used in the kernel at all, leaving rtsock as the only
 potential concern.

The difference in rtsock reporting:

(old)
got message of size 240 on Thu Apr 16 03:12:13 2020
RTM_ADD: Add Route: len 240, pid: 0, seq 0, errno 0, flags:<UP,DONE,PINNED>
locks:  inits:
sockaddrs: <DST,GATEWAY,NETMASK>
 10.0.0.0 link#5 255.255.255.0

(new)
got message of size 200 on Sun Apr 19 09:46:32 2020
RTM_ADD: Add Route: len 200, pid: 0, seq 0, errno 0, flags:<UP,DONE,PINNED>
locks:  inits:
sockaddrs: <DST,GATEWAY,NETMASK>
 10.0.0.0 link#5 255.255.255.0

Note 40 bytes different (52-16 + alignment).
However, gateway is still a valid AF_LINK gateway with proper data filled in.

It is worth noting that these particular messages (interface routes) are mostly
 ignored by routing daemons:
* bird/quagga/frr uses RTM_NEWADDR and ignores prefix route addition messages.
* quagga/frr ignores routes without gateway

More detailed overview on how rtsock messages are used by the
 routing daemons to reconstruct the kernel view, can be found in D22974.

Differential Revision: https://reviews.freebsd.org/D24519

4 years agoUnbreak LINT-NOINET[6] builds broken in r360191.
melifaro [Thu, 23 Apr 2020 06:55:33 +0000 (06:55 +0000)]
Unbreak LINT-NOINET[6] builds broken in r360191.

Reported by: np

4 years agoRemove include of stdint.h. It was added in r241014 for uintmax_t,
delphij [Thu, 23 Apr 2020 03:46:41 +0000 (03:46 +0000)]
Remove include of stdint.h.  It was added in r241014 for uintmax_t,
which is gone in r340330 and is therefore no longer necessary.

MFC after: 2 weeks

4 years agocxgbe/iw_cxgbe: Create a LinuxKPI pci device for an adapter and use it
np [Wed, 22 Apr 2020 21:54:21 +0000 (21:54 +0000)]
cxgbe/iw_cxgbe: Create a LinuxKPI pci device for an adapter and use it
as the dma_device during RDMA registration.

cxgbe's struct device cannot be used as-is because it's a native FreeBSD
driver and ibcore is LinuxKPI based.

MFC after: 1 week
MFC after: r360196

4 years agosh: Remove remnants to compile out fc completely
jilles [Wed, 22 Apr 2020 21:45:43 +0000 (21:45 +0000)]
sh: Remove remnants to compile out fc completely

r360139 made compiling with NO_HISTORY work. This #define does not remove
the fc and bind builtins completely but makes them always write an error
message.

However, there was also some code in builtins.def and mkbuiltins to remove
the fc builtin entirely (but not the bind builtin). The additional build
system complication to make this work seems not worth it, so remove that
code.

4 years agoImprove input validation when processing AUTH chunks.
tuexen [Wed, 22 Apr 2020 21:22:33 +0000 (21:22 +0000)]
Improve input validation when processing AUTH chunks.

Thanks to Natalie Silvanovich from Google for finding and reporting the
issue found by her in the SCTP userland stack.

MFC after: 3 days
X-MFC with: https://svnweb.freebsd.org/changeset/base/360193

4 years agoFix name of 3DES cipher in deprecation warning.
jhb [Wed, 22 Apr 2020 21:03:24 +0000 (21:03 +0000)]
Fix name of 3DES cipher in deprecation warning.

Submitted by: cem
MFC after: 1 week

4 years agoMake the NFSv4.n client's recovery from NFSERR_BADSESSION RFC5661 conformant.
rmacklem [Wed, 22 Apr 2020 21:00:14 +0000 (21:00 +0000)]
Make the NFSv4.n client's recovery from NFSERR_BADSESSION RFC5661 conformant.

RFC5661 specifies that a client's recovery upon receipt of NFSERR_BADSESSION
should first consist of a CreateSession operation using the extant ClientID.
If that fails, then a full recovery beginning with the ExchangeID operation
is to be done.
Without this patch, the FreeBSD client did not attempt the CreateSession
operation with the extant ClientID and went directly to a full recovery
beginning with ExchangeID. I have had this patch several years, but since
no extant NFSv4.n server required the CreateSession with extant ClientID,
I have never committed it.
I an committing it now, since I suspect some future NFSv4.n server will
require this and it should not negatively impact recovery for extant NFSv4.n
servers, since they should all return NFSERR_STATECLIENTID for this first
CreateSession.

The patched client has been tested for recovery against both the FreeBSD
and Linux NFSv4.n servers and no problems have been observed.

MFC after: 1 month

4 years agoTemporarily skip sys.netipsec.tunnel.empty.v{4,6} in CI
lwhsu [Wed, 22 Apr 2020 20:50:24 +0000 (20:50 +0000)]
Temporarily skip sys.netipsec.tunnel.empty.v{4,6} in CI

PR: 245832
Sponsored by: The FreeBSD Foundation

4 years agoUpdate blake2 accelerated software tests to work after OCF refactoring.
jhb [Wed, 22 Apr 2020 20:43:18 +0000 (20:43 +0000)]
Update blake2 accelerated software tests to work after OCF refactoring.

- Lookup device drivers to test by name instead of assuming that the
  software / hardware flags will select specific drivers.
- Set the sysctl to permit software /dev/crypto requests when testing
  the accelerated software blake2 driver.

PR: 245825
Reported by: lwhsu
Reviewed by: cem, lwhsu
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D24540

4 years agoDeprecate 3des support in IPsec for FreeBSD 13.
jhb [Wed, 22 Apr 2020 19:44:33 +0000 (19:44 +0000)]
Deprecate 3des support in IPsec for FreeBSD 13.

RFC 8221 does not outright ban 3des as the algorithms deprecated for
13 in r348205, but it is listed as a SHOULD NOT and will likely be a
MUST NOT by the time 13 ships.

Discussed with: bjk
MFC after: 1 week
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D24341

4 years agortld: ignore static TLS segments when tracing.
kib [Wed, 22 Apr 2020 18:39:45 +0000 (18:39 +0000)]
rtld: ignore static TLS segments when tracing.

For PIE binaries, ldd(1) performs dlopen(RTLD_TRACE) on the binary.
It is legal for binary to use initial exec TLS mode, but when such
binary (actually dso) is dlopened, we might not have enough free space
in the finalized static TLS segment.  Make ldd operational by skipping
TLS space allocation, we are not going to execute any code from the
dso anyway.

Reported by: tobik
PR: 245677
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

4 years agomenu.lua: Give names to menu entries
freqlabs [Wed, 22 Apr 2020 17:04:31 +0000 (17:04 +0000)]
menu.lua: Give names to menu entries

Make menu customizations easier by naming the entries and using the
names to build the table entries.

Reviewed by: kevans
Approved by: mav (mentor)
MFC after: 1 week
Sponsored by: iXsystems, Inc.
Differential Revision: https://reviews.freebsd.org/D24527

4 years agoTemporarily skip sys.opencrypto.blake2_test.blake2{b,s}_vectors_x86 in CI
lwhsu [Wed, 22 Apr 2020 14:45:00 +0000 (14:45 +0000)]
Temporarily skip sys.opencrypto.blake2_test.blake2{b,s}_vectors_x86 in CI

PR: 245825
Sponsored by: The FreeBSD Foundation

4 years agoAdd support for Read_Local_Supported_Commands command to hccontrol(8).
hselasky [Wed, 22 Apr 2020 14:38:39 +0000 (14:38 +0000)]
Add support for Read_Local_Supported_Commands command to hccontrol(8).

Submitted by: Marc Veldman <marc@bumblingdork.com>
PR: 245811
MFC after: 1 week
Sponsored by: Mellanox Technologies

4 years agoFactor code in LinuxKPI to allow attach and detach using any BSD device.
hselasky [Wed, 22 Apr 2020 14:33:25 +0000 (14:33 +0000)]
Factor code in LinuxKPI to allow attach and detach using any BSD device.
This allows non-LinuxKPI based infiniband device drivers to attach
correctly to ibcore.

No functional change intended.

Reviewed by: np @
Differential Revision: https://reviews.freebsd.org/D24514
MFC after: 1 week
Sponsored by: Mellanox Technologies

4 years agoImprove input validation when processing AUTH chunks.
tuexen [Wed, 22 Apr 2020 12:47:46 +0000 (12:47 +0000)]
Improve input validation when processing AUTH chunks.

Thanks to Natalie Silvanovich from Google for finding and reporting the
issue found by her in the SCTP userland stack.

MFC after: 3 days

4 years agoEnable timer tests in sys.kqueue.libkqueue.kqueue_test.main on i386
lwhsu [Wed, 22 Apr 2020 09:53:41 +0000 (09:53 +0000)]
Enable timer tests in sys.kqueue.libkqueue.kqueue_test.main on i386

They were fixed in r360140

PR: 245768
Sponsored by: The FreeBSD Foundation

4 years agoConvert TOE routing lookups to the new routing KPI.
melifaro [Wed, 22 Apr 2020 07:53:43 +0000 (07:53 +0000)]
Convert TOE routing lookups to the new routing KPI.

Reviewed by: np
Differential Revision: https://reviews.freebsd.org/D24388

4 years agoCorrect efi(8) reference.
brueffer [Wed, 22 Apr 2020 07:47:04 +0000 (07:47 +0000)]
Correct efi(8) reference.

Submitted by: Gordon Bergling
Differential Revision: https://reviews.freebsd.org/D24441

4 years agoImprove formatting of synopsis section
0mp [Wed, 22 Apr 2020 06:32:51 +0000 (06:32 +0000)]
Improve formatting of synopsis section

This patch is about sorting the arguments and using proper mdoc(7) macros
to stylize arguments and command modifiers for much better readability.

Further style fixes in other sections within the bhyve manual page are
going to be worked on in upcoming patches.

Reviewed by: rgrimes
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D24526

4 years agokqueue(2): de-vandalize the random sentence in the middle
kevans [Wed, 22 Apr 2020 04:05:02 +0000 (04:05 +0000)]
kqueue(2): de-vandalize the random sentence in the middle

A last minute change appears to have inadvertently vandalized unrelated
parts of the manpage with the date. =-(

Reported by: rpokala

4 years agokqueue(2): add a note about EV_RECEIPT
kevans [Wed, 22 Apr 2020 03:45:52 +0000 (03:45 +0000)]
kqueue(2): add a note about EV_RECEIPT

In the below-referenced PR, a case is attached of a simple reproducer that
exhibits suboptimal behavior: EVFILT_READ and EVFILT_WRITE being set in the
same kevent(2) call will only honor the first one. This is, in-fact, how
it's supposed to work.

A read of the manpage leads me to believe we could be more clear about this;
right now there's a logical leap to make in the relevant statement: "When
passed as input, it forces EV_ERROR to always be returned." -- the logical
leap being that this indicates the caller should have allocated space for
the change to be returned with EV_ERROR indicated in the events, or
subsequent filters will get dropped on the floor.

Another possible workaround that accomplishes similar effect without needing
space for all events is just setting EV_RECEIPT on the final change being
passed in; if any errored before it, the kqueue would not be drained. If we
made it to the final change with EV_RECEIPT set, then we would return that
one with EV_ERROR and still not drain the kqueue. This would seem to not be
all that advisable.

PR: 229741
MFC after: 1 week

4 years agoAdd genet driver for Raspberry Pi 4B Ethernet
karels [Wed, 22 Apr 2020 00:42:10 +0000 (00:42 +0000)]
Add genet driver for Raspberry Pi 4B Ethernet

Add driver for Broadcom "GENET" version 5, as found in BCM-2711 on
Raspberry Pi 4B. The driver is derived in part from the bcmgenet.c
driver in NetBSD, along with bcmgenetreg.h.

Reviewed by: manu
Obtained from: in part from NetBSD
Relnotes: yes, note addition
Differential Revision: https://reviews.freebsd.org/D24436

4 years agorevert rS360143 - Correctly set up initial cwnd
rscheff [Wed, 22 Apr 2020 00:16:42 +0000 (00:16 +0000)]
revert rS360143 - Correctly set up  initial cwnd
due to syzkaller panics found

Reported by: tuexen
Approved by: tuexen (mentor)
Sponsored by: NetApp, Inc.

4 years agoDon't pass a user buffer pointer as the data pointer in a CCB.
jhb [Tue, 21 Apr 2020 23:38:54 +0000 (23:38 +0000)]
Don't pass a user buffer pointer as the data pointer in a CCB.

Allocate a temporary buffer in the kernel to serve as the CCB data
pointer for a pass-through transaction and use copyin/copyout to
shuffle the data to/from the user buffer.

Reviewed by: scottl, brooks
Obtained from: CheriBSD
MFC after: 2 weeks
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D24489

4 years agoMap negative types passed to vm_capability_type2name to NULL.
jhb [Tue, 21 Apr 2020 21:48:35 +0000 (21:48 +0000)]
Map negative types passed to vm_capability_type2name to NULL.

Submitted by: vangyzen

4 years agovmm(4): Decode and emulate BEXTR
cem [Tue, 21 Apr 2020 21:34:24 +0000 (21:34 +0000)]
vmm(4): Decode and emulate BEXTR

Clang 10 -march=native kernels on znver1 emit BEXTR for APIC reads,
apparently.  Decode and emulate the instruction.

Reviewed by: grehan
Differential Revision: https://reviews.freebsd.org/D24463

4 years agovmm(4): Decode 3-byte VEX-prefixed instructions
cem [Tue, 21 Apr 2020 21:33:06 +0000 (21:33 +0000)]
vmm(4): Decode 3-byte VEX-prefixed instructions

Reviewed by: grehan
Differential Revision: https://reviews.freebsd.org/D24462

4 years agoMerge OpenSSL 1.1.1g.
jkim [Tue, 21 Apr 2020 19:38:32 +0000 (19:38 +0000)]
Merge OpenSSL 1.1.1g.

4 years agoImport OpenSSL 1.1.1g.
jkim [Tue, 21 Apr 2020 19:07:46 +0000 (19:07 +0000)]
Import OpenSSL 1.1.1g.

4 years agoUpdate string tables in hccontrol(8).
hselasky [Tue, 21 Apr 2020 17:51:54 +0000 (17:51 +0000)]
Update string tables in hccontrol(8).

Submitted by: Marc Veldman <marc@bumblingdork.com>
PR: 245796
MFC after: 1 week
Sponsored by: Mellanox Technologies

4 years agoDon't access a user buffer directly from the kernel.
jhb [Tue, 21 Apr 2020 17:47:05 +0000 (17:47 +0000)]
Don't access a user buffer directly from the kernel.

The handle_string callback for the ENCIOC_SETSTRING ioctl was passing
a user pointer to memcpy().  Fix by using copyin() instead.

For ENCIOC_GETSTRING ioctls, the handler was storing the user pointer
in a CCB's data_ptr field where it was indirected by other code.  Fix
this by allocating a temporary buffer (which ENCIOC_SETSTRING already
did) and copying the result out to the user buffer after the CCB has
been processed.

Reviewed by: kib
Obtained from: CheriBSD
MFC after: 1 week
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D24487

4 years agoRetire two unused background fsck sysctls.
jhb [Tue, 21 Apr 2020 17:42:32 +0000 (17:42 +0000)]
Retire two unused background fsck sysctls.

These two sysctls were added to support UFS softupdates journalling
with snapshots.  However, the changes to fsck to use them were never
committed and there have never been any in-tree uses of these sysctls.

More details from Kirk:

When journalling got added to soft updates, its journal rollback freed
blocks that it thought were no longer in use. But it does not take
snapshots into account (i.e., if a snapshot is still using it, then it
cannot be freed). So I added the needed logic to fsck by having the
free go through the kernel's blkfree code so it could grab blocks that
were still needed by snapshots. That is done using the setbufoutput
hack. I never got that code working reliably, so it is still sitting
in my work directory. Which also explains why you still cannot take
snapshots on filesystems running with journalling...

In looking over my use of this feature, and in particular the troubles
I was having with it, I conclude that it may be better to extract the
code from the kernel that handles freeing blocks claimed by snapshots
and putting it into fsck directly. My original intent was that it is
complex and at the time changing, so only having to maintain it in one
place was appealing. But at this point it has not changed in years and
the hacks like setinode and setbufoutput to be able to use the kernel
code is sufficiently ugly, that I am leaning towards just extracting
it.

Reviewed by: mckusick
MFC after: 1 week
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D24484

4 years agoCheck the magic value in longjmp() before calling sigprocmask().
jhb [Tue, 21 Apr 2020 17:40:23 +0000 (17:40 +0000)]
Check the magic value in longjmp() before calling sigprocmask().

This avoids passing garbage to sigprocmask() if the jump buffer is
invalid.

Reviewed by: mhorne
Obtained from: CheriBSD
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D24483

4 years agoHandle non-dtrace-triggered kernel breakpoint traps in mips.
jhb [Tue, 21 Apr 2020 17:38:07 +0000 (17:38 +0000)]
Handle non-dtrace-triggered kernel breakpoint traps in mips.

If DTRACE is enabled at compile time, all kernel breakpoint traps are
first given to dtrace to see if they are triggered by a FBT probe.
Previously if dtrace didn't recognize the trap, it was silently
ignored breaking the handling of other kernel breakpoint traps such as
the debug.kdb.enter sysctl.  This only returns early from the trap
handler if dtrace recognizes the trap and handles it.

Submitted by: Nicolò Mazzucato <nicomazz97@gmail.com>
Reviewed by: markj
Obtained from: CheriBSD
Differential Revision: https://reviews.freebsd.org/D24478

4 years agoAbort transfer if fseeko() fails.
jhb [Tue, 21 Apr 2020 17:32:57 +0000 (17:32 +0000)]
Abort transfer if fseeko() fails.

CID: 1420215
Reviewed by: asomers
MFC after: 1 week
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D24454

4 years agoAdd description string for VM_CAP_BPT_EXIT.
jhb [Tue, 21 Apr 2020 17:30:56 +0000 (17:30 +0000)]
Add description string for VM_CAP_BPT_EXIT.

While here, replace the array of mapping structures with an array of
string pointers where the index is the capability value.

Submitted by: Rob Fairbanks <rob.fx907@gmail.com>
Reviewed by: rgrimes
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D24289

4 years agoAlso update est(4) as r360162 and r360164
lwhsu [Tue, 21 Apr 2020 17:17:32 +0000 (17:17 +0000)]
Also update est(4) as r360162 and r360164

MFC after: 3 days