]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
3 years agoMerge bmake-20200606
Simon J. Gerraty [Tue, 9 Jun 2020 20:52:35 +0000 (20:52 +0000)]
Merge bmake-20200606

Relevant items from ChangeLog:

o dir.c: cached_stats - don't confuse stat and lstat results.
o var.c: add :Or for reverse sort.

3 years agoFix boot of wandquad after DTS update
Andreas Tobler [Tue, 9 Jun 2020 20:27:35 +0000 (20:27 +0000)]
Fix boot of wandquad after DTS update

In the recent dts sync the name of the aips-bus@ changed to bus@. Reflect
this change and add an additional OF_finddevice in fix_fdt_interrupt_data()
and in fix_fdt_iomuxc_data() with bus@ only. Iow, keep the old naming for
compatibility.

Discussed with: ian@

3 years agoTo reduce the size of an rb_node, drop the color field. Set the least
Doug Moore [Tue, 9 Jun 2020 20:19:11 +0000 (20:19 +0000)]
To reduce the size of an rb_node, drop the color field. Set the least
significant bit in the pointer to the node from its parent to indicate
that the node is red. Have the tree rotation macros leave the
old-parent/new-child node red and the new-parent/old-child node black.

This change makes RB_LEFT and RB_RIGHT no longer assignable, and
RB_COLOR no longer defined. Any code that modifies the tree or
examines a node color would have to be modified after this change.

Reviewed by: markj
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D25105

3 years agoiflib: netmap: honor netmap_irx_irq return values
Vincenzo Maffione [Tue, 9 Jun 2020 19:15:43 +0000 (19:15 +0000)]
iflib: netmap: honor netmap_irx_irq return values

In the receive interrupt routine, always call netmap_rx_irq().
The latter function will return != NM_IRQ_PASS if netmap is not
active on that specific receive queue, so that the driver can go
on with iflib_rxeof(). Note that netmap supports partial opening,
where only a subset of the RX or TX rings can be open in netmap mode.
Checking the IFCAP_NETMAP flag is not enough to make sure that the
queue is indeed in netmap mode.
Moreover, in case netmap_rx_irq() returns NM_IRQ_RESCHED, it means
that netmap expects the driver to call netmap_rx_irq() again as soon
as possible. Currently, this may happen when the device is attached
to a VALE switch.

Reviewed by: gallatin
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D25167

3 years agorelease: amd64 efi boot name is bootx64
Emmanuel Vadot [Tue, 9 Jun 2020 18:13:52 +0000 (18:13 +0000)]
release: amd64 efi boot name is bootx64

efi_boot_name is just used for arm image so no harm done.

Reported by: gonzo
MFC after: 3 days

3 years agolibusb: improve compatibility
Kyle Evans [Tue, 9 Jun 2020 17:17:43 +0000 (17:17 +0000)]
libusb: improve compatibility

Specifically, add LIBUSB_CLASS_PHYSICAL and the libusb_has_capability API.
Descriptions and functionality for these derived from the
documentation at [0].  The current set of capabilities are all supported by
libusb.

These were detected as missing after updating net/freerdp to 2.1.1, which
attempted to use both.

[0] http://libusb.sourceforge.net/api-1.0/group__libusb__misc.html

Reviewed by: hselasky
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D25194

3 years agoSimilar to UART on ThunderX2, the ARM Coresight (ETM component)
Ruslan Bukin [Tue, 9 Jun 2020 17:07:42 +0000 (17:07 +0000)]
Similar to UART on ThunderX2, the ARM Coresight (ETM component)
set ResourceProducer on memory resources: ignore it.

Tested on ARM N1SDP board.

Sponsored by: DARPA, AFRL

3 years agoRefactor ptrace() ABI compatibility.
John Baldwin [Tue, 9 Jun 2020 16:43:23 +0000 (16:43 +0000)]
Refactor ptrace() ABI compatibility.

Add a freebsd32_ptrace() and move as many freebsd32 shims as possible
to freebsd32_ptrace().  Aside from register sets, freebsd32 passes
pointers to native structures to kern_ptrace() and converts to/from
native/32-bit structure formats in freebsd32_ptrace() outside of
kern_ptrace().

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

3 years agoARM Embedded Trace Macrocell v4.x driver:
Ruslan Bukin [Tue, 9 Jun 2020 16:43:16 +0000 (16:43 +0000)]
ARM Embedded Trace Macrocell v4.x driver:
o Split-out FDT attachment to a separate file;
o Add ACPI attachment.

Sponsored by: DARPA, AFRL

3 years agoFix style: wrap long lines.
Ruslan Bukin [Tue, 9 Jun 2020 16:06:10 +0000 (16:06 +0000)]
Fix style: wrap long lines.

Sponsored by: DARPA, AFRL

3 years agoRename coresight drivers: use underscores in filenames.
Ruslan Bukin [Tue, 9 Jun 2020 15:56:41 +0000 (15:56 +0000)]
Rename coresight drivers: use underscores in filenames.

Sponsored by: DARPA, AFRL

3 years agoAssert on pg_jobc state.
Mateusz Guzik [Tue, 9 Jun 2020 15:17:23 +0000 (15:17 +0000)]
Assert on pg_jobc state.

Stolen from NetBSD.

3 years agovm: rework swap_pager_status to execute in constant time
Mateusz Guzik [Tue, 9 Jun 2020 14:16:18 +0000 (14:16 +0000)]
vm: rework swap_pager_status to execute in constant time

The lock-protected iteration is trivially avoidable.

This removes a serialisation point from Linux binaries (which end up calling
here from the sysinfo syscall).

3 years agocoufreq_dt: Rename DEBUG to DPRINTF
Emmanuel Vadot [Tue, 9 Jun 2020 09:42:39 +0000 (09:42 +0000)]
coufreq_dt: Rename DEBUG to DPRINTF

DEBUG is a kernel configuration flag and if used cpufreq_dt.c will fail the
build of kernel.

PR: 246867
Submitted by: Oskar Holmund (oskar.holmlund@ohdata.se)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D25080

3 years agops: remove xo_no_setlocale() call
Yuri Pankov [Tue, 9 Jun 2020 07:07:29 +0000 (07:07 +0000)]
ps: remove xo_no_setlocale() call

Apparently libxo was fixed to do the right thing on FreeBSD,
and calling xo_no_setlocale() is no longer needed.

Reported by: phil

