Commit Graph

296682 Commits

Author SHA1 Message Date
Poul-Henning Kamp d830cac9fe recoverdisk: Fix comparison between stripesize and sectorsize
Discovered trying to read a 360KB floppy disk :-)
2025-01-05 20:16:22 +00:00
Kristof Provost 50c1e179b5 umtx: handle allocation failire in umtx_pi_alloc()
Don't assume that this allocation will succeed. We may have been passed
M_NOWAIT.

The calling code already handles allocation failures, but the function
itself did not.

PR:		283807
MFC after:	1 week
2025-01-05 18:19:56 +01:00
Adrian Chadd 93411b39ff rtwn: calculate control rate for VHT rate frames
If the passed in rate is a VHT rate, use rtwn_ctl_vhtrate() to
find a suitable rate for RTS/CTS.

Differential Revision:	 https://reviews.freebsd.org/D48295
Reviewed by:	bz, cy, emaste
2025-01-05 09:21:53 -08:00
Daniel Schaefer 48b9d78a0a hda: Add patch for Framework Laptop Intel 13th gen
It uses the same audio codec as 12th gen (PCI ID 0x0002).
Actually everything is the same, except the CPU.

Signed-off-by: Daniel Schaefer <dhs@frame.work>
2025-01-05 08:23:04 -05:00
Ed Maste 0f7d8b71b4 Makefile.inc1: Set DISTDIR in stagekernel target
The distributekernel target expects DESTDIR and DISTDIR to be set.  The
stagekernel target invokes `make distributekernel`, and previously left
DISTDIR unset, resulting in a path with a "//" component.  Instead, set
DISTDIR to . to make the way we're (ab)using the distributekernel target
more explicit.

Reviewed by:	bapt
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48288
2025-01-04 19:16:38 -05:00
Michael Tuexen 84e894ce13 TCP RACK: remove variable with is only initialized and not changed
minslot is initialized to 0 and never changed. It is not clear to me
under which condition minslot should be set to which value.
Therefore, remove it and the code checking that it is not zero.
No functional change intended.

Reviewed by:		rrs
CID:			1523812
MFC after:		1 week
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D48321
2025-01-04 21:11:26 +01:00
Michael Tuexen 4bce1a19fc TCP BBR: remove code which is not needed
rc_bbr_substate is a 3-bit unsigned int, so it can't be larger than
or equal to 8. The wrap around already happens.
No functional change intended.

Reviewed by:		rrs
CID:			1523795
MFC after:		1 week
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D48320
2025-01-04 21:08:43 +01:00
Dimitry Andric b662ca1d6c Revert "Export additional __aeabi_ symbols from arm's libgcc_s"
This reverts commit caab831338, because
some new unresolved issues came up in bug 271087:

  Some programs depend on these symbols, when they are compiled for armv6
  or armv7. Closes #1560 (slightly changed due to sorting of the symbols).

PR:		271087
Reported by:	mmel
MFC after:	immediately
2025-01-04 19:12:16 +01:00
Kristof Provost 7d5e02b015 pf: allow ICMP messages related to an SCTP state to pass
Much like we already do for TCP and UDP we should also parse SCTP-in-ICMP
messages to see if they apply to an SCTP connection we've already allowed. If so
we should allow the ICMP packet to pass, even if we'd otherwise block it.

Add a test case where we generate an 'ICMP unreachable - need to frag' packet
and check that it passes through pf.

MFC after:	2 weeks
Sponsored by:	Orange Business Services
Differential Revision:	https://reviews.freebsd.org/D48170
2025-01-04 15:37:41 +01:00
Michael Tuexen 305c40dc55 TCP BBR: simplify expression
There is no need to check partially for bbr->r_ctl.crte being NULL,
since this can't be true in this path.
No functional change intended.

Reviewed by:		rrs
CID:			1523810
MFC after:		1 week
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D48312
2025-01-04 15:25:01 +01:00
Michael Tuexen 41af5eeefc TCP RACK: remove code that cannot be reached
No functional change intended.

