1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-24 07:40:52 +00:00
Commit Graph

295564 Commits

Author SHA1 Message Date
Ed Maste
3750ccefb8 Retire MK_PROFILE infrastructure
It was disabled by default in fe52b7f60e.  We planned to (but did not)
remove the option before FreeBSD 14.  Remove it now, for FreeBSD 15.

Relnotes:	Yes
Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31558
2024-11-12 12:11:51 -05:00
Cy Schubert
fc32b5ddf3 ipfilter: Remove dead code
ea3022cbbd converted timeout(9) to callout(9). This code remained as
an artifact of the conversion.

Fixes:		ea3022cbbd
MFC after:	1 week
2024-11-12 08:00:46 -08:00
Zhenlei Huang
f9f470f72c ifnet(9): Document the IFF_PALLMULTI flag
It was introduced by the recent commit [1].

1. 58f194223a ifnet: Add handling for toggling IFF_ALLMULTI in ifhwioctl()

Reviewed by:	markj
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D47511
2024-11-12 22:47:45 +08:00
Konstantin Belousov
166c1fac59 struct proc: add locking annotation for p_pendingcnt
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2024-11-12 08:05:48 +02:00
Jose Luis Duran
1fa6daaafd
ipfilter: Avoid stopping with a lock held
Avoid calling _callout_stop_safe with a non-sleepable lock held when
detaching by initializing callout_init_rw() with CALLOUT_SHAREDLOCK.

It avoids the following WITNESS warning when stopping the service:

    # service ipfilter stop
    calling _callout_stop_safe with the following non-sleepable locks held:
    shared rw ipf filter load/unload mutex (ipf filter load/unload mutex) r = 0 (0xffff0000417c7530) locked @ /usr/src/sys/netpfil/ipfilter/netinet/fil.c:7926
    stack backtrace:
    #0 0xffff00000052d394 at witness_debugger+0x60
    #1 0xffff00000052e620 at witness_warn+0x404
    #2 0xffff0000004d4ffc at _callout_stop_safe+0x8c
    #3 0xffff0000f7236674 at ipfdetach+0x3c
    #4 0xffff0000f723fa4c at ipf_ipf_ioctl+0x788
    #5 0xffff0000f72367e0 at ipfioctl+0x144
    #6 0xffff00000034abd8 at devfs_ioctl+0x100
    #7 0xffff0000005c66a0 at vn_ioctl+0xbc
    #8 0xffff00000034b2cc at devfs_ioctl_f+0x24
    #9 0xffff0000005331ec at kern_ioctl+0x2e0
    #10 0xffff000000532eb4 at sys_ioctl+0x140
    #11 0xffff000000880480 at do_el0_sync+0x604
    #12 0xffff0000008579ac at handle_el0_sync+0x4c

PR:		282478
Suggested by:	markj
Reviewed by:	cy
Approved by:	emaste (mentor)
MFC after:	1 week
2024-11-12 03:46:15 +00:00
Cy Schubert
9da30a23a5 ipfilter: Include the IP address in error message
Include the IP address in the message when a hashnode add error occurs.
This helps to identify the ippool.conf statement that the error occurred.

MFC after:	1 week
2024-11-11 19:22:15 -08:00
Cy Schubert
3a2cb65b6e ipfilter: Support printing of IPv6 addresses in error message
Replace inet_ntoa(3) with inet_ntop(3). This supporting the printing of
IPv6 IP addresses in addition to IPv4 IP addresses in error message.

MFC after:	1 week
2024-11-11 19:21:22 -08:00
Cy Schubert
858a7a27f5 ipfilter: Close a bracket in the poolnode error message
When a node in a tree is discovered in error, i.e. duplicate, the
IP address of the node is printed but no closing bracket completes
the node in the message. Fix this.

MFC after:	1 week
2024-11-11 19:20:49 -08:00
Cy Schubert
8aae4220d7 ipfilter: Print the hash name when adding a hashnode fails
As with when printing errors for failed poolnodes, printing the hash
node (IP address) only leads to speculation which hash pool the failed
add occurred. This is especially useful when the same IP address is
listed in multiple hash pools.

