Commit Graph

278135 Commits

Author SHA1 Message Date
Mateusz Guzik
3e0b486886 vfs: flip a condition around in kern_statat
error tends to be 0.
2022-09-07 20:06:24 +00:00
Neel Chauhan
c4e591c9ab snd_hda: Remove duplicate erroneous HDA_INTEL_ALLKPS line
MFC after:		3 days
Differential Revision:	https://reviews.freebsd.org/D36483
2022-09-07 11:17:26 -07:00
Ed Maste
612f254c82 Cirrus-CI: move QEMU pkg installation to test script
Occasionally the QEMU package fails to build and isn't available on
-CURRENT using the Latest package set.  Move the package installation
to the test script, so that if the package isn't available we at least
still perform a build test.

Sponsored by:	The FreeBSD Foundation
2022-09-07 13:32:12 -04:00
Neel Chauhan
22ecfc580b snd_hda: Add the full Intel AlderLake HD Audio PCI IDs
This is based off the Linux file sound/hda/intel-dsp-config.c.

Reviewed by:		imp (src)
Tested on:		HP Spectre x360 16-f0023dx
MFC after:		3 days
Differential Revision:	https://reviews.freebsd.org/D36476
2022-09-07 09:03:56 -07:00
Wei Hu
0af5a0cd27 Hyper-V: storvsc: relax a kassert check
On ARM64 this kassert check could cause unnecessary panic.

Sponsored by:	Microsoft
2022-09-07 15:06:54 +00:00
Gordon Bergling
dfd3777085 net80211(4): Bring back an accidently reverted grammar correction
- s/that that/that/

Reported by:	se, danfe
MFC after:	3 days
2022-09-07 13:35:45 +02:00
Gordon Bergling
d78a907665 net80211(4): Correct a grammar mistake in a source code comment
- s/the/be the/
- s/Mhz/MHz/
- s/it'll/it will/

Reported by:	bz, danfe
MFC after:	3 days
2022-09-07 13:13:54 +02:00
Mateusz Guzik
14c9a2dbfb net: retire PFIL_FWD
It is now unused and not having it allows further clean ups.

Reviewed by:	cy, glebius, kp
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D36452
2022-09-07 10:04:31 +00:00
Mateusz Guzik
223a73a1c4 net: remove stale altq_input reference
Code setting it was removed in:
commit 325fab802e
Author: Eric van Gyzen <vangyzen@FreeBSD.org>
Date:   Tue Dec 4 23:46:43 2018 +0000

    altq: remove ALTQ3_COMPAT code

Reviewed by:	glebius, kp
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D36471
2022-09-07 10:03:12 +00:00
Emmanuel Vadot
653c36179d vmm: Remove unneeded variable maxcpus
Reported by:	FreeBSD User <freebsd@walstatt-de.de>
Fixes:	a5a918b7a9 ("vmm: permit some IPIs to be handled by userspace")
2022-09-07 11:41:16 +02:00
Albert Jakieła
06c30b2c76 mvneta: Use clkgen API on armv7
With addition of clkgen devices to the Armada38x we no longer
need to rely on get_tclk() to get the device frequency.
Leave it as a fallback, just in case.

Reviewed by:	manu
Obtained from:	Semihalf
Differential Revision: https://reviews.freebsd.org/D36465
2022-09-07 09:44:59 +02:00
Albert Jakieła
59c2babcab mv_twsi: Use the clock API on armv7
With the addition of clkgen devices to the Armada38x, there is
no longer any need to use the get_tclk() hack.

Reviewed by:	manu
Obtained from:	Semihalf
Differential Revision: https://reviews.freebsd.org/D36456
2022-09-07 09:44:59 +02:00
Albert Jakieła
4a4c6dc9a3 Add ARMADA38X gateclk control
This patch introduces basic gate control driver for Armada38x SoC.
Each gate controls coreclk output to a given peripheral.

Reviewed by:	manu
Obtained from:	Semihalf
Differential Revision: https://reviews.freebsd.org/D36455
2022-09-07 09:44:58 +02:00
Albert Jakieła
07c5be33f1 Add ARMADA38X clkgen driver
This patch introduces clkgen driver for Armada38x SoCs.
Clock topology consists of single coreclk which supplies
clock signal to CPU cores and peripherials.