Reviewed by:		rrs
CID:			1523797
MFC after:		1 week
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D48301
2025-01-04 15:22:40 +01:00
Bjoern A. Zeeb 95a7aa8009 LinuxKPI: 802.11: implement wiphy_{,un}lock()
This will help us to get minimally better lock coverage in iwlwifi
though not yet against the LinuxKPI implementation which will likely
switch to this in the future.  At least the TODO() logging noise is
out of the way.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2025-01-04 14:00:13 +00:00
Baptiste Daroussin ba5834b8e1 libusb: fix hotplug sigbus
When a hotplug callback has been registered, and the program using
libusb is calling libusb_exit then the thread handler is set to
NO_THREAD which result in the variable controlling the loop the be set
to 0, it does a last pass through device available without having done
a scan, which result in a sigbus after it tried to unregister all the
devices.

directly break the loop instead and cleanup the list of devices

this fixes the tests with LGPLed libusb's hotplugtest program

MFC After:	3 days
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D48298
2025-01-04 11:20:49 +01:00
Gordon Bergling d633a7d121 timeout(1): Add -v/--verbose option to show diagnosis info
The -v/--verbose option enables this utility to show diagnosis
info to stderr about any signal sent on timeout.

This implementation refers to GNU coreutils's timeout(1).

Reviewed by:	bapt, Alexander Ziaee (manpages)
Approved by:	bapt (src)
Obtained from:	DragonFlyBSD
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D48225
2025-01-04 09:52:56 +01:00
Emmanuel Vadot f57db7955a modules: dtb: allwinner: Remove sun8i-h2-plus-orangepi-r1.dts
Remove sun8i-h2-plus-orangepi-r1.dts for now, latest update changed some
/delete-node/ places and this confuse our dtc.
2025-01-04 09:38:50 +01:00
Gordon Bergling 6145586a6c ascii(7): Correct the history section
The man page ascii(7) first appears in the first edition manual.

Reviewed by:	imp, Alexander Ziaee
Obtained from:	OpenBSD
MFC after:	5 days
Differential Revision:	https://reviews.freebsd.org/D48224
2025-01-04 09:25:39 +01:00
Jung-uk Kim 62e841ccce acpica: Import ACPICA 20241212 2025-01-03 17:58:38 -05:00
Jung-uk Kim 1a259ad4ab acpica: Merge ACPICA 20240927 2025-01-03 17:42:12 -05:00
Jung-uk Kim 92f570c32e acpica: Import ACPICA 20240827 2025-01-03 17:41:26 -05:00
Jung-uk Kim 804fe26603 acpica: Import ACPICA 20240321 2025-01-03 17:35:05 -05:00
Gleb Smirnoff e9255dafa1 pf: netlink KPI use cleanup
- use nlf_p_empty instead of declaring own empty array
- don't declare _IN() macro when we don't parse a header

Reviewed by:		kp
Differential Revision:	https://reviews.freebsd.org/D48306
2025-01-03 14:25:10 -08:00
Jung-uk Kim 98a2c01a88 Import ACPICA 20241212 2025-01-03 16:53:44 -05:00
Jung-uk Kim ae8106ed3a Import ACPICA 20240927 2025-01-03 16:51:31 -05:00
Jung-uk Kim e690145f81 Import ACPICA 20240827 2025-01-03 16:49:36 -05:00
Jung-uk Kim b6246dbb66 Import ACPICA 20240321 2025-01-03 16:45:56 -05:00
Michael Tuexen 88766e7af5 TCP BBR: fix integer overflow
Use 64-bit arithmetic.

Reviewed by:		rrs
CID:			1523806
MFC after:		1 week
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D48302
2025-01-03 19:44:43 +01:00
Eric A. Borisch d72f87c0fd tcpdump/print-pflog: Print uid with host endianness
PR:		283799
Reported by:	eborisch@gmail.com
Reviewed by:	jrm, kp
Fixes:		0a7e5f1f02
2025-01-03 13:37:45 -04:00
Andrew Turner b714eacb79 acpi: Pass the correct device to acpi_pcib_osc
Fix a copy-and-paste error in acpi_pcib_request_feature where the
child device was passed into acpi_pcib_osc rather than the pcib
device.

