Commit Graph

307170 Commits

Author SHA1 Message Date
Ed Maste b4305c90a3 lesspipe: Allow zstd to operate on a symlink
By default zstd refuses to operate on symlinks, so for example
`zless /var/crash/vmcore.last.zst` failed to view the uncompressed core
file.  Add -f to the zstd command line to allow operation on symlinks.

Reviewed by:	delphij
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55101
2026-02-23 13:57:58 -05:00
Abdelkader Boudih 16822dac32 acpi_panasonic: Clear wireless RF_KILL on boot and resume
On Panasonic FZ-Y1 and similar models, the EC latches RF_KILL on
shutdown and suspend when battery is at certain level, causing wireless
to boot with hard block.

Call WLSW.SHRF during attach and resume to clear the block.

Tested on Panasonic FZ-Y1 with Intel Wireless 7265.

Reviewed by:	adrian, obiwac
Approved by:	adrian, obiwac
Differential Revision:	https://reviews.freebsd.org/D55265
2026-02-23 17:11:23 +01:00
Yusuf Yaman 477ab96044 Add records about new ports committer (nxjoseph)
Update Mentor and Mentee Information to follow step
5 of the Committers Guide.

Reviewed by:	osa, vvd (mentors)
Approved by:    osa (mentor)
Differential Revision:	https://reviews.freebsd.org/D55457
2026-02-23 19:04:02 +03:00
Quentin Thébault 06b466526a virtual_oss: use hw.snd.default_unit by default
Reviewed by:	christos
MFC after:	1 week
Signed-off-by: 	Quentin Thébault <quentin.thebault@defenso.fr>
Sponsored by: 	Defenso
PR:		293130
Pull Request:	https://github.com/freebsd/freebsd-src/pull/2043
2026-02-23 13:33:33 +01:00
Brooks Davis 0076f6d1ad sys/_offsetof.h: pacify GCC 12's macro redefinition check
GCC 12 has a strict definition of identity (all characters including
whitespace must be identical) when comparing "redefined" macros. Make
our definition exactly match the stddef.h that comes with GCC to fix
test-includes of netlink/netlink_snl.h.  (Note: later versions of GCC
are a bit more flexible and don't have this problem.)

Reported by:	des
Sponsored by:	DARPA, AFRL
Fixes:		2adc3f0db1 ("stddef.h: centralize definition of offsetof()")
2026-02-23 10:05:06 +00:00
Artem Bunichev ab835b3707 debug.sh: Fix a typo
MFC after:		3 days
Reviewed by:		emaste, guest-seuros, sjg, ziaee
Differential Revision:	https://reviews.freebsd.org/D55416
2026-02-23 03:31:34 -05:00
Alexander Ziaee 9a20515bc9 sh.1: Add .sh_history and .shrc to FILES
MFC after:		3 days
Reviewed by:		bapt (previous), jilles, tembun@bk.ru
Differential Revision:	https://reviews.freebsd.org/D55295
2026-02-23 03:18:23 -05:00
Michal Meloun d2dea8b46a arm: Add EARLY_PRINTF for ns8250 on arm/aarch64 platforms.
Reviewed  by:	adrian (previous version)
MFC after:	3 weeks
2026-02-22 22:13:33 +01:00
Konstantin Belousov dfcd04c4c8 net/if_vlan.c: do not leak vlan sx slock in vlan_clone_dump_nl()
Reported by:	pho
Reviewed by:	markj
Fixes:	d4062b9f16
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Differential revision:	https://reviews.freebsd.org/D55447
2026-02-22 22:52:04 +02:00
Alexander Ziaee 6d15e0efa0 ttys: Correct comment about required statuses
The status field also accepts onifconsole and onifexists,
so it looks crusty saying that it only accepts on and off.

Reviewed by:	imp
Closes:		https://github.com/freebsd/freebsd-src/pull/2042
2026-02-22 14:51:07 -05:00
Alexander Ziaee 0a492eb9c6 ttys: Align comment whitespace and wrapping
This doesn't lengthen or shorten any configuration,
only comments, so merging the configuration will be safe.

Reviewed by:	imp
Closes:		https://github.com/freebsd/freebsd-src/pull/2042
2026-02-22 14:50:43 -05:00
Mark Johnston eaeb356ce3 buf: Relax an assertion in BUF_UNLOCK
The BUF_UNLOCK macro asserts that B_REMFREE is not set, as it is up to
the lock owner to complete the dequeue from the free list before
releasing the lock.  However, if the thread has acquired the lock
multiple times, then releasing the recursive lock should be ok.  Modify
the assertion to reflect this.

This was triggered by an out-of-tree filesystem.

Reviewed by:	kib
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D55418
2026-02-22 19:26:17 +00:00
Christos Longros acbf7498f5 rge: log silicon revision during attach
The initial import from OpenBSD contained chip revision printf() calls
commented out, as OpenBSD's bare printf() style does not translate to
FreeBSD's device_printf() idiom. The result is that users cannot
distinguish RTL8125 from RTL8125B, RTL8125D_1, RTL8125D_2 etc. via
dmesg alone, even though all variants show as '<RTL8125>' from the PCI
probe string.

Add proper device_printf() calls including the raw hwrev value,
consistent with how re(4) reports chip revisions.

Signed-off-by: Christos Longros <chris.longros@gmail.com>

Reviewed by:	zlei, imp, adrian
Differential Revision:	https://reviews.freebsd.org/D55402
2026-02-22 10:07:37 -08:00
John d1947d0a1a rge: correctly free busdma memory / zero things out only if allocated
* Only free busdma memory that was allocated
* Don't free tx/rx rings until their buffers have also been freed

PR:	kern/293307

Reviewed by:	zlei
Differential Revision:	https://reviews.freebsd.org/D55420
2026-02-22 10:07:34 -08:00
John d5ca52182e rge: fix callout setup/teardown; handle invalid ethernet address
* Do the callout init early; since some of the teardown path expects
  the callout to be valid

* Handle an invalid ethernet address by generating a local one.

PR:	kern/293307

Reviewed by:	zlei
Differential Revision:	https://reviews.freebsd.org/D55419
2026-02-22 10:07:29 -08:00
Michal Meloun dc9a7b15b7 HYM8563: Add HYM563 RTC driver to common config.
MFC after:	3 weeks
2026-02-22 18:53:28 +01:00
Michal Meloun 9de43130f9 regulator_fixed: add support for 'gpios' property
This is a newer version of the "gpio" property.

MFC after:	3 weeks
2026-02-22 18:53:28 +01:00
Michal Meloun 92c66dc5f8 pci_dw: improve pci_dw
Add support for 64-bit ranges.
Process 'bus-range' property.
Add some debug prints.

MFC after:	3 weeks
2026-02-22 18:53:27 +01:00
Michal Meloun f40ed4881e fdt,simple_mfd: Map memory as shareable.
It may be submapped in child drivers.

MFC after:	3 weeks
2026-02-22 18:53:27 +01:00
Michal Meloun 67fc0ff33d dtb: generate .DTB for some RK3588 based boards.
MFC after:	3 weeks
2026-02-22 18:53:27 +01:00
Michal Meloun 2ade720806 TCA64xx: Convert mutex to SX lock.
I2C devices are permitted to sleep during transfers.

MFC after:	3 weeks
2026-02-22 18:53:27 +01:00
Michal Meloun 4840558e52 OFW: Improve OFW_CPU.
Accept the assigned clock on the CPU node.
Don't report a missing "clock-frequency" property if the CPU node has
a "clocks" property.

MFC after:	3 weeks
2026-02-22 18:53:27 +01:00
Michal Meloun 6b77d34f44 HYM8563: Add support for clock output.
The RTC contains a configurable clock output.

MFC after:	3 weeks
2026-02-22 18:53:27 +01:00
Michael Tuexen c984c7593e tcp: cleanup
No functional change intended.

Reviewed by:		pouria, rrs, Timo Völker
MFC after:		1 week
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D55415
2026-02-22 18:44:10 +01:00
Alan Somers 7755a406a6 fusefs: remove the obsolete rename_lock
This lock was included in the original GSoC submission.  Its purpose
seems to have been to prevent concurrent FUSE_RENAME operations for the
current mountpoint, as well as to synchronize FUSE_RENAME with
fuse_vnode_setparent.  But it's obsolete, now that ef6ea91593 added
mnt_renamelock .

MFC after:	2 weeks
Sponsored by:	ConnectWise
Reviewed by:	kib
Differential Revision: https://reviews.freebsd.org/D55231
2026-02-22 10:08:27 -07:00
Alexander Ziaee 451f593194 ports.7: Add port files to FILES
Add terse descriptions for the individual files that make up a port to
the FILES section of the ports reference manual.

MFC after:		3 days
Reviewed by:		adamw
Differential Revision:	https://reviews.freebsd.org/D55404
2026-02-22 02:43:49 -05:00
Adrian Chadd 6a6152bc29 rsu: migrate to new net80211 encryption key API
Migrate to the new encryption key API rather than poking at the
key struct directly.

Differential Revision:	https://reviews.freebsd.org/D54483
2026-02-21 19:29:44 -08:00
Enji Cooper 4544f34f2d .gitignore: ignore additional unwanted files
Ignore more files generated by toolchains, e.g., `.pico`, etc. Ignore the
`.DS_Store` produced by macOS as well because all they provide is
additional file metadata that shouldn't be committed to `git`.

MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D55096
2026-02-21 19:00:06 -08:00
Adrian Chadd 19a18bb750 powerpc64: initial conversion of oea64 to rwlocks
Convert the oea64 mmu code to rwlocks.

Reviewed by:	jhibbits
Differential Revision:	https://reviews.freebsd.org/D54936
2026-02-21 18:22:46 -08:00
Enji Cooper eda36ae09d asmc: resource cleanup simplifications
This change makes `asmc_detach(..)` reentrant by setting freed resources
to known invalid values when done, and makes `asmc_attach(..)` call
`asmc_detach(..)` instead of attempting to the semi-equivalent way of
cleaning up the driver resources allocated in `asmc_detach(..)`.

MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D55413
2026-02-21 17:59:06 -08:00
Ed Maste 9a44e42a2b Retire GNU diff3
We added the option to build BSD diff3 in commit 2201f7c49f ("Build
BSD diff3 if GNU diff3 is disabled.") and made it the default in
4d5c434ed1 ("diff3: use bsd diff3 by default") after resolving
deficiencies relative to GNU diff3.  Thus, we can now remove the GNU
diff3 build infrastructure and source.

Reviewed by:	bapt, ziaee
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D46878
2026-02-21 20:53:19 -05:00
Colin Percival 6881fd278d pkg-stage.sh: Add ext2 and ntfs
Having these packages available on release media may help users who
need to sneakernet other packages (e.g. firmware) from systems running
Linux or Windows.

Suggested by:	vladlen, ziaee
MFC after:	3 days
2026-02-21 16:41:02 -08:00
Alexander Ziaee 456ae98208 ufs_disk_close.3: Correct include header macro
This manual used the library macro to mark up a header file, causing
pollution in the apropos database for libraries, as well as omission
from the apropos database for headers. This also renders differently,
enclosing the header in angle brackets.

MFC after:	3 days
2026-02-21 19:14:01 -05:00
Aymeric Wibo 98ffaae49f libc: Roll {l,ll,imax}abs(3) manpages into just abs(3)
No need to have 4 separate manpages for these functions. Use opportunity
to change parameter names in the source from j -> i to reflect the name
used in POSIX. (The ISO C standard uses j but i is a better name
anyway.)

Reviewed by:	des, rpokala
Approved by:	rpokala
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D55361
2026-02-22 00:22:05 +01:00
Aymeric Wibo 637a8ec157 stdckdint.3: Fix standard in comment
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D55360
2026-02-22 00:20:19 +01:00
Aymeric Wibo c242bf1b70 libc: Roll {l,ll,imax}div(3) manpages into just div(3)
No need to have 4 separate manpages for these functions.

Reviewed by:	ziaee, rpokala, des
Approved by:	rpokala, des
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D55360
2026-02-22 00:19:25 +01:00
Dag-Erling Smørgrav d57dee7ab6 lpr: Add deprecation notice
These programs require elevated privileges to work and have not seen
regular maintenance in decades.  Unless someone steps up and overhauls
them, we will have to remove them before 16.0.  Better-maintained
alternatives are available in ports (print/cups, sysutils/LPRng).

MFC after:	3 days
2026-02-21 22:26:51 +01:00
Dag-Erling Smørgrav d4f6cb7542 build: Move all of lp under LPR option
* Tag related directories with package=lp

* Make the examples/printing directory conditional on MK_LPR

* Make the hosts.lpd(5) manual page conditional on MK_LPR

MFC after:	3 days
2026-02-21 22:25:49 +01:00
Lexi Winter 7965c93e4d packages: Don't create empty packages
If a package plist only contains directories, but no files, do not
create the package.

This fixes an issue where setting "package=foo" in mtree causes the
"foo" package to always be created, even if nothing else installs in
that package, because the mtree entry is always added to the plist.

This most often happens:

* With architecture-specific directories, because mtree can't install
  a directory conditionally based on architecture, and

* With packages that are completely empty when a particular src.conf
  knob is disabled, because mtree will still create the directories.

Although it's theoretically possible that we might want to create a
package that only contains directories, there are no such packages
today.

MFC after:	2 weeks (stable/15 only)
Reviewed by:	manu, des
Differential Revision:	https://reviews.freebsd.org/D55412
Sponsored by:	https://www.patreon.com/bsdivy
2026-02-21 20:21:59 +00:00
Mark Johnston fa77660a3c pipe: Avoid unnecessary priv_check() calls in pipespace_new()
Running out of pipe map KVA is a rare case, so reorder checks
accordingly, presuming that calling priv_check() is more expensive than
the calculation.  In particular, priv_check() might not be cheap to
evaluate if MAC hooks are installed.

Reviewed by:	olce, kib
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D55378
2026-02-21 16:28:49 +00:00
Mark Johnston 0fa6ce2556 sysctl: Avoid calling priv_check() unnecessarily
After commit 7d1d9cc440 we only serialize large sysctl requests for
non-root users, but we should avoid calling priv_check() unless the
request actually is large, as that's not the common case.  In
particular, priv_check() might not be cheap to evaluate if MAC hooks are
installed.

Reviewed by:	olce, kib
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D55377
2026-02-21 16:16:32 +00:00
Warner Losh 80950a079b CONTRIBUTING.md: Github to Phabricator move adivce
When moving from Github to Phabricator, request that the original github
pull request be closed with the URL of the Phab. This cuts down on
clutter and helps us track things better.

Sponsored by:		Netflix
2026-02-21 08:30:26 -07:00
Toomas Soome 23605a8e51 loader.efi: efi_redirect_exceptions does use uninitialized pointer
loader_idt.rd_base is not set when we are attempting to bcopy(),
resulting to data stored to page 0 and therefore corrupting it.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D55180
2026-02-21 17:27:35 +02:00
Toomas Soome f2186bbd63 loader.efi: free_tables() appears to free tss_pa twice.
we check and reset loader_gdt_pa, but use FreePages(tss_pa).

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D55179
2026-02-21 17:20:54 +02:00
Christos Margiolis 3deae7b786 sound: Detect unsupported formats
This way we can avoid edge-cases like
8af6aee96e ("virtual_oss(8): Remove
floating point formats from preference list").

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D55403
2026-02-21 12:36:58 +01:00
Konstantin Belousov 5c8af592f6 procctl(PROC_REAP_KILL): align error reporting with pgkill(2)
ESRCH from cr_cansignal() means that the target process should be not
visible to the initiator.  So do not report pids with ESRCH result.

Noted by:	markj
Reviewed by:	markj, olce
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D55341
2026-02-21 11:45:47 +02:00
Konstantin Belousov 0e67c3f675 reap_kill_subtree_once(): reap_kill_proc_work() might drop proctree_lock
Due to this, restart the iteration over the p_reapsiblings if the lock
was dropped.

Reviewed by:	markj
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D55288
2026-02-21 11:45:47 +02:00
Konstantin Belousov be140717a0 procctl(PROC_REAP_KILL): use pgrp pg_killsx sx to sync with fork
PROC_REAP_KILL must guarantee that all reaper descendants are signalled.
In particular, it must ensure that forked but not yet fully linked
descendants cannot escape killing. Currently, proc_reap() fullfils the
guarantee by single-threading stopping the target process, which moves
the target to the userspace boundary, so the target cannot fork while
the signal is sent.

Single-threading has undesirable effect of sometimes terminating sleeps
with EINTR.

Since the time that the bug with PROC_REAP_KILL was fixed, we grow
the pg_killsx mechanism that is similarly used by the process group
signalling to ensure that no member of the process group escapes.
Reuse pg_killsx for PROC_REAP_KILL as well.

Besides the functional change of no longer causing spurious EINTR, not
single-threading the target means that we no longer need to delegate the
work to the taskqueue.

PR:	290844
Reported by:	bdrewery
Reviewed by:	des, markj
Tested by:	des, pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D55288
2026-02-21 11:45:47 +02:00
Toomas Soome dc11af08a4 loader.efi: tss_pa setup seems to be flawed in trap.c
since sd_lobase is 24 bits, we would need to shift 24 bits, not 16.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D55178
2026-02-21 10:49:34 +02:00
Toomas Soome 503374af39 fix typo in efi/loader/arch/amd64/trap.c
Rename grap_faults to grab_faults

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D55177
2026-02-21 10:40:48 +02:00