Commit Graph

276040 Commits

Author SHA1 Message Date
Brooks Davis
cca1927261 amd64: -m32 support for machine/cpufunc.h
Install the i386 cpufunc.h under /usr/include/i386 on amd64 and include
when targeting i386.

Reviewed by:	jhb, imp
2022-06-13 18:35:38 +01:00
Brooks Davis
24983043bf x86: cleanup in machine/cpufunc.h
Reduce diffs between amd64 and i386 and improve whitespace

Reviewed by:	jhb, imp
2022-06-13 18:35:38 +01:00
Brooks Davis
d07600c563 amd64: symlink i386 includes into build dir
By creating an i386 symlink, this allows code compiled with -m32 to
build (32-bit vdso and linux bits) when -m32 support requires files
in the i386 hierarchy.

Reviewed by:	jhb, imp
2022-06-13 18:35:38 +01:00
Brooks Davis
a09ea2bbc3 amd64: add an i386 include directory
This directory will hold i386-specific headers that are needed for
-m32 support on amd64 and where the amd64 and i386 cases have too
little in common for combining them to make sense.  Files to be
installed will come in later commits.

With the currently required set of files, this could be done with
another INCGROUP in include/Makefile, but at least one file that
might want -m32 support (ieeefp.h) conflicts with a files installed
in /usr/include.

Reviewed by:	jhb, imp
2022-06-13 18:35:38 +01:00
Andrew Gallatin
43c72c45a1 lacp: Remove racy kassert
In lacp_select_tx_port_by_hash(), we assert that the selected port is
DISTRIBUTING. However, the port state is protected by the LACP_LOCK(),
which is not held around lacp_select_tx_port_by_hash().  So this
assertion is racy, and can result in a spurious panic when links
are flapping.

It is certainly possible to fix it by acquiring LACP_LOCK(),
but this seems like an early development assert, and it seems best
to just remove it, rather than add complexity inside an ifdef
INVARIANTS.

Sponsored by: Netflix
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D35396
2022-06-13 11:32:10 -04:00
Hans Petter Selasky
66a0bc2105 ibcore: Fix use-after-free access in ucma_close()
The error in ucma_create_id() left ctx in the list of contexts belong
to ucma file descriptor. The attempt to close this file descriptor causes
to use-after-free accesses while iterating over such list.

Linux commit:
ed65a4dc22083e73bac599ded6a262318cad7baf

PR:		264650
MFC after:	1 week
Sponsored by:	NVIDIA Networking
2022-06-13 17:00:16 +02:00
Hans Petter Selasky
e4d178d093 mlx5ib: Fix memory leak in clean_mr() error path
In the clean_mr() error path the 'mr' should be freed.

Linux commit:
5942d8ae411775b76e5e1ab0cce57b0666516f2d

PR:		264653
MFC after:	1 week
Sponsored by:	NVIDIA Networking
2022-06-13 17:00:16 +02:00
Doug Ambrisko
6468cd8e0e mount: add vnode usage per file system with mount -v
This avoids the need to drop into the ddb to figure out vnode
usage per file system.  It helps to see if they are or are not
being freed.  Suggestion to report active vnode count was from
kib@

Reviewed by:   	kib
Differential Revision: https://reviews.freebsd.org/D35436
2022-06-13 07:56:38 -07:00
Bjoern A. Zeeb
9c951734c2 rtw88: update Realtek's rtw88 driver
Update rtw88 based on wireless-testing at
4e051428044d5c47cd2c81c3b154788efe07ee11 (tag: wt-2022-06-10).

This is in preparation to apply USB changes to work on these and
LinuxKPI for them over the next weeks, as well to debug a
reported issue, and possibly extract and upstream some local fixes.

MFC after:	3 days
2022-06-13 13:57:42 +00:00
Sergey Kandaurov
5dd1f6f144 utimensat(2): Remove description of compatibility code
Commit e0e0323354 removed compat stubs for
kernels that did not have futimens() and utimensat() system calls, but
removed the documentation for them in the manual page only partially.