Reviewed by:	garga, jhb
Fixes:	ba1904937d ("acpica: Extract _OSC parsing to a common file")
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D48285
2025-01-03 16:10:41 +00:00
Andrew Turner 143dff0f9c pci: Only claim to support PCI ASPM on x86
We claim to support Active State Power Management, but don't appear to
do anything different in the kernel when it's enabled other than tell
the firmware we do.

This breaks VMware Fusion on Apple Silicon when it's enabled as it
expects the kernel to enable the ports. As it is reported to be needed
on some x86 servers keep it enabled there, but disable on non-x86
architectures.

Reported by:	kp, tuexen
Reviewed by:	tuexen, mav, imp, jhb
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D48303
2025-01-03 16:10:41 +00:00
John Baldwin 0e742cc774 cpu_set_upcall / linux_clone_thread: Remove calls to cpu_thread_clean
This is intended to clean state of a thread at the end of its
lifecycle during wait(), not the beginning of its life cycle.

Reviewed by:	kib
Sponsored by:	AFRL, DARPA
Differential Revision:	https://reviews.freebsd.org/D48023
2025-01-03 11:03:08 -05:00
John Baldwin 9c87cbbcaa cpu_machdep.9: New manpage describing the semantics of several cpu_*
This page is not exhaustive but covers all of the MD interface
functions currently declared in <sys/proc.h>.