Reviewed by:	manu
Obtained from:	Semihalf
Differential Revision: https://reviews.freebsd.org/D36453
2022-09-07 09:44:58 +02:00
Mateusz Kozyra
299b6c9cb1 uart_bus_acpi: Read clock frequency from bus
It is stored in the clock-frequency property.
In case of failure, fallback to the harcoded value stored in the
compat data.
Also, while here improve style.
Tested on LS1046ARDB and x86 PC.

Reviewed by:	mw
Obtained from:	Semihalf
Differential Revision: https://reviews.freebsd.org/D36326
2022-09-07 09:44:58 +02:00
Corvin Köhne
a5a918b7a9 vmm: permit some IPIs to be handled by userspace
Add VM_EXITCODE_IPI to permit returning unhandled IPIs to userland.
INIT and Startup IPIs are now returned to userland. Due to backward
compatibility reasons, a new capability is added for enabling
VM_EXITCODE_IPI.

MFC after:              2 weeks
Differential Revision:  https://reviews.freebsd.org/D35623
Sponsored by:           Beckhoff Automation GmbH & Co. KG
2022-09-07 09:07:03 +02:00
Corvin Köhne
9cc9abf409 bhyve: create all vcpus on startup
vcpus could be restarted by the guest by sending an INIT SIPI SIPI
sequence to a vcpu. That's not supported by bhyve yet but it will be
supported in a future commit. So, create the vcpu threads only once on
startup to make restarting a vcpu easier.

MFC after:		2 weeks
Differential Revision:	https://reviews.freebsd.org/D35621
Sponsored by:		Beckhoff Automation GmbH & Co. KG
2022-09-07 09:05:36 +02:00
Xin LI
4385a9f851 Fix build.
Pointy hat to:	delphij
MFC after:	2 weeks
X-MFC-with:	c65e42dbde
2022-09-06 23:41:10 -07:00
Xin LI
bced4d8b3e MFV: cherry-pick "PR/358: Fix width for -f - (jpalus)"
MFC after:	1 week
PR:		bin/266264
2022-09-06 23:31:20 -07:00
Christos Zoulas
5457a3f258 PR/358: Fix width for -f - (jpalus)
(cherry picked from commit 19bf47777d0002ee884467e45e6ace702e40a4c1)
2022-09-06 23:30:33 -07:00
Xin LI
c65e42dbde libc: add test case for qsort_b(3)
Reviewed by: 	markj
MFC after:	2 weeks
Differential Revision: https://reviews.freebsd.org/D36463
2022-09-06 23:11:46 -07:00
Gleb Smirnoff
aa74cc6d6f divert(4): do not depend on ipfw(4)
Although originally socket was intended to use with ipfw(4) only, now
it also can be used with pf(4).  On a kernel without packet filters,
it still can be used to inject traffic.
2022-09-06 20:54:57 -07:00
Gleb Smirnoff
999c9fd733 divert(4): don't check for CSUM_SCTP without INET
This compiles, but actually is a dead code.

Noticed by:	bz
Fixes:		e72c522858
2022-09-06 20:54:57 -07:00
Gleb Smirnoff
322b5b7c16 tests: partial revert of 4627bc1e90
Python's socketmodule isn't able to construct sockaddr when it doesn't
recognize the address family.  Until this is solved in python let the
tests use the compatibility way to create divert(4) socket.
2022-09-06 20:54:49 -07:00
Cy Schubert
1f7a710ab3 ipfilter: Remove unused ioctl
The SIOCSTAT1 ioctl is only used in ip_auth and is unused in ip_state.
The ip_state version was likely added to support a new statistic yet
to be developed in ipfstat(8) or for some sample userspace application
(similar in fashion to the sample provided for authentication rules).
There is no need to report individual state hash table bucket lengths
to any future userspace application.

If needed for any future debugging purposes a DTrace probe would be a
better vehicle.

This unused ioctl in ip_stat results in a panic.

PR:		266124
Reported by:	Robert Morris <rtm@lcs.mit.edu>
MFC after:	3 days
2022-09-06 19:57:05 -07:00
Cy Schubert
3e81ef62f9 ipfilter: Remove IPL_SELECT
IPL_SELECT was used for HP-UX >= 11.11 only. Remove this de trop code.

MFC after:	3 days
2022-09-06 19:56:35 -07:00
Alexander Motin
0586be48a9 CTL: Validate IOCTL parameters.
It was possible to cause kernel panic by passing too large args_len
or non-NULL result_nvl.

Though since the /dev/cam/ctl device is accessible only by root and
used only by limited number of tools it was not a big problem.

