Commit Graph

253150 Commits

Author SHA1 Message Date
Ed Maste
073e409487 Makefile.inc1: remove more old stale depend hacks
Current stale dependency hacks are in tools/build/depend-cleanup.sh.
These ones were almost a year old; remove them from Makefile.inc1.
2020-09-13 23:05:19 +00:00
Kirk McKusick
314a6544c5 In the newfs(8) utility, use the more appropriate sbwrite() and cgwrite()
libufs interfaces rather than sbput() and cgput().

No functional change.

MFC after:    7 days
Sponsored by: Netflix
2020-09-13 22:57:50 +00:00
Brandon Bergren
e44d86731e [PowerPC] bus_space cleanup part 2: Convert to c99 initializers.
To make it easier to work with this in the future, convert to c99
designated initializer syntax.

Tested on powerpc, powerpc64, and powerpc64le. No functional change.

Sponsored by:	Tag1 Consulting, Inc.
2020-09-13 21:34:32 +00:00
Brandon Bergren
88e3d5df6a [PowerPC] bus_space cleanup part 1 - rename bs_be / bs_le functions
The intention of the bus_be naming was for those to be the no-endian-swapping
and for the bus_le to be endian-swapping in all the functions.

This naming breaks down when we're actually are running in LE and need to
use the opposite sense.

As such, rename bs_be_* to native_bs_* and rename bs_le_* to swapped_bs_*.

No functional change.

Sponsored by:	Tag1 Consulting, Inc.
2020-09-13 21:27:30 +00:00
Brandon Bergren
edf215199e [PowerPC64LE] Bus space prep for LE
Swap the BE and LE bus_space tags when on LE, and adjust the nexus tag
to match.

This is prep for a a followup that makes the powerpc bus_space macros easier
to maintain in the future.

Sponsored by:	Tag1 Consulting, Inc.
2020-09-13 21:22:39 +00:00
Colin Percival
a72eeb2025 Spawn the DHCPv6 client in EC2 instances via rtsold.
Prior to this commit, EC2 AMIs used a "dual-dhclient" tool which was
launched in place of dhclient and spawned both the base system dhclient
for IPv4 and the ISC dhclient from ports for IPv6.

Now that rtsold supports the "M bit" (managed configuration), we can go
back to having the base system dhclient spawned normally, and provide a
script to rtsold which spawns the ISC dhclient from ports when rtsold
decides that it is appropriate.

Thanks to:	bz
MFC after:	1 week
Sponsored by:	https://www.patreon.com/cperciva
2020-09-13 19:56:53 +00:00
Colin Percival
ff5188db54 Bump the size of EC2 AMIs up to 5 GB.
The FreeBSD base system continues to expand.  4GB is now insufficient;
we passed 3 GB in May 2019; we passed 2 GB in August 2017.  Over half
of the disk space used is in /usr/lib/debug/.

Without this change, instances boot but are unusable, since the first
thing which breaks when VM filesystems are too small is the "pkg install"
in the VM building process.
2020-09-13 19:11:45 +00:00
Brandon Bergren
b963e10d68 [PowerPC64LE] Ensure nvram is built on powerpc64le.
Fix some cases where conditionals that were trying to exclude powerpcspe
were also excluding powerpc64le.

Sponsored by:	Tag1 Consulting, Inc.
2020-09-13 18:24:15 +00:00
Brandon Bergren
81472778e8 [PowerPC64LE] Adjust ELF definitions for LE.
Set ELF_TARG_DATA correctly on PowerPC64LE.

Sponsored by:	Tag1 Consulting, Inc.
2020-09-13 17:36:43 +00:00
Ed Maste
0624416248 Remove WITHOUT_BMAKE description
The option was retired in r265423 and bmake is the only make in tree.
2020-09-13 17:13:32 +00:00
Brandon Bergren
43d3fc803c [PowerPC] Implement pmap_mincore() for moea
Do the same as previous for moea.

Tested on G4.
2020-09-13 16:46:03 +00:00
Brandon Bergren
96f57c313d [PowerPC64] Implement pmap_mincore() for moea64
Implement pmap_mincore() for moea64.

This will need some slight tweaks when large page support in HPT lands.

Submitted by:	Fernando Eckhardt Valle <fernando.valle@eldorado.org.br>
Reviewed by:	bdragon
Differential Revision:	https://reviews.freebsd.org/D26314
2020-09-13 16:42:49 +00:00
Michael Tuexen
b98a21f64a Add a -C option to netstat to display the congestion control for
TCP connections.