MFC after:	1 week
2024-11-11 19:18:08 -08:00
Cy Schubert
470c680cfb ipfilter: Print the pool name when adding a poolnode fails
Printing the pool node (IP address) only leads to speculation which
pool the failed add occurred. This is especially useful when the same
IP address is listed in multiple pools.

MFC after:	1 week
2024-11-11 19:15:45 -08:00
Cy Schubert
4293571628 ipfilter: Avoid overrunning the message buffer
Avoid overrunning the message buffer when printing an ippool btree error.
We do this in two ways. First we increase the message buffer from 80 to
255 bytes and secondly we replace strcat(3) with strlcat(3).

MFC after:	1 week
2024-11-11 19:14:31 -08:00
Cy Schubert
c607b3258f ntp: Switch to upstream man pages
The downstream (FreeBSD) ntp man pages are out of date. Switch to those
provided by ntp.org (nwtime.org).

PR:			104493
Differential Revision:	https://reviews.freebsd.org/D47319
2024-11-11 19:10:04 -08:00
Mark Johnston
195402c5c5 busdma_bounce: Replace a SYSINIT with static initializations
No functional change intended.

MFC after:	1 week
2024-11-12 01:57:35 +00:00
Mark Johnston
1030ee9128 sleepqueue: Fix the comment for sleepq_switch()
The comment from mi_switch() applies here.

PR:		279708
Fixes:		686bcb5c14 ("schedlock 4/4")
MFC after:	1 week
2024-11-12 01:57:24 +00:00
Lexi Winter
5b62dc782d p9fs.5: rename to p9fs.4
This is a filesystem (driver), not a file format, so it should be in
section 4.

Pull Request:	https://github.com/freebsd/freebsd-src/pull/1520
2024-11-12 01:43:15 +00:00
Artem Hevorhian
65a4daeaf3 ktrace: log execve(2) arguments and environment
Two new events KTR_ARGS and KTR_ENV can be used to
trace arguments of execve(2).

Reviewed by:		glebius
Differential Revision:	https://reviews.freebsd.org/D47127
2024-11-11 13:19:35 -08:00
John Baldwin
4d3b659f24 nvmf: Track SQ flow control
This isn't really needed since the host driver never submits more
commands to a queue than it can hold, but I noticed that the
recently-added SQ head and tail sysctl nodes were not updating.  This
fixes that and also uses these values to assert that there we never
submit a command while a queue pair is full.

Sponsored by:	Chelsio Communications
2024-11-11 11:39:05 -05:00
John Baldwin
3ff90d91b4 nvmf: Schedule requests across multiple I/O queues
Similar to nvme(4), use the current CPU to select which I/O queue to
use.  The assignment in nvmf_attach() had to be moved down since
sc->num_io_queues is initialized in nvmf_establish_connection().

Note that nvmecontrol(8) still defaults to using a single I/O queue
for an association.

Sponsored by:	Chelsio Communications
2024-11-11 11:37:32 -05:00
Ed Maste
9e46943799 inet.4: drop "experimetal use" from net0 and net240 descriptions
The sysctls enable any use of 0/8 and 240/4, not only experimental use.

Reviewed by:	zlei
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D47506
2024-11-11 07:46:58 -05:00
Hajimu UMEMOTO
8eaeaf5c46 usb: Add support for Brainboxes USB-to-Serial adapters
PR:		277482
Reported by:	Cameron Williams
2024-11-11 21:14:05 +09:00
Michal Meloun
248109448f arm: switch the BUSDMA buffers to normal uncached memory
The BUSDMA buffer is treated as normal memory during compilation and compiler
is free to inline/optimize basic functions (i.e. memset, memcpy) accessing
buffers, including when an instruction is generated that performs a word
access to unaligned data. We support this, but only if the buffer in question
is mapped as normal memory (cached or not), but not to memory mapped as
strongly ordered or device type.

MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D47485
2024-11-11 09:22:37 +01:00
Ed Maste
114080d199 usb: fix loop in usb_config_parse
By inspection, index increment was missing.