3 years agoPost CVE-2020-12695 cleanup patch:
Cy Schubert [Tue, 9 Jun 2020 05:43:51 +0000 (05:43 +0000)]
Post CVE-2020-12695 cleanup patch:

Resolve a Linuxism to fix the build.

MFC after: 3 days
X-MFC with: r361957, r361958, r361959

3 years agoMFV r361938:
Cy Schubert [Tue, 9 Jun 2020 05:39:37 +0000 (05:39 +0000)]
MFV r361938:

Upstream commit message:

[PATCH 3/3] WPS UPnP: Handle HTTP initiation failures for events more
properly

While it is appropriate to try to retransmit the event to another
callback URL on a failure to initiate the HTTP client connection, there
is no point in trying the exact same operation multiple times in a row.
Replve the event_retry() calls with event_addr_failure() for these cases
to avoid busy loops trying to repeat the same failing operation.

These potential busy loops would go through eloop callbacks, so the
process is not completely stuck on handling them, but unnecessary CPU
would be used to process the continues retries that will keep failing
for the same reason.

Obtained from: https://w1.fi/security/2020-1/\
0003-WPS-UPnP-Handle-HTTP-initiation-failures-for-events-.patch
MFC after: 3 days
Security: VU#339275 and CVE-2020-12695

3 years agoMFV r361937:
Cy Schubert [Tue, 9 Jun 2020 05:38:12 +0000 (05:38 +0000)]
MFV r361937:

Upstream commit message:

[PATCH 2/3] WPS UPnP: Fix event message generation using a long URL path

More than about 700 character URL ended up overflowing the wpabuf used
for building the event notification and this resulted in the wpabuf
buffer overflow checks terminating the hostapd process. Fix this by
allocating the buffer to be large enough to contain the full URL path.
However, since that around 700 character limit has been the practical
limit for more than ten years, start explicitly enforcing that as the
limit or the callback URLs since any longer ones had not worked before
and there is no need to enable them now either.

Obtained from: https://w1.fi/security/2020-1/\
0002-WPS-UPnP-Fix-event-message-generation-using-a-long-U.patch
MFC after: 3 days
Security: VU#339275 and CVE-2020-12695

3 years agoMFV r361936:
Cy Schubert [Tue, 9 Jun 2020 05:35:38 +0000 (05:35 +0000)]
MFV r361936:

Upstream commit message:

[PATCH 1/3] WPS UPnP: Do not allow event subscriptions with URLs to
other networks

The UPnP Device Architecture 2.0 specification errata ("UDA errata
16-04-2020.docx") addresses a problem with notifications being allowed
to go out to other domains by disallowing such cases. Do such filtering
for the notification callback URLs to avoid undesired connections to
external networks based on subscriptions that any device in the local
network could request when WPS support for external registrars is
enabled (the upnp_iface parameter in hostapd configuration).

Obtained from: https://w1.fi/security/2020-1/\
0001-WPS-UPnP-Do-not-allow-event-subscriptions-with-URLs-.patch
MFC after: 3 days
Security: VU#339275 and CVE-2020-12695

3 years agoFix a bug where XU_NGROUPS + 1 groups might be copied.
Rick Macklem [Tue, 9 Jun 2020 05:01:23 +0000 (05:01 +0000)]
Fix a bug where XU_NGROUPS + 1 groups might be copied.

r361780 fixed the code so that it would only remove the duplicate when
it actually existed. However, that might have resulted in XU_NGROUPS + 1
groups being copied, running off the end of the array. This patch fixes
the problem.

Spotted during code inspection for other mountd changes.

MFC after: 2 weeks

3 years agoImport bmake-20200606
Simon J. Gerraty [Tue, 9 Jun 2020 02:07:26 +0000 (02:07 +0000)]
Import bmake-20200606

Relevant items from ChangeLog:

o dir.c: cached_stats - don't confuse stat and lstat results.
o var.c: add :Or for reverse sort.

3 years agoStop computing a "sharedram" value when emulating Linux sysinfo(2).
Mark Johnston [Mon, 8 Jun 2020 22:29:52 +0000 (22:29 +0000)]
Stop computing a "sharedram" value when emulating Linux sysinfo(2).

The previous code was computing an incorrect value in a very expensive
manner.  "sharedram" is supposed to be the amount of memory used by
named swap objects, which on FreeBSD basically corresponds to memory
usage by shared memory objects (including, for example, GEM objects) and
tmpfs.  We currently have no cheap way to count such pages.  The
previous code tried to determine the number of copy-on-write pages
shared between processes.

Just replace the computed value with 0.  illumos reportedly does the
same thing.  Linux itself did not populate this field until a 2014
commit, "mm: export NR_SHMEM via sysinfo(2) / si_meminfo() interfaces".

Reported by: mjg
MFC after: 1 week

3 years agovirtio: Support non-legacy network device and queue
Jessica Clarke [Mon, 8 Jun 2020 21:51:36 +0000 (21:51 +0000)]
virtio: Support non-legacy network device and queue

The non-legacy interface always defines num_buffers in the header,
regardless of whether VIRTIO_NET_F_MRG_RXBUF, just leaving it unused. We
also need to ensure our virtqueue doesn't filter out VIRTIO_F_VERSION_1
during negotiation, as it supports non-legacy transports just fine. This
fixes network packet transmission on TinyEMU.

Reviewed by: br, brooks (mentor), jhb (mentor)
Approved by: br, brooks (mentor), jhb (mentor)
Differential Revision: https://reviews.freebsd.org/D25132

3 years agovirtio_mmio: Negotiate the upper half of the feature bits too
Jessica Clarke [Mon, 8 Jun 2020 21:49:42 +0000 (21:49 +0000)]
virtio_mmio: Negotiate the upper half of the feature bits too

The feature bits are exposed as a 32-bit register with 2 banks, so we
should negotiate both halves. Notably, VIRTIO_F_VERSION_1 is in the
upper half, and will be used in an upcoming commit.

The PCI bus driver also has this bug, but the legacy BAR layout did not
include selector registers and is rather different from the modern
layout, so it remains solely as legacy.

Reviewed by: br, brooks (mentor), jhb (mentor)
Approved by: br, brooks (mentor), jhb (mentor)
Differential Revision: https://reviews.freebsd.org/D25131

3 years agoUse Fl instead of Ar for long flags
Mateusz Piotrowski [Mon, 8 Jun 2020 21:11:34 +0000 (21:11 +0000)]
Use Fl instead of Ar for long flags

Also, bump date after r361935.

MFC after: 1 week

3 years agoImplement zero-copy iSCSI target transmission/read.
Alexander Motin [Mon, 8 Jun 2020 20:53:57 +0000 (20:53 +0000)]
Implement zero-copy iSCSI target transmission/read.

Add ICL_NOCOPY flag to icl_pdu_append_data(), specifying that the method
can just reference the data buffer instead of immediately copying it.

Extend the offload KPI with optional PDU queue method, allowing to specify
completion callback, called when all the data referenced by above has been
transferred and won't be accessed any more (the buffers can be freed).

Implement the above functionality in software iSCSI driver using mbufs
with external storage and reference counter.  Note that some NICs (ixl(4))
may keep the mbuf in TX queue for a long time, so CTL has to be ready.

Add optional method to struct ctl_scsiio for buffer reference counting.
Implement it for CTL block backend, allowing to delay free of the struct
ctl_be_block_io and memory it references as needed.  In first reincarnation
of the patch I tried to delay whole I/O as it is done for FibreChannel,
that was cleaner, but due to the above callback delays I had to rewrite
it this way to not leave LUN referenced potentially for hours or more.

All together on sequential read from ZFS ARC this saves about 30% of CPU
time and memory bandwidth by avoiding one of 3 memory copies (the other
two are from ZFS ARC to DMU cache and then from DMU cache to CTL buffers).
On tests with 2x Xeon Silver 4114 this allows to reach full line rate of
100GigE NIC.  Tests with Gold CPUs and two 100GigE NICs are stil TBD,
but expectations to saturate them are pretty high. ;)