Reviewed by:		rscheff
MFC after:		1 week
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D26414
2020-09-13 09:14:32 +00:00
Michael Tuexen
2ac089d0e6 Add a -C option to sockstat to display the congestion control for TCP
connections.

Reviewed by:		rscheff
MFC after:		1 week
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D26413
2020-09-13 09:12:25 +00:00
Michael Tuexen
42d7560796 Export the name of the congestion control. This will be used by sockstat
and netstat.

Reviewed by:		rscheff
MFC after:		1 week
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D26412
2020-09-13 09:06:50 +00:00
Michael Tuexen
c70906519a Add a -t option to traceroute6 to control the traffic class used when
sending probe packets.

Reviewed by:		rscheff
MFC after:		1 week
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D26410
2020-09-13 09:00:00 +00:00
Brandon Bergren
7be655c2b4 [PowerPC] Add PVO_PADDR macro to mmu_oea.c to match mmu_oea64.c changes
Use a PVO_PADDR macro on 32 bit as well, to reduce the difference between
mmu_oea.c and mmu_oea64.c.

Equivilent to the changes in r363222.
2020-09-12 23:54:57 +00:00
Mike Karels
ac89220b05 bcm2838_pci.c: Respect DMA limits of controller.
Fixes for Raspberry Pi 4B PCIe / USB:
- Pass through a DMA tag for the controller.
- In theory the controller can access the lower 3 GB, but testing found
  that unreliable. OpenBSD also restricts DMA to the lowest 960 MiB.
- Rename some constants to be a bit more meaningful.

Submitted by:	Robert Crowston, crowston at protonmail.com
Reviewed by:	mkarels, outside reviewers
Differential Revision:	https://reviews.freebsd.org/D26344
2020-09-12 23:49:43 +00:00
Brandon Bergren
33fa4ac54f [PowerPC64LE] Fix platform definitions for powerpc64le-*-freebsd*
Teach clang that powerpc64le-*-freebsd* is a valid triple.

This is already in upstream clang, but was too late for llvm 11.0.0.
Apply it directly for now, until it can be backported to llvm 11.0.1.

See upstream https://reviews.llvm.org/D73425 for details.

Reviewed by:	dim (upstream version), emaste
Approved by:	emaste
Differential Revision:	https://reviews.freebsd.org/D26400
2020-09-12 18:23:27 +00:00
Warner Losh
451f890aaa Update flp test for new diskinfo output
The floppy test passes with this. The others fail due to 'integrity
checks' failing in GPART. It's not at all clear those integrity
checks are legit or if the test samples were bogusly generated
by FreeBSD.
2020-09-12 17:24:04 +00:00
Warner Losh
75ce6ac63f Fix trailing whitespace 2020-09-12 17:24:00 +00:00
Warner Losh
ee2e68af86 Make this compile again by fixing err args to have formats
Also, add NO_OBJ=t top the Makefie, since the test-harnest expects to
run it in place.
2020-09-12 17:23:51 +00:00
Michael Tuexen
3303e9bc22 Fix the length of probe packets when using UDP.
Since https://svnweb.freebsd.org/changeset/base/365378 a raw socket is
used for sending UDP probe packets instead of a UDP socket. So don't
compensate for the UDP header anymore.
2020-09-12 11:24:36 +00:00
Michael Tuexen
2d0fb1b3c1 Simplify code, no functional change.
Since https://svnweb.freebsd.org/base?view=revision&revision=365378
UDP is handled the same way as SCTP and TCP (using a raw socket).
Therefore use the same code path.
2020-09-12 11:19:54 +00:00
Jason A. Harmening
3966af52f3 amd64: prevent KCSan false positives on LAPIC mapping
For configurations without x2APIC support (guests, older hardware), the global
LAPIC MMIO mapping will trigger false-positive KCSan reports as it will appear
that multiple CPUs are concurrently reading and writing the same address.
This isn't actually true, as the underlying physical access will be performed
on the local CPU's APIC. Additionally, because LAPIC access can happen during
event timer configuration, the resulting KCSan printf can produce a panic due
to attempted recursion on event timer resources.

Add a __nosanitizethread preprocessor define to prevent the compiler from
inserting TSan hooks, and apply it to the x86 LAPIC accessors.

PR:		249149
Reported by:	gbe
Reviewed by:	andrew, kib
Tested by:	gbe
Differential Revision:	https://reviews.freebsd.org/D26354
2020-09-12 07:04:00 +00:00
John-Mark Gurney
7d5522e16a A major update to the ure driver.
This update adds support for:
HW VLAN tagging
HW checksum offload for IPv4 and IPv6
tx and rx aggreegation (for full gige speeds)
multiple transactions