Remove the rest of the documentation of the compatibility code.

MFC after:	1 week
2022-06-12 22:57:31 +02:00
Dimitry Andric
56f451bb3b Merge llvm-project release/14.x llvmorg-14.0.5-0-gc12386ae247c
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14.0.5-0-gc12386ae247c, aka 14.0.5 release.

PR:		261742
MFC after:	3 days
2022-06-12 20:53:16 +02:00
Bjoern A. Zeeb
0f7b9777f8 rtw88: split driver up into a core and pci part
Split the driver up into two modules (if_rtw88_pci.ko and rtw88_core.ko).
This is in preparation for the hopefully eventually upcoming USB support
using the same driver core.

Note: this changes the module name to load to if_rtw88_pci.ko instead of
if_rtw88.ko.  If using devmatch(8) everything should stay the same as
the driver name (used for net.wlan.devices) stays rtw88.  If using
kld_list in rc.conf or loader.conf you will need to adjust the name.
Update man page for this.

MFC after:	3 days
2022-06-12 18:35:58 +00:00
Dimitry Andric
987d26ee3f Remove yet another incorrect .. level from BSD.usr.dist
Since the spacing was off, it was not clear that it descended one level
too many.

Fixes:		695052e240
MFC after:	3 days
2022-06-12 16:46:17 +02:00
Hans Petter Selasky
f25a0a0f21 uchcom(4): Add new USB ID.
PR:		260783
PR:		264634
MFC after:	1 week
Sponsored by:	NVIDIA Networking
2022-06-12 16:42:03 +02:00
Dimitry Andric
9374e9ebbc Vendor import of llvm-project branch release/14.x llvmorg-14.0.5-0-gc12386ae247c. 2022-06-12 16:03:02 +02:00
Peter Holm
f71b232f31 stress2: Added an explanation to failure mode 2022-06-12 11:52:55 +02:00
Xin LI
1d25053e93 Account for missing `..' in BSD.usr.dist for clang 14.0.3.
MFC after:	3 days
2022-06-11 21:39:00 -07:00
Xin LI
695052e240 Fix mtree for usr/
MFC after:	3 days
2022-06-11 21:38:05 -07:00
Baptiste Daroussin
95db9ef565 rc.d/wpa_supplicant: remove support for NDIS
ndis drivers have been remove long ago (early 2021)
2022-06-11 22:25:21 +02:00
Hans Petter Selasky
9fd0d9b16e ktls: Remove the KERN_TLS option from the i386 and amd64 LINT-NOIP kernel configurations.
Kernel TLS depends on INET or INET6 being enabled.

Reported by:	bz@
MFC after:	1 week
Sponsored by:	NVIDIA Networking
2022-06-11 21:31:28 +02:00
Kirk McKusick
800a53b445 Bug fix to UFS/FFS superblock integrity checks when reading a superblock.
One of the checks was that the cylinder group size (fs_cgsize)
matched that calculated by CGSIZE(). The value calculated by CGSIZE()
has changed over time as the filesystem has evolved. Thus comparing
the value of CGSIZE() of the current generation filesystem may not
match the size as computed by CGSIZE() that was in effect at the
time an older filesystem was created. Therefore the check for
fs_cgsize is changed to simply ensure that it is not larger than
the filesystem blocksize (fs_bsize).

Reported by: Martin Birgmeier
Tested by:   Martin Birgmeier
MFC after:   1 month (with 076002f24d)
PR:          264450
Differential Revision: https://reviews.freebsd.org/D35219
2022-06-11 11:05:14 -07:00
Bjoern A. Zeeb
fb6eaf74e9 LinuxKPI: 802.11: fix compiling with DEBUG
Fix a build with DEBUG after d0d2911035
which lost the __func__, __LINE__ argument in an updated tracing line.

Reported by:	Tomoaki AOKI (junchoon dec.sakura.ne.jp)
MFC after:	2 days
X-MFC with:	d0d2911035
2022-06-11 16:38:00 +00:00
Bjoern A. Zeeb
013e516dc9 LinuxKPI: 802.11: fix iwlwifi fw assert with older chipsets
A problem which showed up on 13.1 between BETA3 and RC1 was that on older
chipsets the fw would crash.  While some 0x18 ADD_STA problems were seen
before, d9f59799fc was the actual trigger for this problem
(in 0x28 MAC_CONTEXT command) in a squashed merge to the releng branch.
Strangely there were no changes to assoc_to_run in that revision so other
circumstances may be the actual cause but swapping the bss_info update and
the sta_state in that function seem to make my 8265 happy while AX200 and
AX210 stay good.

Thanks to everyone who helped debug this.

Sponsored by:	The FreeBSD Foundation (partially)
MFC after:	3 days
2022-06-11 12:49:40 +00:00
Stefan Eßer
78bc019d22 usr.bin/bc: update to version 5.3.1
This version adds support for command line editing and history using
the libedit or readline libraries in addition to the line editing
features available in previous versions.

The version in the base system is configured to use libedit.

This allows to choose between emacs and vi line editing commands and
to use command overrides via a ~/.editrc file.

Merge commit 'bd54318046bfee055b140705a5cfd4148e78da07'

PR:		264010

MFC after:	2 weeks
2022-06-11 13:14:37 +02:00
Stefan Eßer
bd54318046 vendor/bc: import of version 5.3.1
This update does not contain any functional change, but fixes two
minor build issues:

- Temporary files were created in the source directory, causing build
  failures if the sources were not writable at build time.
- A message catalogue contained extra characters that were ignored but
  made gencat print warning messages.
2022-06-11 11:54:23 +02:00
Stefan Eßer
5bdd626528 vendor/bc: import of version 5.3.0
This version adds support for command line editing and history using
the editline or readline libraries in addition to the line editing
features available in previous versions.
2022-06-11 11:50:28 +02:00
Doug Moore
36447829ae rb_tree: drop needless tests from rb_next, rb_prev
In RB_NEXT, when there is no RB_RIGHT node, the search must proceed
through the parent node.

There is code written to handle the case when the parent is non-NULL
and the current element is the left child of that parent. If you
assume that the current element is either the left child of its
parent, or the right child of its parent, but not both, then this test
is not necessary. Instead of assigning RB_PARENT(elm, field) to elm
when elm == RB_LEFT, removing the test has the code assign
RB_PARENT(elm, field) to elm when elm != RB_RIGHT. There's no need to
examine the RB_LEFT field at all.

This change removes that needless RB_LEFT test, and makes a similar
change to the RB_PREV implementation.

Reviewed by:	alc
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D35450
2022-06-10 16:53:16 -05:00
Doug Moore
19bb5a7244 iommu_gas: pass size to iommu_map without rounding
Let the caller to iommu_map pass the size parameter without rounding
it up to a multiple of page size.  Let iommu_map round it up when
necessary, which is not all of the time, so that in some cases less
space is reserved.

Reviewed by:	alc, kib (previous version)
Tested by:	pho, br
Discussed with:	andrew
MFC after:	3 weeks
Differential Revision:	https://reviews.freebsd.org/D35424
2022-06-10 13:56:54 -05:00
Muhammad Moinur Rahman
1d7c4b7d86 Update organization.dot with new CORE.12 members
Approved by:	core (bofh with core-secretary@ hat on)
2022-06-10 12:11:45 -05:00
Bjoern A. Zeeb
d0d2911035 LinuxKPI: 802.11: rework handling of the special IEEE80211_NUM_TIDS queue
Rework the way we are dealing with the last queue.  If the driver
opts in to STA_MMPDU_TXQ then preferably send all non-data frames
via the last (IEEE80211_NUM_TIDS) queue which otherwise is not used
in station mode.
If we do not have that queue we do individual tx() calls for non-data
frames now.
Everything else goes via the selected queue if possible for as long as
we have a ni (sta) and otherwise resorts to direct tx.

Tested on:	Intel AX200 and AX210
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2022-06-10 14:18:57 +00:00
Eugene Grosbein
796d48ec41 ftpd(8): do not refer to now unused libxo(3)
In 2018, the commit r328100 (0fdf7fa846)
removed libxo(3) support from ls(1), so ftpd has no reasons to link
with libxo since then.

ls(1) does not depend on libxo in both of stable/12 and stable/13.

MFC after:	2 weeks
2022-06-10 21:09:20 +07:00
Bjoern A. Zeeb
0e981d79b1 LinuxKPI: move pm_message_t from kernel.h to pm.h
Move pm_message_t from kernel.h to pm.h and remove a private define
in usb.h as well as adjust the implementation in linux_usb.c.
This cleans up what I believe to be a historic shortcut and is
needed for future wireless driver updates.

Leave a note in UPDATING that drm-kmod users need to update to the
latest version before re-compiling a new kernel to avoid errors
(see PR).

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
PR:		264449 (drm-kmod port update, thanks wulf)
Obtained from:	bz_git_iwlwifi (Dec 2020) (partly)
Reviewed by:	hselasky, imp
Differential Revision: https://reviews.freebsd.org/D35276
2022-06-10 14:05:12 +00:00
Baptiste Daroussin
60408c23c9 pci_vendors: udpate to 2022-05-18 2022-06-10 12:55:43 +02:00
Toomas Soome
e50e40684a loader: add support for gzip compression
As we do have zlib code in loader, we should also support gzip
compression in zfs.

PR:		153173
Submitted by:	Mikhail Zakharov <zmey20000@yahoo.com>
Reviewed by:	imp, markj, delphij
Differential Revision: https://reviews.freebsd.org/D35320
MFC after:	1 month
2022-06-09 20:54:30 +03:00
John Baldwin
ca341f3cf5 hwpmc: Permit the minimum sampling count to be set as a sysctl.
A rarely occurring event (e.g. an event that occurs less than 1000
times during execution of a program) may require a lower minimum
threshold than 1000.  Replace the hardcoded 1000 with a sysctl that
the administrator can use to permit smaller sampling count values.

Reviewed by:	mhorne, mav
Sponsored by:	University of Cambridge, Google, Inc.
Differential Revision:	https://reviews.freebsd.org/D35400
2022-06-09 11:05:34 -07:00
John Baldwin
74536fca79 .github: Add a build on Ubuntu 22.04 using llvm 14.
Reviewed by:	uqs
Pull Request:	https://github.com/freebsd/freebsd-src/pull/599
2022-06-09 10:20:03 -07:00
John Baldwin
1c44d2bf86 usr.bin/dtc: Include <limits> for std::numeric_limits<>.
This is needed when building natively as a cross-tool on hosts such as
Linux using more recent versions of libstdc++.

Co-authored-by:	Alexander Richardson <arichardson@FreeBSD.org>
Obtained from:	CheriBSD
2022-06-09 10:20:03 -07:00
John Baldwin
3491ed652e .github: Cross-build aarch64 as well as amd64 kernels.
This required adding an explicit os list to the matrix.

Reviewed by:	uqs
Pull Request:	https://github.com/freebsd/freebsd-src/pull/599
2022-06-09 10:20:03 -07:00
John Baldwin
49335eda0f .github: Update compilers used for cross-build testing.
- Drop clang 9 build, and switch the remaining ubuntu build to
  the more modern clang 12.

- Update the label for the macos-latest builds which are now using
  clang 13 rather than clang 12.

Reviewed by:	uqs
Pull Request:	https://github.com/freebsd/freebsd-src/pull/599
2022-06-09 10:20:02 -07:00
Ed Maste
a7bd57de86 Sort SPLIT_KERNEL_DEBUG correctly in kern.opts.mk
Fixes:		e3709cfe6a ("Add SPLIT_KERNEL_DEBUG knob")
2022-06-09 10:39:52 -04:00
Hans Petter Selasky
bc2e447338 upgt(4): Adjust all pause calls to use milliseconds instead of ticks.
MFC after:	1 week
Sponsored by:	NVIDIA Networking
2022-06-09 15:18:02 +02:00
Hans Petter Selasky
c6c22ebb38 urtw(4): Adjust all pause calls to use milliseconds instead of ticks.
MFC after:	1 week
Sponsored by:	NVIDIA Networking
2022-06-09 15:18:02 +02:00
Vitaliy Gusev
e7d34aeda4 vmm: move bumping VMEXIT_USERSPACE stat to the right place
Statistic for "number of vm exits handled in userspace" should be
increased in vm_run() instead of vmx_run() because in some cases
vm_run() doesn't exit to userspace and keeps entering the guest.

Also svm_run's implementation even wrongly misses that stat.

Reviewed by:	markj
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D35350
2022-06-09 08:57:25 -04:00
Doug Moore
3003117253 iommu_gas: Change find_space lower search order
iommu_gas_lowermatch looks right, then left, then right again in its
search for free space.  Change to a more straightforward last-fit
search that touches fewer tree nodes and improves performance.

Reported by:	wxzhu@rice.edu
Reviewed by:	alc, kib
MFC after:	3 weeks
Differential Revision:	https://reviews.freebsd.org/D35439
2022-06-08 23:14:28 -05:00
Colin Percival
1d2e46d408 EC2: Enable ephemeral swap by default
The latest version of the ec2-scripts package includes a completely
rewritten "use EC2 ephemeral disks for swap space" script.  Now that
we have something which works on recent versions of FreeBSD, turn it
on since it's a great way to use the ephemeral disks.

Note that the option for controlling this, ec2_ephemeral_swap_enable,
is not the same as the option (ec2_ephemeralswap_enable) used with the
previous ephemeral-swap script; this change was deliberate to avoid
astonishment for users who upgraded their ec2-scripts package and had
a setting left behind in rc.conf.
2022-06-08 15:50:30 -07:00
Cy Schubert
a39a5a6905 unbound: Vendor import 1.16.0
Merge commit '5f9f82264b91e041df7cba2406625146e7268ce4' into main

MFC after:	1 month
2022-06-08 15:08:42 -07:00
Michael Tuexen
ee9ee699d6 sctp: remove book keeping not needed anymore
MFC after:	3 days
2022-06-08 23:30:52 +02:00
Ed Maste
330b7dccd8 src.conf.5: regen for SPLIT_KERNEL_DEBUG knob 2022-06-08 17:15:11 -04:00
Ed Maste
e3709cfe6a Add SPLIT_KERNEL_DEBUG knob
Prior to 9b6edf364e WITHOUT_KERNEL_SYMBOLS split kernel debug data
into standalone debug files at build time, but did not install those
files.  As of 9b6edf364e it stopped splitting the debug data, leaving
it in the kernel and modules (the default kernel configs include
DEBUG=-g).

Revert 9b6edf364e and introduce a new build-time SPLIT_KERNEL_DEBUG
knob, as some people rely on the pre-9b6edf364eb0 WITHOUT_KERNEL_SYMBOLS
behaviour and that was imp's original intent.

PR:		264433
Reviewed by:	eugen, imp
MFC after:	3 weeks
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D35437
2022-06-08 17:14:46 -04:00
Michael Tuexen
ad6ae52d1c sctp: cleanup, no functional change
MFC after:	3 days
2022-06-08 22:35:14 +02:00