Requested by:	kib
Reviewed by:	kib
Sponsored by:	AFRL, DARPA
Differential Revision:	https://reviews.freebsd.org/D48022
2025-01-03 11:02:43 -05:00
John Baldwin ecb5fe3c5e nv.9: Add a new subsection documenting kernel-specific behavior
Reviewed by:	emaste
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D48257
2025-01-03 10:51:51 -05:00
John Baldwin ae1cc4182b nv.9: Editorial pass
Various rewording tweaks and clarifications to some behavior (e.g.
nvlist_size doesn't require calling nvlist_pack first).

Reviewed by:	pjd
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D48256
2025-01-03 10:51:28 -05:00
John Baldwin 826509a3c3 open.2: Editorial pass
- Use a typical tagged list for the open flags instead of a literal
  block.  This permits using markup in the flag descriptions.  Also,
  drop the offset to avoid indenting the entire list.

- Note that O_RESOLVE_BENEATH only applies to openat(2)

- Use a clearer description of O_CLOEXEC (what it means, not the
  internal flag it sets)

- Note that exactly one permission flag is required.

- Split up a paragraph on various flags so that each flag gets its own
  paragraph.  Some flags already had their own paragraph, so this is
  more consistent.  It also makes it clearer which flag a sentence is
  talking about when a flag has more than one sentence.

- Appease some errors from igor and man2ps

- In the discussion about a returned directory descriptor opened with
  O_SEARCH, avoid the use of Fa fd since the descriptor in question is
  a return value and not an argument to open or openat.

- Various and sundry markup and language tweaks

Reviewed by:	kib, emaste
Differential Revision:	https://reviews.freebsd.org/D48253
2025-01-03 10:48:24 -05:00
John Baldwin f586d52599 .cirrus-ci: Update the non-manual GCC build job to GCC 13
Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D48291
2025-01-03 10:44:44 -05:00
John Baldwin 40ed89ffc3 .cirrus: Add manual amd64 and aarch64 jobs using GCC 14
Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D48290
2025-01-03 10:44:33 -05:00
John Baldwin 22956bc9dc pac: Consistently use item count as the first argument to calloc
Reported by:	GCC 14 -Wcalloc-transposed-args
2025-01-03 10:44:27 -05:00
John Baldwin f94513a3a3 pac: Use strdup and asprintf in place of dubious string building
GCC 14 warned about transposed arguments to calloc, but these cases
are better served by more abstract string functions.
2025-01-03 10:44:22 -05:00
Michael Tuexen 4173a3a009 TCP BBR: simplify expression
rsm cannot be NULL, when calling bbr_update_bbr_info().
So no need to check partially for it. No functional change intended.

Reviewed by:		rrs
CID:			1523803
MFC after:		1 week
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D48293
2025-01-03 14:22:25 +01:00
Michael Tuexen deb4252e9e TCP RACK: remove un-needed assignment
No functional change intended.

Reviewed by:		rrs
CID:			1523768
MFC after:		1 week
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D48292
2025-01-03 14:20:19 +01:00
Mark Johnston 526bd072b3 syslogd: Fix resource leaks
- nvlist_append_nvlist_array() makes a copy of the input nvlist, so the
  pattern of nvlist_append_nvlist_array(... cfline(...)) would leak
  memory and descriptors.  Pass the entire config nvlist to cfline()
  instead since this is needed for a future change.
- In parse_action(), free the linked list returned by getaddrinfo().
- Remove some checks at the beginning of close_filed().  For some log
  types we'll always have f->f_file == -1, in which case we wouldn't
  release other resources, such as forwarding sockets.
- After converting a filed to an nvlist, free the filed resources.

Fixes:	2567168dc4 ("syslogd: Refresh configuration using libcasper")
Reviewed by:	jfree
Differential Revision:	https://reviews.freebsd.org/D48250
2025-01-03 01:51:19 +00:00
Mark Johnston 1da99b479a syslogd tests: Permit starting syslogd with multiple -b options 2025-01-03 01:50:59 +00:00
Mark Johnston 3fb2371efd syslogd tests: Use atf_check when sending SIGHUP to syslogd 2025-01-03 01:50:39 +00:00
Adrian Chadd 64ecfc27db rtwn: add forcerate flag to TX descriptor setup
When doing firmware rate control there will be situations where
the rate being passed in needs to actually override the rate
control selection.  So add a flag to the descriptor setup path
to indicate that indeed this particular rate should be forced,
rather than rely on the firmware rate control.

This is currently a no-op as firmware rate control isn't working
in-tree, but it is working for me locally with other changes.
Without this, there's no way to force low rates for management,
DHCP traffic, and to allow fixed rate via "ifconfig wlanX ucastrate Y"
to function.

Locally tested:

* RTL8192CU, STA mode (firmware and driver/net80211 rate control)

Differential Revision:	https://reviews.freebsd.org/D48100
Reviewed by:	bz, gavin
2025-01-02 17:24:01 -08:00
Adrian Chadd 2be951a526 rtwn: enable VHT if it's configured in the device
If the driver attach path adds the VHT flag then add the 20/40/80 MHz
VHT channels.

This is a no-op right now as nothing is enabling it.

Differential Revision:	https://reviews.freebsd.org/D48097
Reviewed by:	bz
2025-01-02 17:18:16 -08:00
John Baldwin 925e1016b1 puc: Use device_delete_children if attach fails
This is slightly simpler than deleting individual devices.

Differential Revision:	https://reviews.freebsd.org/D47974
2025-01-02 13:25:38 -05:00
John Baldwin d174ffca3a mfi: Use bus_generic_detach to simplify deleting children during detach
Differential Revision:	https://reviews.freebsd.org/D47973
2025-01-02 13:25:27 -05:00
John Baldwin 11a9117871 Use bus_generic_detach to detach and delete child devices during detach
This is simpler and more robust than individual calls to
device_delete_child.

Differential Revision:	https://reviews.freebsd.org/D47972
2025-01-02 13:25:12 -05:00
John Baldwin 0ac15e476d spibus: Use bus_generic_* directly instead of wrappers
Differential Revision:	https://reviews.freebsd.org/D47971
2025-01-02 13:25:01 -05:00
John Baldwin aa48c1ae08 etherswitch: Cleanup detach and delete of child devices during detach
Call bus_generic_detach first and return any error.  Remove no longer
needed individual device_delete_child calls.

Differential Revision:	https://reviews.freebsd.org/D47970
2025-01-02 13:24:46 -05:00