In my testing, I am able to get 900-950Mbps depending upon
TCP or UDP, which is a significant improvement over the previous
91Mbps (~8kint/sec*1500bytes/packet*1packet/int).

Reviewed by:	hselasky
MFC after:	2 months
Differential Revision:	https://reviews.freebsd.org/D25809
2020-09-12 00:33:11 +00:00
Glen Barber
038fe1e3ef Enclose BRANCH_OVERRIDE in quotes in order to fix an issue with
freebsd-update(8) builds, where BRANCH is suffixed with -p0 for
builds.

Noticed by:	gordon
With help from:	cperciva
MFC after:	3 days
MFC note:	before 12.2-BETA2
Sponsored by:	Rubicon Communications, LLC (netgate.com)
2020-09-12 00:06:45 +00:00
Warner Losh
3e3f720cb0 Remove disk images / tests from alpha, sun and pc98
These images are no longer relevant...  However, I've also not tested
the regression test here to see if it still works or not... It needs
a lot of love regardless...
2020-09-11 23:37:49 +00:00
Scott Long
1002529ea9 Convert the mps driver to use busdma templates 2020-09-11 22:27:35 +00:00
Alan Somers
1ea95ba231 cp: fall back to read/write if copy_file_range fails
Even though copy_file_range has a file-system agnostic version, it still
fails on devfs (perhaps because the file descriptor is non-seekable?) In
that case, fallback to old-fashioned read/write. Fixes
"cp /dev/null /tmp/null"

PR:		249248
Reported by:	Michael Butler
Reviewed by:	mjg
MFC-With:	365549
Differential Revision:	https://reviews.freebsd.org/D26395
2020-09-11 20:49:36 +00:00
John Baldwin
d8dc46f6e9 Add constant for the DE_CFG MSR on AMD CPUs.
Reported by:	Patrick Mooney <pmooney@pfmooney.com>
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D25885
2020-09-11 20:32:40 +00:00
Scott Long
d58ff30aca Improve the documenation for bus_dma templates. Also add notes to
make it clear that filters may not work correctly and that their use
is deprecated.

MFC after:	3 days
2020-09-11 19:45:26 +00:00
Gordon Bergling
e6ca69017c Improvements for the src.conf(5) and build(7) man pages
PR:		203863 (based on)
Submitted by:	Russell Haley <russ dot haley at gmail dot com>
Reviewed by:	bcr, imp
Approved by:	imp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D26343
2020-09-11 18:09:49 +00:00
Glen Barber
c71c2b76aa Fix indentation following r365638. No functional changes.
Sponsored by:	Rubicon Communications, LLC (netgate.com)
2020-09-11 17:05:09 +00:00
Glen Barber
91ce469984 Add a NOGIT option to avoid explicitly requiring devel/git if the
sources are obtained through a different mechanism.

Reported and tested by:	Ruslan Garipov
Sponsored by:	Rubicon Communications, LLC (netgate.com)
2020-09-11 17:04:09 +00:00
Kyle Evans
0f8c7ba275 MFV r365636: libarchive: import fix for WARNS=6 builds in testing bits
Two more cases of explicitly marking globals for internal linkage where they
need not be shared. Committed upstream as of a38e62314a1f.

MFC after:	1 week
2020-09-11 16:13:45 +00:00
Kyle Evans
4dd2ae60c2 libarchive: import fix for WARNS=6 builds in testing bits
Two more cases of explicitly marking globals for internal linkage where they
need not be shared. Committed upstream as of a38e62314a1f.
2020-09-11 16:12:48 +00:00
Bjoern A. Zeeb
aaa1fdb87b iwm: fix regression from r365419 (ieee80211_media_change())
In r365419 ieee80211_media_change() callers were updated to not longer
act on the obselete ENETRESET return code.
While in the old days iwm has done a stop/init cycle in these cases,
this was not executed since r193340.
As a consequence simplify iwm code as well by passing ieee80211_media_change()
right to ieee80211_vap_attach() as there is no more need for a local
implementation.

Reported by:	Tomoaki AOKI (junchoon dec.sakura.ne.jp)
Tested by:	Tomoaki AOKI (junchoon dec.sakura.ne.jp)
MFC after:	3 days
X-MFC:		fix is already in stable/12
PR:		248955
2020-09-11 14:18:47 +00:00
Kyle Evans
ecebb3cc1d Only set WARNS if not defined
This would allow interested parties to do experimental runs with an
environment set appropriately to raise all the warnings throughout the
build; e.g. env WARNS=6 NO_WERROR=yes buildworld.

Not currently touching the numerous instances in ^/tools.