Discussed with: Chelsio
Sponsored by: iXsystems, Inc.

3 years agoUpstream commit message:
Cy Schubert [Mon, 8 Jun 2020 20:40:09 +0000 (20:40 +0000)]
Upstream commit message:

[PATCH 3/3] WPS UPnP: Handle HTTP initiation failures for events more
properly

While it is appropriate to try to retransmit the event to another
callback URL on a failure to initiate the HTTP client connection, there
is no point in trying the exact same operation multiple times in a row.
Replve the event_retry() calls with event_addr_failure() for these cases
to avoid busy loops trying to repeat the same failing operation.

These potential busy loops would go through eloop callbacks, so the
process is not completely stuck on handling them, but unnecessary CPU
would be used to process the continues retries that will keep failing
for the same reason.

Obtained from: https://w1.fi/security/2020-1/\
0003-WPS-UPnP-Handle-HTTP-initiation-failures-for-events-.patch
Security: VU#339275 and CVE-2020-12695

3 years agoUpstream commit message:
Cy Schubert [Mon, 8 Jun 2020 20:37:52 +0000 (20:37 +0000)]
Upstream commit message:

[PATCH 2/3] WPS UPnP: Fix event message generation using a long URL path

More than about 700 character URL ended up overflowing the wpabuf used
for building the event notification and this resulted in the wpabuf
buffer overflow checks terminating the hostapd process. Fix this by
allocating the buffer to be large enough to contain the full URL path.
However, since that around 700 character limit has been the practical
limit for more than ten years, start explicitly enforcing that as the
limit or the callback URLs since any longer ones had not worked before
and there is no need to enable them now either.

Obtained from: https://w1.fi/security/2020-1/\
0002-WPS-UPnP-Fix-event-message-generation-using-a-long-U.patch
Security: VU#339275 and CVE-2020-12695

3 years agoUpstream commit message:
Cy Schubert [Mon, 8 Jun 2020 20:35:03 +0000 (20:35 +0000)]
Upstream commit message:

[PATCH 1/3] WPS UPnP: Do not allow event subscriptions with URLs to
other networks