PR:		281843
Reported by:	Matt Jacobson
Reviewed by:	bz, markj
Fixes: e4611d2626 ("usb(4): Call optional endpoint_uninit() when changing configuration or alternate setting.")
Sponsored by:	The FreeBSD Foundation
2024-11-10 21:53:18 -05:00
Adrian Chadd
37e54466cf net80211: clean up / add more macros to check the frame types
* Add new macros to check the version+type and version+type+subtype of a frame.
* Use these for existing frame checks.
* Convert the flag checks in net80211 to use the macros, rather than direct
  header poking.

Notably I'm callign out things like QOS any versus QOS data, the
kind of NULL frames, etc.  Eg, in the TKIP code it's checking whether
a frame is ANY kind of QOS frame, not just QOS data.

These macros should hopefully make the header checks clearer and less
error prone.  They're also useful in drivers that are doing their
own header parsing.

Locally:

* ath(4), AP, STA, AP+STA modes
* local ath10k/athp - AP, STA modes
* rtwn - STA mode

Differential Revision: https://reviews.freebsd.org/D36615
2024-11-10 17:11:58 -08:00
Alexander Ziaee
8f1a2d507e iwm.4: move hardware list to .Sh HARDWARE and minor cleanup
Add devices supported by this driver to a HARDWARE section
for inclusion in the Release Hardware Compatibility Notes.

While here:
- license: add spdx license identifier tag
- synopsis: join a line for grep/brevity
- description: reflow for consistency, xref iwmfw(4)
- examples: use test-net-1 in cidr notation as example IPv4 address
- see also: add networking(7) quick start guide
- bugs: move 'incompatible modes' here for consistency/flow
- mention 802.11a support