MFC after:	1 week
2020-09-11 13:28:37 +00:00
Andrey V. Elsukov
b876085f55 Fix compatibility regression after r364117.
Properly handle the case, when some opcode keywords follow after
the `frag` opcode without additional options.

Reported by:	Evgeniy Khramtsov <evgeniy at khramtsov org>
2020-09-11 10:07:09 +00:00
Kristof Provost
effd82ca70 dtrace: fix fbt return probes on RISC-V
Return values are passed in a0, so read it from there. We also pass a1 through
to userspace, as the ABI allows small structs to be returned in registers
a0/a1. While here read the register values directly from the trapframe rather
than rtval, and remove the now unneeded argument from dtrace_invop().

Set fbtp_roffset so that we get the correct return location in arg0.

Reviewed by:	markj
Sponsored by:	Axiado
Differential Revision:	https://reviews.freebsd.org/D26389
2020-09-11 09:15:49 +00:00
Li-Wen Hsu
e55e20a0e9 Revert r365592 and r365603 as the tests are fixed by r365593
PR:		249236
Sponsored by:	The FreeBSD Foundation
2020-09-11 05:45:27 +00:00
Kyle Evans
8b8cf4ece6 memfd_create: simplify HUGETLB support a little bit
This also fixes a minor issue that was missed in the initial review; the
layout of the MFD_HUGE_* flags is actually not 1:1 bit:flag -- it instead
borrowed the Linux convention of how this is laid out since it was
originally implemented on Linux, the top 6 bits represent the shift required
for the requested page size.

This allows us to remove the flag <-> pgsize mapping table and simplify the
logic just prior to validation of the requested page size.

While we're here, fix two small nits:

- HUGETLB memfd shouldn't exhibit the SHM_GROW_ON_WRITE behavior. We can
  only grow largepage shm by appropriately aligned (i.e. requested pagesize)
  sizes, so it can't work in the typical/sane fashion. Furthermore, Linux
  does the same, so let's be compatible.

- We don't allow MFD_HUGETLB without specifying a pagesize, so no need to
  check for that later.

Reviewed by:	kib (slightly earlier version)
2020-09-11 02:02:15 +00:00
John-Mark Gurney
0b39e3448a Don't clear reserved bits per RealTek
MFC after:	3 days
2020-09-11 02:02:13 +00:00
John Baldwin
39585a4c10 Disable WITNESS for spin locks by default.
This matches all other architectures and removes substantial overhead.

Reported by:	arichardson (indirectly)
Reviewed by:	imp, arichardson
Obtained from:	CheriBSD
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D26403
2020-09-11 00:06:16 +00:00
Eric Joyner
7d7af7f85b ice(4): Update to 0.26.16
Summary of changes:

- Assorted bug fixes
- Support for newer versions of the device firmware
- Suspend/resume support
- Support for Lenient Link Mode for E82X devices (e.g. can try to link with
  SFP/QSFP modules with bad EEPROMs)
- Adds port-level rx_discards sysctl, similar to ixl(4)'s

This version of the driver is intended to be used with DDP package 1.3.16.0,
which has already been updated in a previous commit.

Tested by:	Jeffrey Pieper <jeffrey.e.pieper@intel.com>
MFC after:	3 days
MFC with:	r365332, r365550
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D26322
2020-09-10 23:46:13 +00:00
John Baldwin
385f4a5ac8 Use vmcb_read/write for the vmcb snapshot functions.
This avoids some unnecessary layers of indirection.
2020-09-10 22:22:23 +00:00
Kyle Evans
9bf2b80ca6 memfd_create: fix return values
Literally returning EINVAL from a function designed to return an fd makes
for interesting scenarios.

I cannot assign enough pointy hats to cover this one.
2020-09-10 21:25:16 +00:00
Konstantin Belousov
7978363417 Fix interaction between largepages and seals/writes.
On write with SHM_GROW_ON_WRITE, use proper truncate.
Do not allow to grow largepage shm if F_SEAL_GROW is set. Note that
shrinks are not supported at all due to unmanaged mappings.
Call to vm_pager_update_writecount() is only valid for swap objects,
skip it for unmanaged largepages.
Largepages cannot support write sealing.
Do not writecnt largepage mappings.

Reported by:	kevans
Reviewed by:	kevans, markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D26394
2020-09-10 20:54:44 +00:00
Alexander V. Chernikov
99efb80d00 Add basic test for net.fibs dynamic growth.
Reviewed by:	kp
Differential Revision:	https://reviews.freebsd.org/D26382
2020-09-10 19:25:51 +00:00