The UPnP Device Architecture 2.0 specification errata ("UDA errata
16-04-2020.docx") addresses a problem with notifications being allowed
to go out to other domains by disallowing such cases. Do such filtering
for the notification callback URLs to avoid undesired connections to
external networks based on subscriptions that any device in the local
network could request when WPS support for external registrars is
enabled (the upnp_iface parameter in hostapd configuration).

Obtained from: https://w1.fi/security/2020-1/\
0001-WPS-UPnP-Do-not-allow-event-subscriptions-with-URLs-.patch
MFC after: 1 week
Security: VU#339275 and CVE-2020-12695

3 years agoAdd VHDX support to mkimg(1)
Oleksandr Tymoshenko [Mon, 8 Jun 2020 20:28:32 +0000 (20:28 +0000)]
Add VHDX support to mkimg(1)

VHDX is the successor of Microsoft's VHD file format. It increases
maximum capacity of the virtual drive to 64TB and introduces features
to better handle power/system failures.

VHDX is the required format for 2nd generation Hyper-V VMs.

Reviewed by: marcel
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D25184

3 years agoWhitespace cleanups and removal of a stale comment.
Michael Tuexen [Mon, 8 Jun 2020 20:23:20 +0000 (20:23 +0000)]
Whitespace cleanups and removal of a stale comment.

MFC after: 1 week

3 years agoloader: install allow for more complete device spec in url
Simon J. Gerraty [Mon, 8 Jun 2020 18:13:38 +0000 (18:13 +0000)]
loader: install allow for more complete device spec in url

Rework to simplify and impose sane url syntax.
That is we allow for file://[devname[:fstype]]/package

Reviewed by: stevek
MFC after: 1 week
Sponsored by: Juniper Networks
Differential Revision: https://reviews.freebsd.org//D25134

3 years agoriscv: Use SBI shutdown call to implement RB_POWEROFF
Jessica Clarke [Mon, 8 Jun 2020 17:57:21 +0000 (17:57 +0000)]
riscv: Use SBI shutdown call to implement RB_POWEROFF

Currently we only call sbi_shutdown in cpu_reset, which means we reach
"Please press any key to reboot." even when RB_POWEROFF is set, and only
once the user presses a key do we then shutdown. Instead, register a
shutdown_final event handler and make an SBI shutdown call if
RB_POWEROFF is set.

Reviewed by: br, jhb (mentor), kp
Approved by: br, jhb (mentor), kp
Differential Revision: https://reviews.freebsd.org/D25183

3 years agoMove MPASS() macros to systm.h. They are widely used all over
Gleb Smirnoff [Mon, 8 Jun 2020 17:40:39 +0000 (17:40 +0000)]
Move MPASS() macros to systm.h.  They are widely used all over
the kernel and aren't contained only to the locking code.

Reviewed by: kib, mjg
Differential Revision: https://reviews.freebsd.org/D23656

3 years agocrashinfo: stop looking for gdb in /usr/bin/gdb
Ed Maste [Mon, 8 Jun 2020 16:11:44 +0000 (16:11 +0000)]
crashinfo: stop looking for gdb in /usr/bin/gdb

As of r359457 we removed the GDB_LIBEXEC option, always installing in-tree
gdb into /usr/libexec/.  Thus, there is now no need for crashinfo to include
/usr/bin/gdb in the list of pathnames to check when looking for gdb.

3 years agoAn important statistic in determining if a server process (or client) is being delayed
Randall Stewart [Mon, 8 Jun 2020 11:48:07 +0000 (11:48 +0000)]
An important statistic in determining if a server process (or client) is being delayed
is to know the time to first byte in and time to first byte out. Currently we
have no way to know these all we have is t_starttime. That (t_starttime) tells us
what time the 3 way handshake completed. We don't know when the first
request came in or how quickly we responded. Nor from a client perspective
do we know how long from when we sent out the first byte before the
server responded.

This small change adds the ability to track the TTFB's. This will show up in
BB logging which then can be pulled for later analysis. Note that currently
the tracking is via the ticks variable of all three variables. This provides
a very rough estimate (hz=1000 its 1ms). A follow-on set of work will be
to change all three of these values into something with a much finer resolution
(either microseconds or nanoseconds), though we may want to make the resolution
configurable so that on lower powered machines we could still use the much
cheaper ticks variable.

Sponsored by: Netflix Inc.
Differential Revision: https://reviews.freebsd.org/D24902

3 years agoDocument that /lib is always in the list of shared library paths
Mateusz Piotrowski [Mon, 8 Jun 2020 09:33:45 +0000 (09:33 +0000)]
Document that /lib is always in the list of shared library paths

/lib was added to the list in r119011.

MFC after: 1 week

3 years agoRISC-V: Check that the DTB doesn't overlap with kernel
Alex Richardson [Mon, 8 Jun 2020 08:52:02 +0000 (08:52 +0000)]
RISC-V: Check that the DTB doesn't overlap with kernel

This can happen with very large kernels (e.g. ones embedding a root
filesystem). The DTB written by OpenSBI/BBL is quite small so this is
unlikely to hit important data, but if it does this can result in very
confusing and hard-to-debug crashes. Add a KASSERT() and a verbose print
to catch this problem with debug kernels.

While this will not print any output by default if it fails (that would
depend on EARLY_PRINTF), at least the kernel now halts reliably instead
of randomly crashing.

Reviewed By: mhorne
Differential Revision: https://reviews.freebsd.org/D25153

3 years agosys/riscv: Remove debug printfs
Alex Richardson [Mon, 8 Jun 2020 08:51:57 +0000 (08:51 +0000)]
sys/riscv: Remove debug printfs

They are only visible with EARLY_PRINTF so don't show up by default.

Reviewed By: mhorne
Differential Revision: https://reviews.freebsd.org/D25152

3 years agoRISC-V: handle DTB aligned to less than 2MB
Alex Richardson [Mon, 8 Jun 2020 08:51:52 +0000 (08:51 +0000)]
RISC-V: handle DTB aligned to less than 2MB

By default OpenSBI and BBL will pass the DTB at a 2MB-aligned address.
However, by default there are no 2MB aligned regions between the SBI and
the kernel, so we have to choose a 2MB aligned region after the kernel.
OpenSBI defaults to placing the DTB 32MB after the start of the kernel but
this is not sufficient for a kernel with a large MFS embedded.
We could increase this offset to a larger number (e.g. 64/128/256) but that
imposes restrictions on the minimum RAM size.
Another solution would be to place the DTB between OpenSBI and the kernel
at 1MB alignment, but current locore.S code assumes 2MB alignment.

With this change I can now boot on QEMU with an OpenSBI configured to
store the DTB at an offset of 1MB.

See also https://github.com/riscv/opensbi/issues/169

Reviewed By: mhorne
Differential Revision: https://reviews.freebsd.org/D25151

3 years agoRELNOTES: Post-portem note about sed(1) \x support
Kyle Evans [Mon, 8 Jun 2020 02:42:41 +0000 (02:42 +0000)]
RELNOTES: Post-portem note about sed(1) \x support

Requested by: Oliver Pinter

3 years agopowerpc/powernv: Don't configure disabled CPUs
Justin Hibbits [Mon, 8 Jun 2020 02:28:00 +0000 (02:28 +0000)]
powerpc/powernv: Don't configure disabled CPUs

If the POWER firmware detects a bad CPU core, it will "GUARD" it out,
marking it disabled.  Any attempt to spin up a bad CPU will trigger a panic
later on when waiting for threads on said core to wake up.  Support limping
along on fewer cores instead.

3 years agox86 boot.8: Remove obsolescent non-loader x86 boot documentation
Conrad Meyer [Mon, 8 Jun 2020 00:46:19 +0000 (00:46 +0000)]
x86 boot.8: Remove obsolescent non-loader x86 boot documentation

x86 boot uses loader(8) and the boot2-direct-to-kernel process is not
supported.  Remove the documentation, which doesn't document a working
process and leads to confusion.

PR: 247074
Reported by: Alex K.

3 years agoservices: Add SSDP to service database
Pedro F. Giffuni [Sun, 7 Jun 2020 19:56:17 +0000 (19:56 +0000)]
services: Add SSDP to service database

This is used for UPnP and is registered in the IANA database.

MFC after: 2 weeks
PR: 241573

3 years agoRetire SCTP_SO_LOCK_TESTING.
Michael Tuexen [Sun, 7 Jun 2020 14:39:20 +0000 (14:39 +0000)]
Retire SCTP_SO_LOCK_TESTING.

This was intended to test the locking used in the MacOS X kernel on a
FreeBSD system, to make use of WITNESS and other debugging infrastructure.
This hasn't been used for ages, to take it out to reduce the #ifdef
complexity.

MFC after: 1 week

3 years agoRemove now-unused GNU as build infrastructure
Ed Maste [Sun, 7 Jun 2020 13:53:23 +0000 (13:53 +0000)]
Remove now-unused GNU as build infrastructure

3 years agobridge tests: Re-enable STP test
Kristof Provost [Sun, 7 Jun 2020 13:53:02 +0000 (13:53 +0000)]
bridge tests: Re-enable STP test

This test should no longer provoke large amounts of traffic, which can
overwhelm single-core systems, preventing them from making progress in the
tests.

The test can now be re-enabled.

PR: 246448

3 years agosrc.conf.5: regen after BINUTILS options removal
Ed Maste [Sun, 7 Jun 2020 13:52:49 +0000 (13:52 +0000)]
src.conf.5: regen after BINUTILS options removal

3 years agoAdd EXAMPLES to cover all flags except -f since it is analogous to -s.
Benedict Reuschling [Sun, 7 Jun 2020 13:21:47 +0000 (13:21 +0000)]
Add EXAMPLES to cover all flags except -f since it is analogous to -s.

An EXAMPLE section was adding with some basic examples that show the use of
uniq(1) with various flags.

Submitted by: fernape@
Approved by: bcr@
MFC after: 4 days
Relnotes: yes (EXAMPLE section for uniq(1))
Differential Revision: https://reviews.freebsd.org/D25149

3 years agotaskqueue(9): reference callout(9) instead of timeout(9)
Yuri Pankov [Sun, 7 Jun 2020 09:17:57 +0000 (09:17 +0000)]
taskqueue(9): reference callout(9) instead of timeout(9)

As timeout(9) was removed and all consumers were converted to
callout(9), reference it instead for the description of sbt, pr,
and flags arguments.

Reviewed by: trasz
Differential Revision: https://reviews.freebsd.org/D25165

3 years agops: use %hs instead of %s format specifiers
Yuri Pankov [Sun, 7 Jun 2020 08:21:19 +0000 (08:21 +0000)]
ps: use %hs instead of %s format specifiers

Use %hs (locale-based encoding) instead of %s (UTF-8) format for
strings that are expected to be in current locale encoding (date/time,
process names/argument list).

PR: 241491
Reviewed by: phil
Differential Revision: https://reviews.freebsd.org/D22160

3 years ago[if_ath] Don't update the beacon bits from beacon frames in hostapd mode.
Adrian Chadd [Sun, 7 Jun 2020 05:08:44 +0000 (05:08 +0000)]
[if_ath] Don't update the beacon bits from beacon frames in hostapd mode.

This logic is running the beacon receive bits in STA+AP mode on both the
STA and AP side.  The STA side sees its beacons from the BSS fine; the
AP side is seeing other beacons on the same channel but with the BSS
node for some odd reason.  (I think it's a valid reason, but I currently
forget what that valid reason is.)

So, just to be cleaner about things, don't run the nexttbtt/etc bits
at all if we're in hostap mode.  If I ever get mesh working then maybe
I'll make sure it works right on mesh+ap and mesh+sta modes.

Whilst here, log the VAP i'm being called on to make it clearer what
is going on.  I may end up adding a VAP dprintf version of this at
some point.

Tested:

* AR9380, STA (DWDS client) + hostap on the same NIC

3 years ago[net80211] Add a method to return the vap's ifname.
Adrian Chadd [Sun, 7 Jun 2020 04:57:48 +0000 (04:57 +0000)]
[net80211] Add a method to return the vap's ifname.

This removes the requirement to know what's in the ifp.

(If someone wants a quick clean-up task, it'd be nice to convert instances
of ifp dereferencing for if_xname over to this method.)

3 years agosed: attempt to learn about hex escapes (e.g. \x27)
Kyle Evans [Sun, 7 Jun 2020 04:32:38 +0000 (04:32 +0000)]
sed: attempt to learn about hex escapes (e.g. \x27)

Somewhat predictably, software often wants to use \x27/\x24 among others so
that they can decline worrying about ugly escaping, if said escaping is even
possible. Right now, this software is using these and getting the wrong
results, as we'll interpret those as x27 and x24 respectively. Some examples
of this, when an exp-run was ran, were science/octopus and misc/vifm.

Go ahead and process these at all times.  We allow either one or two digits,
and the tests account for both.  If extra digits are specified, e.g. \x2727,
then the third and fourth digits are interpreted literally as one might
expect.

PR: 229925
MFC after: 2 weeks

3 years agoMention nda where we mention nvd.
Warner Losh [Sun, 7 Jun 2020 02:40:21 +0000 (02:40 +0000)]
Mention nda where we mention nvd.

3 years agoRetire BINUTILS and BINUTILS_BOOTSTRAP options
Ed Maste [Sun, 7 Jun 2020 00:07:21 +0000 (00:07 +0000)]
Retire BINUTILS and BINUTILS_BOOTSTRAP options

As of r361857 all BINUTILS options are disabled by default - ports
have been changed to depend on binutils if they require GNU as, and
all base system assembly files have been switched to use Clang's
integrated assembler.

Relnotes: Yes
Sponsored by: The FreeBSD Foundation

3 years agosrc.conf.5: regen after r361876, SYSTEM_LINKER description update
Ed Maste [Sat, 6 Jun 2020 22:26:44 +0000 (22:26 +0000)]
src.conf.5: regen after r361876, SYSTEM_LINKER description update

3 years ago[net80211] Flip on A-MPDU, A-MSDU, A-MPDU+A-MSDU and Fast frames options.
Adrian Chadd [Sat, 6 Jun 2020 22:25:00 +0000 (22:25 +0000)]
[net80211] Flip on A-MPDU, A-MSDU, A-MPDU+A-MSDU and Fast frames options.

This updates the logic to allow:

* A-MPDU if available;
* A-MSDU if available and A-MPDU is off/NACKed;
* A-MPDU+A-MSDU if it's available and negotiated;
* Fast frames if the node is 11abg (and not HT/VHT.)

This allows for things to fail back to A-MSDU or fast frames
if A-MPDU isn't available rather than needing to be non-HT/non-VHT.
It also allows A-MPDU+A-MSDU to work if it's negotiated.

Tested:

* AR9380, STA + AP mode (A-MPDU, A-MSDU, FF, A-MPDU+A-MSDU)
* RT5350, STA mode (A-MSDU, FF)
* AR9170, STA mode (A-MSDU, FF)

3 years agoFix typo in comment.
Michael Tuexen [Sat, 6 Jun 2020 21:26:34 +0000 (21:26 +0000)]
Fix typo in comment.

Submitted by Orgad Shaneh for the userland stack.
MFC after: 1 week

3 years agoUpdate SYSTEM_LINKER descriptions wrt BINUTILS
Ed Maste [Sat, 6 Jun 2020 21:07:50 +0000 (21:07 +0000)]
Update SYSTEM_LINKER descriptions wrt BINUTILS

GNU ld hasn't been built with the BINUTILS option for some time.

3 years agoClear the IN_SIZEMOD and IN_IBLKDATA flags only when doing a
Kirk McKusick [Sat, 6 Jun 2020 20:17:56 +0000 (20:17 +0000)]
Clear the IN_SIZEMOD and IN_IBLKDATA flags only when doing a
synchronous inode update.

The IN_SIZEMOD and IN_IBLKDATA flags indicate changes to the
file size and block pointer fields in the inode. When these
fields have been changed, the fsync() and fsyncdata() system
calls must write the inode to ensure their semantics that the
file is on stable store.

The IN_SIZEMOD and IN_IBLKDATA flags cannot be cleared until
a synchronous write of the inode is done. If they are cleared
on an asynchronous write, then the inode may not yet have been
written to the disk when an fsync() or fsyncdata() call is done.
Absent these flags, these calls would not know that they needed
to write the inode. Thus, these flags only can be cleared on
synchronous writes of the inode. Since the inode will be locked
for the duration of the I/O that writes it to disk, no fsync()
or fsyncdata() will be able to run before the on-disk inode
is complete.

Reviewed by: kib
MFC with: -r361785
Differential revision:  https://reviews.freebsd.org/D25072

3 years agopowerpc: Fix nits in copyinout comments from r361861
Justin Hibbits [Sat, 6 Jun 2020 18:56:40 +0000 (18:56 +0000)]
powerpc: Fix nits in copyinout comments from r361861

Also, remove useless nested #ifdefs in the IFUNC block.

Reported by: bdragon@

3 years agoAdd a section on CAM architecture.
Warner Losh [Sat, 6 Jun 2020 18:43:08 +0000 (18:43 +0000)]
Add a section on CAM architecture.
Add xref to all SIM devices we currently have (including a rough indication
which ones are likely to fail).
Update to include all the CAM options.
Fix a few igor nits while I'm here.

3 years agoNon-functional changes due to cleanup (upstream removing of Panda support)
Michael Tuexen [Sat, 6 Jun 2020 18:20:09 +0000 (18:20 +0000)]
Non-functional changes due to cleanup (upstream removing of Panda support)
of the code

MFC after: 1 week

3 years agostats(7): fix bad Xr references and lint noise
Yuri Pankov [Sat, 6 Jun 2020 17:48:55 +0000 (17:48 +0000)]
stats(7): fix bad Xr references and lint noise

Reviewed by: bjk, debdrup
Differential Revision: https://reviews.freebsd.org/D25166

3 years agoRevert r361838
Conrad Meyer [Sat, 6 Jun 2020 14:19:16 +0000 (14:19 +0000)]
Revert r361838

Reported by: delphij

3 years agoSort alphabetically.
Warner Losh [Sat, 6 Jun 2020 07:13:06 +0000 (07:13 +0000)]
Sort alphabetically.

3 years agoFix typo
Warner Losh [Sat, 6 Jun 2020 06:49:06 +0000 (06:49 +0000)]
Fix typo

Submitted by: Yuri Pankov

3 years agoDocument all the sysctl values for the nda devices. Include some minimal
Warner Losh [Sat, 6 Jun 2020 06:21:20 +0000 (06:21 +0000)]
Document all the sysctl values for the nda devices. Include some minimal
documentation on namespace support for nda devices. Fix a few typos
and formatting nits to apease igor.

3 years agoAdd a tunable for the nvd symlink creation.
Warner Losh [Sat, 6 Jun 2020 06:21:15 +0000 (06:21 +0000)]
Add a tunable for the nvd symlink creation.

Some automation tries to detect if nvd or nda is in used, and the presence of
both confuses it. Provide a knob to turn off nvd alias creation
(kern.cam.nda.nvd_compat=0) for these situations. The default is the same:
create the nvd compat link.

3 years agoEnsure that we send at least LBA range per TRIM.
Warner Losh [Sat, 6 Jun 2020 06:20:04 +0000 (06:20 +0000)]
Ensure that we send at least LBA range per TRIM.

3 years ago[net80211] Fix this typo!
Adrian Chadd [Sat, 6 Jun 2020 06:17:51 +0000 (06:17 +0000)]
[net80211] Fix this typo!

I've just started using this macro in upcoming amsdu/ampdu/ff rework and
yes, too many parens.  Oops!

3 years ago[net80211] Fix typo.
Adrian Chadd [Sat, 6 Jun 2020 05:46:12 +0000 (05:46 +0000)]
[net80211] Fix typo.

Oops!

3 years agopowerpc: Use IFUNCs for copyin/copyout/etc
Justin Hibbits [Sat, 6 Jun 2020 03:09:12 +0000 (03:09 +0000)]
powerpc: Use IFUNCs for copyin/copyout/etc

Summary:
Radix on AIM, and all of Book-E (currently), can do direct addressing of
user space, instead of needing to map user addresses into kernel space.
Take advantage of this to optimize the copy(9) functions for this
behavior, and avoid effectively NOP translations.

Test Plan: Tested on powerpcspe, powerpc64/booke, powerpc64/AIM

Reviewed by: bdragon
Differential Revision: https://reviews.freebsd.org/D25129

3 years agoRemove GNU objcopy and objdump build infrastructure
Ed Maste [Sat, 6 Jun 2020 02:45:57 +0000 (02:45 +0000)]
Remove GNU objcopy and objdump build infrastructure

We haven't used the GNU versions of these tools for some time.

3 years agopowerpc: Add a (CPU/runtime features) flags set to pcpu struct
Justin Hibbits [Sat, 6 Jun 2020 02:40:52 +0000 (02:40 +0000)]
powerpc: Add a (CPU/runtime features) flags set to pcpu struct

Summary:
The point of this addition is to cache CPU behavior 'features', to avoid
having to recompute based on CPU, etc.

The first such use case is to avoid the unnecessary manipulation of the
SLBs (Segment Lookaside Buffers) when using the Radix pmap on POWER9.
Since we already get the PCPU pointer wherever we swap the SLB entries,
we can use a cached flag to check if it's necessary to perform the
operation anyway, and skip it when not.

Reviewed by: bdragon
Differential Revision: https://reviews.freebsd.org/D24908

3 years agosrc.conf.5: regen after r361857, BINUTILS_BOOTSTRAP off by default
Ed Maste [Sat, 6 Jun 2020 02:28:21 +0000 (02:28 +0000)]
src.conf.5: regen after r361857, BINUTILS_BOOTSTRAP off by default

3 years agosrc.opts.mk: disable BINUTILS_BOOTSTRAP universally
Ed Maste [Sat, 6 Jun 2020 02:27:28 +0000 (02:27 +0000)]
src.opts.mk: disable BINUTILS_BOOTSTRAP universally

As of r361853 skein_block_asm.S is assembled using Clang's integrated
assembler.

PR: 233611
Sponsored by: The FreeBSD Foundation

3 years agoDon't mark pages as valid if reading the contents from disk fails.
Chuck Silvers [Sat, 6 Jun 2020 00:47:59 +0000 (00:47 +0000)]
Don't mark pages as valid if reading the contents from disk fails.
Instead, just skip marking pages valid if the read fails.  Future
attempts to access such pages will notice that they are not marked valid
and try to read them from disk again.

Reviewed by: kib, markj
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D25138

3 years agoFix mountd so that it will not lose SIGHUPs that indicate "reload exports".
Rick Macklem [Sat, 6 Jun 2020 00:40:02 +0000 (00:40 +0000)]
Fix mountd so that it will not lose SIGHUPs that indicate "reload exports".

Without this patch, if a SIGHUP is handled while the process is executing
get_exportlist(), that SIGHUP is essentially ignored because the got_sighup
variable is reset to 0 after get_exportlist().
This results in the exports file(s) not being reloaded until another SIGHUP
signal is sent to mountd.
This patch fixes this by resetting got_sighup to zero before the
get_exportlist() call while SIGHUP is blocked.
It also defines a delay time of 250msec before doing another exports reload
if there are RPC request(s) to process. This prevents repeated exports reloads
from delaying handling of RPC requests significantly.

PR: 246597
Reported by: patrykkotlowski@gmail.com
Tested by: patrykkotlowski@gmail.com
Reviewed by: markj
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D25127

3 years agoRename skein_block_asm.s to .S and assemble using Clang IAS
Ed Maste [Sat, 6 Jun 2020 00:35:41 +0000 (00:35 +0000)]
Rename skein_block_asm.s to .S and assemble using Clang IAS

Comparing the object files produced by GNU as 2.17.50 and Clang IAS
shows many immaterial changes in strtab etc., and one material change
in .text:

   1bac:  4c 8b 4f 18             mov    0x18(%rdi),%r9
   1bb0:  eb 0e                   jmp    1bc0 <Skein1024_block_loop>
-  1bb2:  66 66 2e 0f 1f 84 00    data16 nopw %cs:0x0(%rax,%rax,1)
-  1bb9:  00 00 00 00
-  1bbd:  0f 1f 00                nopl   (%rax)
+  1bb2:  66 2e 0f 1f 84 00 00    nopw   %cs:0x0(%rax,%rax,1)
+  1bb9:  00 00 00
+  1bbc:  0f 1f 40 00             nopl   0x0(%rax)

 0000000000001bc0 <Skein1024_block_loop>:
 Skein1024_block_loop():
   1bc0:  4c 8b 47 10             mov    0x10(%rdi),%r8
   1bc4:  4c 03 85 c0 00 00 00    add    0xc0(%rbp),%r8

That is, GNU as and Clang's integrated assembler use different multi-
byte NOPs for alignment (GNU as emits an 11 byte NOP + a 3 byte NOP,
while Clang IAS emits a 10 byte NOP + a 4 byte NOP).

Dependency cleanup hacks are not required, because we do not create
.depend files from GNU as.

Reviewed by: allanjude, arichardson, cem, tsoome
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D8434

3 years agoFix hang due to missing unbusy in sendfile when an async data I/O fails.
Chuck Silvers [Sat, 6 Jun 2020 00:02:50 +0000 (00:02 +0000)]
Fix hang due to missing unbusy in sendfile when an async data I/O fails.

r359473 removed the page unbusy logic from sendfile_iodone() because when
vm_pager_get_pages_async() would return an error after failing to start
the async I/O (eg. because VOP_BMAP failed), sendfile_swapin() would also
unbusy the pages, and it was wrong to unbusy twice.  However this breaks
the case where vm_pager_get_pages_async() succeeds in starting an async I/O
and the async I/O is what fails.  In this case, sendfile_iodone() must
unbusy the pages, and because sendfile_iodone() doesn't know which case
it is in, sendfile_iodone() must always unbusy pages and relookup pages
which have been substituted with bogus_page, which in turn means that
sendfile_swapin() must never do unbusy or relookup for pages which have
been given to vm_pager_get_pages_async(), even if there is an error.

Reviewed by: kib, markj
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D25136

3 years agoMakefile.inc1: remove stale dependency cleanup from 2018
Ed Maste [Fri, 5 Jun 2020 20:18:55 +0000 (20:18 +0000)]
Makefile.inc1: remove stale dependency cleanup from 2018

3 years agodts: patch the am33xx dts for upcoming clock support
Emmanuel Vadot [Fri, 5 Jun 2020 20:14:54 +0000 (20:14 +0000)]
dts: patch the am33xx dts for upcoming clock support

Some ranges are too small compared to what they really are.
Add functional clocks for the timers.

Submitted by:  Oskar Holmlund (oskar.holmlund@ohdata.se)
X-Differential Revision: https://reviews.freebsd.org/D25118

3 years agodts: Update our copy to be in sync with Linux 5.7
Emmanuel Vadot [Fri, 5 Jun 2020 20:09:13 +0000 (20:09 +0000)]
dts: Update our copy to be in sync with Linux 5.7

MFC after: 2 months

3 years agoImport DTS files from Linux 5.7
Emmanuel Vadot [Fri, 5 Jun 2020 19:28:32 +0000 (19:28 +0000)]
Import DTS files from Linux 5.7

3 years agoAlso pass SKEIN_USE_ASM to the assembler, via AFLAGS
Ed Maste [Fri, 5 Jun 2020 18:56:43 +0000 (18:56 +0000)]
Also pass SKEIN_USE_ASM to the assembler, via AFLAGS

3 years agolibrtld_db: Handle anonymous mappings below the first file mapping.
Mark Johnston [Fri, 5 Jun 2020 18:44:14 +0000 (18:44 +0000)]
librtld_db: Handle anonymous mappings below the first file mapping.

r360979 erroneously assumed that the lowest mapping in an address space
would be a file mapping, but of course this is not true in general.

Reported and tested by: Frederic Chardon <chardon.frederic@gmail.com>
MFC after: 3 days

3 years agoskein_block_asm.S: use #ifdef not .ifdef, for Clang IAS
Ed Maste [Fri, 5 Jun 2020 18:37:04 +0000 (18:37 +0000)]
skein_block_asm.S: use #ifdef not .ifdef, for Clang IAS

Clang IAS does not support the --defsym argument, and

.ifndef SKEIN_USE_ASM

gets turned into

.ifndef 1792

by the preprocessor, which results in

error: expected identifier after '.ifdef'
.ifndef 1792
        ^

Use #ifdef instead, which still works with GNU as.

Reviewed by: cem
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D25154

3 years agozfsbootcfg: use vfs.root.mountfrom and update nextboot on every vdev
Toomas Soome [Fri, 5 Jun 2020 18:18:27 +0000 (18:18 +0000)]
zfsbootcfg: use vfs.root.mountfrom and update nextboot on every vdev

vfs.zfs.boot.primary_pool is only set on BIOS boot, use vfs.root.mountfrom
instead and update all vdevs on pool.

Reviewed by: allanjude
Sponsored by: Netflix, Klara Inc.
Differential Revision: https://reviews.freebsd.org/D25103

3 years agoApply C SKEIN_LOOP setting only to skein_block.c
Ed Maste [Fri, 5 Jun 2020 17:00:38 +0000 (17:00 +0000)]
Apply C SKEIN_LOOP setting only to skein_block.c

Otherwise if assembling skein_block_asm.s with Clang's integrated assembler
we can pass conflicting SKEIN_LOOP settings (via CFLAGS and ACFLAGS).

3 years agoBelatedly bump .Dd for r361783
Benjamin Kaduk [Fri, 5 Jun 2020 16:59:14 +0000 (16:59 +0000)]
Belatedly bump .Dd for r361783

Reported by: lwhsu
Pointy hat to: bjk

3 years agogeom_label: Use provider aliasing to alias upstream geoms
Conrad Meyer [Fri, 5 Jun 2020 16:12:21 +0000 (16:12 +0000)]
geom_label: Use provider aliasing to alias upstream geoms

For synthetic aliases (just pseudonyms inferred from metadata like GPT or
UFS labels, GPT UUIDs, etc), use the GEOM provider aliasing system to create
a symlink to the real device instead of creating an independent device.
This makes it more clear which labels and devices correspond, and we can
safely have multiple labels to a single device accessed at once.

The confusingly named geom_label on-disk construct continues to behave
identically to how it did before.

This requires teaching GEOM's provider aliasing about the possibility
that aliases might be added later in time, and GEOM's devfs interaction
layer not to worry about existing aliases during retaste.

Discussed with: imp
Relnotes: sure, if we don't end up reverting it
Differential Revision: https://reviews.freebsd.org/D24968

3 years agogeom: Don't re-add duplicate aliases
Conrad Meyer [Fri, 5 Jun 2020 16:05:09 +0000 (16:05 +0000)]
geom: Don't re-add duplicate aliases

Reviewed by: imp (informal +1; extracted from phab 24968)

3 years agoAdd bunch of HDA controller and codec IDs.
Alexander Motin [Fri, 5 Jun 2020 15:06:58 +0000 (15:06 +0000)]
Add bunch of HDA controller and codec IDs.

MFC after: 2 weeks

3 years ago[net80211] Don't call ic_updateslot if it's not set.
Adrian Chadd [Fri, 5 Jun 2020 14:17:19 +0000 (14:17 +0000)]
[net80211] Don't call ic_updateslot if it's not set.

Turns out this isn't a required call. I didn't pick it up because my
uncommitted changes involve new updateslot methods for cards I'm working
on.

Dunce hat to: adrian

3 years agoAllow assembling skein_block_asm.s with clang
Alex Richardson [Fri, 5 Jun 2020 13:54:13 +0000 (13:54 +0000)]
Allow assembling skein_block_asm.s with clang

GNU as seems to allow macro arguments without the '\' but clang is more
strict in that regard.
This change makes the source code compatible with LLVM's but does not yet
change the build system or rename it to .S.

The new code assembles identically with GNU as 2.17.50.

Reviewed By: emaste
Differential Revision: https://reviews.freebsd.org/D25143

3 years agocsu: Avoid additional nops in the MIPS INIT_CALL_SEQ macro
Alex Richardson [Fri, 5 Jun 2020 08:46:55 +0000 (08:46 +0000)]
csu: Avoid additional nops in the MIPS INIT_CALL_SEQ macro

Since we had a .set reorder, the nop after the "jal" was being placed after
the delay slot, resulting in two nops.
While changing this code also guard the .set noreorder with .set push/pop
and use $zero as the cpsetup save register since we don't need to save $gp.

Reviewed By: jhb
Differential Revision: https://reviews.freebsd.org/D25025

3 years agoAvoid using non-portable dd status=none flag
Alex Richardson [Fri, 5 Jun 2020 08:46:50 +0000 (08:46 +0000)]
Avoid using non-portable dd status=none flag

Copying the approach chosen in r309412. This fixes building the libc tests
on a macOS host since the macOS /bin/dd binary does not support status=none.

As there only seem to be two uses, this commit changes the two Makefiles.
If this becomes more common, we could also add a wrapper bootstrap script
that ignores status= and forwards the remaining args to the real dd.
Another alternative would be to remove the status flag and pipe stderr to
/dev/null, but them we lose error messages.

Reviewed By: brooks
Differential Revision: https://reviews.freebsd.org/D24785

3 years agoEnsure pci_channel_offline() actually queries the PCI register space,
Hans Petter Selasky [Fri, 5 Jun 2020 08:12:08 +0000 (08:12 +0000)]
Ensure pci_channel_offline() actually queries the PCI register space,
and not only the software cache of that register.  Else
pci_channel_offline() won't detect that the PCI device is gone when
using the LinuxKPI.

MFC after: 1 week
Sponsored by: Mellanox Technologies