PR:	266115
PR:	266136
Reported by:	Robert Morris <rtm@lcs.mit.edu>
MFC after:	1 week
2022-09-06 21:58:27 -04:00
Warner Losh
0fddee6d1f arm64: machdep.c fix two typos
Sponsored by:		Netflix
2022-09-06 18:09:43 -06:00
Kirk McKusick
2567b60f62 Fix for f4fc389.
Need to check for NULL pointer before using.

Reported by:  Peter Holm
Sponsored by: The FreeBSD Foundation
2022-09-06 16:22:03 -07:00
Kirk McKusick
2ddf8cdbe0 Clarify error messages about bad inodes.
When something was found wrong with an inode the error message
was always "UNKNOWN FILE TYPE". This error is now used only when
the file type field is wrong. Other errors have their own messages:
"BAD FILE SIZE", "NEGATIVE FILE SIZE", "BAD SPECIAL-FILE RDEV",
"INVALID DIRECT BLOCK", and "INVALID INDIRECT BLOCK".

More complete information about the inode is also provided.

Sponsored by: The FreeBSD Foundation
2022-09-06 16:17:11 -07:00
Andrew Turner
d49ad20625 Import the updated Arm Optimized Routines
The main changes this brings in are:
 - Improves the performance of memcmp
 - Adds SVE implementation of memcpy
 - Uses the MTE version of some str* functions as they are faster

Sponsored by:   The FreeBSD Foundation
2022-09-06 17:20:29 +01:00
Konstantin Belousov
85c8c0b77d loader.efi(8): document slop control, amd64 nocopy, and amd64 fault commands
Reviewed by:	imp
Discussed with:	gbe (man pages)
English wording help by:	rpokala
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Differential revision:	https://reviews.freebsd.org/D36435
2022-09-06 18:55:45 +03:00
Andrew Turner
a8fac0ce78 Decode the arm64 ID_AA64ISAR1_EL1 register
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D35627
2022-09-06 16:49:36 +01:00
Mateusz Guzik
69ce6ae21a pf: make pfsync_state_import appease an assert in pf_free_state
The newly created state failed to be inserted anywhere. This follows
other places.

Reviewed by:	kp
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2022-09-06 15:00:46 +00:00
Bjoern A. Zeeb
ac606903a8 ifconfig: print interface name on SIOCIFCREATE2 error
We have repeatedly gotten reports of unclassified SIOCIFCREATE2 errors
(usually "Device not configured").  This can happen if there is
configuration for interfaces in rc.conf which do not (yet) exist and
we try to configure.  I can, e.g., provoke this by configuring wlan
interfaces with their physical interface not installed.
In order to cut support (guesswork) down print the name of the
interface to be configured with the error message.
Hopefully this will help us in the future to improve other configuration
or driver problems.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2022-09-06 13:09:39 +00:00
Andrew Turner
7c4cfece6b Fix the IV length in the armv8 AES GCM code
Reviewed by:	cem, delphij
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D36403
2022-09-06 13:11:04 +01:00
Hans Petter Selasky
0e391a3197 ktls: Add missing NULL pointer check for TLS RX hardware offload.
The send tag pointer may be NULL when the ktls_reset_receive_tag()
function is invoked. Add check for this.

Reviewed by:	gallatin @
Sponsored by:	NVIDIA Networking
2022-09-06 13:49:23 +02:00
Michael Gmelin
2b3543dbb1 stand: Parse all arguments passed by UEFI
Approved by:	imp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D36457
2022-09-06 13:39:08 +02:00
Kristof Provost
cfa1a13087 pfctl: fix recrusive printing of ethernet anchors
Similar to the preceding fix for layer three rules, ensure that we
recursively list wildcard anchors for ethernet rules.

MFC after:	3 weeks
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D36417
2022-09-06 13:19:10 +02:00
Kristof Provost
585a5ed0be pfctl: fix recrusive printing of anchors
Fix a couple of problems with printing of anchors, in particular recursive
printing, both of inline anchors and when requested explicitly with a '*'
in the anchor.
- Correct recursive printing of wildcard anchors (recurse into child anchors
rather than rules, which don't exist)
- Print multi-part anchor paths correctly (pr6065)
- Fix comments and prevent users from specifying multi-component names for
inline anchors.

tested by phessler
ok henning

Also fix the relevant pfctl test case to reflect the new (and now
correct) behaviour).