MFC after:	3 days
Reported by:	bz (relnotes generation, cidr, test-net-1 ip4addr)
Reported by:	Graham Percival <gperciva@tarsnap.com> (no prompt)
Reviewed by:	bz
Differential Revision: https://reviews.freebsd.org/D47171
2024-11-10 19:33:18 +00:00
Bjoern A. Zeeb
2483a2d368 release: add wifi-firmware-kmod@release to ship as package
Rather than adding the rtw88 package add the flavored port for all the
supported wireless drivers we recently added support for.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Pointed out by:	cperciva (as part of the set of changes)
Reviewed by:	cperciva (#releng)
Differential Revision: https://reviews.freebsd.org/D47406
2024-11-10 19:00:55 +00:00
Jose Luis Duran
cdd3234186
sound: Include ai2s and davbus for PowerPC
Include PowerPC ai2s and davbus sound modules in the metadriver.

Reviewed by:	christos, emaste
Approved by:	emaste (mentor)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D47467
2024-11-10 02:44:14 +00:00
Konstantin Belousov
9805e5b071 amdiommu: short-circuit all amdiommu_find_unit() functions
for the case where amdiommu is not enabled.  In this case, it does not
matter if IVHD does not describe some device.  Similarly, no unit can be
found for a device, because units are not instantiated, but it does not
matter.

Reported by:	mav
Sponsored by:	Advanced Micro Devices (AMD)
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2024-11-10 00:32:37 +02:00
Bjoern A. Zeeb
edab5a280e LinuxKPI: 802.11: improve lladdr change to not use ifnet internals
The changes from 4aff4048 were based on net80211 which is still using
if_private.h details.  Adjust the code to no longer depend on internal
details of ifnet.  We also switch the "check"-functionn from if_init to
if_transmit which we can query.  Given we do have a per-vif eventhandler
we could do without that check but would still need to check
if_getflags() for IFF_UP.

Sponsored by:	The FreeBSD Foundation
Reported by:	jhibbits
Fixes:		4aff4048
MFC after:	3 days
Reviewed by:	jhibbits
Differential Revision: https://reviews.freebsd.org/D47490
2024-11-09 21:45:14 +00:00
Konstantin Belousov
1bca58a1d4 amdiommu: hide HPET report under verbose
Reported by:	markj
Sponsored by:	Advanced Micro Devices (AMD)
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2024-11-09 23:07:41 +02:00
Mark Johnston
f7c45c0122 nvmecontrol tests: Fix nvmecontrol usage in a couple of tests
nvmecontrol {admin,io}-passthru's -r option doesn't take an argument,
so the tests which added one failed because they tried to open /dev/0.

MFC after:	1 week
2024-11-09 20:04:04 +00:00
Doug Moore
f3895e983c vm_radix: Add iter lookup_le interface
Add a function to the vm_radix interface to lookup the greatest page
less than or equal to some given page.

Reviewed by:	alc
Differential Revision:	https://reviews.freebsd.org/D47046
2024-11-09 13:32:58 -06:00
Mark Johnston
f08746a7e3 nvme: Pass malloc flags to request allocation functions
There are some contexts where it is safe to sleep, so we should pass
M_WAITOK to ensure that a null pointer dereference can't happen.

A few places allocate with M_NOWAIT but have no way to signal an error.
Flag those with an XXX comment.

PR:		276770
Reviewed by:	imp
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D47307
2024-11-09 17:34:12 +00:00
Konstantin Belousov
62e6ca0f07 ps(1): clean up after swapout removal
The process flag P_INMEM is always set.  Eliminate all checks for the
bit.  Also eliminate LAZY_PS define and code covered by it: we  do not
have an u-area for long time, and it cannot be swapped out.

Also eliminate setting controlled by the '-f' switch, but accept it for
backward compatibility.

The 'W' process secondary state (swapped out) is impossible, stop
calculating it.

Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D47492
2024-11-09 19:22:42 +02:00
Konstantin Belousov
14b3a4564a sys/proc.h: add comments to the flag2 bits
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D47492
2024-11-09 19:22:36 +02:00
Konstantin Belousov
4c367bc90b ps.1: document rest of flag2 bits
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D47492
2024-11-09 19:22:29 +02:00
Konstantin Belousov
cd9e781e76 ps.1: visually align process flags hex values by filling leading zeroes
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D47492
2024-11-09 19:22:22 +02:00
Michal Meloun
0283eebb4a arm: remove accidentally added -Map switch to linker
Fixes: ba045ba49d
2024-11-09 08:31:14 +01:00
Michal Meloun
ba045ba49d arm: Improve the creation of kernel.bin
Instead of relinking the kernel without elf headers, replace them with
a binary blob of the same length starting with a jump to the kernel's start
address. This ensures that all symbols stay at the same offsets as in
the original kernel, so kernel.debug remains valid also for kernel.bin.

Also ensure that the awk script used runs with  the neutral locale defined.
Awk 'write' is a locale compilant, and  script is used to write binary data
to a file, so it needs to ensure that  bytes > 127 are written unchanged.

While I'm on, set the neutral locale also for arm64, where the same script is
used to generate the kernel booti image.

Reviewed by:   emaste, imp
Differential Revision:  https://reviews.freebsd.org/D47488
2024-11-09 08:15:23 +01:00
Austin Shafer
bab5e3d468 ig4(4): Add Meteor Lake PCI IDs
PR:		282389
MFC after:	3 days
2024-11-09 08:11:09 +03:00
Vladimir Kondratyev
018cb11cb7 iichid(4): Do not power down opened device in attach handler
Some iichid(4) child devices, currently hkbd(4) only, opens parent
device in their attach handlers. That breaks internal iichid(4) state
leading to rejecting any incoming data on software and hardware levels.

Fix it with adding of extra state check in iichid(4) attach handler.

Reported by:	many
Submitted by:	trasz (initial version)
PR:		280290
MFC after:	3 days
2024-11-09 08:11:09 +03:00
Simon J. Gerraty
f239981ed5 proc_rwmem check PRIV_PROC_MEM_WRITE when writing
This will fail when mac_veriexec is enforced.

Move the check from procfs_doprocmem to proc_rwmem to ensure all
cases are covered.

Reviewed by:	olce, markj
Sponsored by:	Juniper Networks, Inc.
Differential Revision:	https://reviews.freebsd.org/D47484
2024-11-08 16:11:33 -08:00
Andrew Gallatin
fd67ff5c7a Use the correct idle routine on recent AMD EPYC servers
We have been incorrectly choosing the "hlt" idle method on modern AMD
EPYC servers for C1 idle. This is because AMD also uses the Functional
Fixed Hardware interface. Due to not parsing the table properly for
AMD, and due to a weird quirk where the mwait latency for C1 is
mis-interpreted as the latency for hlt, we wind up choosing hlt for
c1, which has a far higher wake up latency (similar to IO) of roughly
400us on my test system (AMD 7502P).

This patch fixes this by:

- Looking for AMD in addition to Intel in the FFH
 (Note the vendor id of "2" for AMD is not publically documented, but
 AMD has confirmed they are using "2" and has promised to document it.)

- Using mwait on AMD when specified in the table, and when CPUid says
 its supported

- Fixing a weird issue where we copy the contents of cx_ptr for C1 and
 when moving to C2, we do not reinitialize cx_ptr. This leads to
 mwait being selected, and ignoring the specified i/o halt method
 unless we clear mwait before looking at the table for C2.

Differential Revision: https://reviews.freebsd.org/D47444
Reviewed by: dab, kib, vangyzen
Sponsored by: Netflix
2024-11-08 17:10:44 -05:00
Bjoern A. Zeeb
1eb3f15c14 fwget: add -q for quiet output
Introduce -q to quieten other output (unless -v is also given).

pkg-install(8) currently has no option to allow skipping unavail
packages but it will just fail.
We would realy want to try to install as much firmware found as
possible from the installer.
Work around this by doing one firmware package at a time.
For that it is highly helpful to be able to query (or possibly re-query)
all outstanding fimrware packages.
-q together with -n only shows each package to be installed one by line.

Once https://github.com/freebsd/pkg/issues/2195 will be implemented
we could undo this part of the change and future changes to the installer
and use the new option for pkg-install(8) there.

While here switch to getopts so -qn works and not just -q -n.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D47445
2024-11-08 18:13:54 +00:00
Bjoern A. Zeeb
52f8e99e7e iwlwifi: script to extract firmware details
When having to find a firmware image with a lower version number
we must only break the inner but not also the outer loop so we
keep looking at any possibly remaining firmware details.

While here also try to find a version from max..1 and not from 1..max.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2024-11-08 18:09:37 +00:00
Dimitry Andric
d686ce931c Merge llvm-project release/19.x llvmorg-19.1.3-0-gab51eccf88f5
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project release/19.x llvmorg-19.1.3-0-gab51eccf88f5,
a.k.a. 19.1.3 release.

PR:		280562
MFC after:	1 month
2024-11-08 17:45:31 +01:00
Adrian Chadd
8838f3c32a rtwn: ensure TX work isn't scheduled during reset / abort
Don't schedule work during reset / abort.  For USB NICs, work
must not be scheduled during a call to rtwn_usb_abort_xfers(),
as then it'll cause the call to usbd_transfer_drain() to hang.

This fixes a hang I've been seeing where the NIC hits a TX timeout
and then the reset/re-init path is called.  If data is scheduled
to be transmitted in that window, the call to usbd_transfer_drain()
would hang and require a hard reboot to recover.

Differential Revision: https://reviews.freebsd.org/D47479
2024-11-08 08:26:05 -08:00
Mark Johnston
21d7ac8c79 inpcb: Remove some unused parameters in internal hash lookup functions
in_pcblookup_hash_wild_* looks up unconnected inpcbs, so there is no
point in passing the foreign address and port, and indeed those
parameters are not used.  So, remove them.

No functional change intended.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Sponsored by:	Stormshield
Differential Revision:	https://reviews.freebsd.org/D47385
2024-11-08 14:25:19 +00:00
Doug Rabson
d03c82c28d release: add optional OCI images
This adds three OCI archive format files to the release containing
FreeBSD base images suitable for static linked, dynamic linked and shell
workloads. The shell image also contains pkg-bootstrap and can be easily
extended by installing packages (including pkgbase packages).

Reviewed by: dch, cpersiva, jlduran, zlei
Differential Revision: https://reviews.freebsd.org/D46759
MFC after: 2 days
2024-11-08 13:23:08 +00:00
Warner Losh
f11b6ce4a3 da: Add quirk for ADATA USB Drive
ADATA USB Drive lies about the RC16, so add a quirk to ignore it.

MFC After: 3 days
PR: 188999
Sponsored by:		Netflix
2024-11-07 17:40:05 -07:00
Warner Losh
d2434697bc loader.kboot: Build on amd64
But comment out FDT stuff for amd64 built inside kboot. This also
restricts a bit the powerpc platforms we build on to powerpc64.

Sponsored by:		Netflix
2024-11-07 16:23:26 -07:00