MFC after:	3 weeks
Obtained from:	OpenBSD (mcbride, f9a568a27c740528301ca3419316c85a9fc7f1de)
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D36416
2022-09-06 10:42:10 +02:00
Kristof Provost
ed5eb77e18 pfctl: fix printing anchors
Ensure that we pass the (base) anchorname to the kernel, not the '/*'
suffix.

MFC after:	3 weeks
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D36415
2022-09-06 10:42:09 +02:00
Kristof Provost
d5a0bf4517 pf tests: test wildcard anchors
Ensure that a wildcard anchor actually includes any nested anchors (i.e.
foo/* will call into foo/bar).

MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D36414
2022-09-06 10:42:09 +02:00
Baptiste Daroussin
b323fa85f1 openssl: install pc files
most programs in ports are looking for .pc files in order to get the
necessary information on how to compile and link against openssl.

The ports now also has a way to hide or force a path for pkgconf.

Providing .pc files along with openssl in base will allow (once all
the supported version of FreeBSD has it) so improve the framework to
deal with openssl in base vs openssl in ports (and libressl)

This will also greatly reduce the number of patches necessary to
workaround the build systems which only knows how to detect where
openssl is installed via pkgconf.

PR:		266051
MFC After:	3 weeks
Reviewed by:	jkim, delphij
Exp-run by:	antoine
Differential Revision:	https://reviews.freebsd.org/D36360
2022-09-06 09:32:02 +02:00
Corvin Köhne
203f2c14c4 init: fix shutdown race
When calling shutdown, shutdown sends a signal to init and exits. This
causes a race condition for the waitpid function. If the signal wins the
race, wpid will be set to -1 and init calls death_single. If shutdown
wins the race, wpid will be set to the pid of the shutdown process and
the requested_transition will be ignored.

Reviewed by:		imp
Differential Revision:	https://reviews.freebsd.org/D36356
MFC after:		1 week
Sponsored by:		Beckhoff Automation GmbH & Co. KG
2022-09-06 09:06:51 +02:00
Xin LI
95270f73ba MFV: less v608
Relnotes:	yes
MFC after:	2 weeks
2022-09-05 22:52:39 -07:00
Ed Maste
dda082e009 qat: make function definition match prototype
LacSymCb_CallbacksRegister declared with a (void) argument list but was
defined with ().  With Clang 15 this produced a warning.

MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2022-09-05 21:24:58 -04:00
Xin LI
2b6624fffa Vendor import of less v608. 2022-09-05 16:57:47 -07:00
Bjoern A. Zeeb
e3a0b1202b LinuxKPI: 80211 / iwlwifi: improve queue management
For one initialise vif->hw_queues later set in lkpi_80211_txq_tx_one()
for drivers using them.  This may still need slightly more cleanup once
we get QUEUE_CONTROL-supporting drivers into the tree.

For the other rework and improve how we deal with tid/ac/txq in
lkpi_80211_txq_tx_one() and cleanup old comments and unused code.
This seems to reduce (remove) "Invalid TXQ id" reports from iwlwifi.
(The assumption is that the frame(s) triggering this WARN_ONCE or the
added FreeBSD specific logging were sent with lkpi_80211_mo_tx()).

Adjust the one logging from e674ddec0b
to IWL_DEBUG_TX so that now this is fixed it is also not always logged
anymore but leave it in case we need to further debug queues in the
future.

Tested by:	pstef, Kevin Oberman (rkoberman gmail.com)
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2022-09-05 21:03:03 +00:00
Bjoern A. Zeeb
ec190d9150 LinuxKPI: 80211: improve linuxkpi_ieee80211_get_tid()
Continue what was started in 26a3694833
in iwlwifi and extend out internal implementation of
linuxkpi_ieee80211_get_tid() by an argument as to whether "no-QoS"
answers are acceptable.  For the LinuxKPI ieee80211_get_tid() set
this to false as the Linux derived drivers seem to do extra checks
for the QoS-Data frame before acquiring the tid.
Add KASSERTs to enforce the extra argument.
This allows us to use the net80211 variant in LinuxKPI for other
means explicitly documenting that we do accept a IEEE80211_NONQOS_TID.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2022-09-05 20:57:17 +00:00
Kirk McKusick
4b4cc78a76 Formatting cleanups and debugging fix.
Sponsored by: The FreeBSD Foundation
2022-09-05 12:07:48 -07:00