Commit Graph

310095 Commits

Author SHA1 Message Date
Haoxiang Li 836d0d341a arm/bcm2835: Release mailbox resources on attach failure
Also remove the rid variable since it was unused.

Signed-off-by:	Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn>
Reviewed-by:	vexeduxr
Pull-Request:	https://github.com/freebsd/freebsd-src/pull/2255
2026-06-14 19:51:04 +03:00
Haoxiang Li 39217ebb8a arm: allwinner: Fix A10 INTC MMIO resource cleanup
Do not jump to the resource release path when bus_alloc_resource_any()
fails, since no MMIO resource was allocated. If a10_intr_pic_attach()
fails after the MMIO resource has been allocated, release it before
returning.

Signed-off-by:	Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn>
Reviewed-by:	vexeduxr
Pull-Request:	https://github.com/freebsd/freebsd-src/pull/2253
2026-06-14 19:51:04 +03:00
Quentin Thébault 746c374aa9 evdev: add devnum sysctl
Add a sysctl entry for the evdev device number (devnum) to allow
libudev-devd to populate the corresponding device information
fields (MAJOR and MINOR) when running in a jail with no input devices
exposed through devfs.

Signed-off-by: Quentin Thébault <quentin.thebault@defenso.fr>

Reviewed by:	wulf
Sponsored by:	Defenso
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D56968
2026-06-14 11:34:51 -05:00
Ahmad Khalifa 2e1f5b7897 loader.efi(8): document the ia32 loader
Reviewed by:	kib
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D57569
2026-06-14 19:26:30 +03:00
Ahmad Khalifa f771deb193 loader.efi(8): the amd64 loader doesn't do protected mode
The amd64 UEFI loader executes in long mode, not protected mode.

Reviewed by:	kib
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D57568
2026-06-14 19:26:16 +03:00
Baptiste Daroussin ffe47c424e grep: periodic timer-based fflush instead of unconditional per-line flush
Replace the unconditional fflush(stdout) in grep_printline and
procmatches with a periodic timer that flushes at most once every
100ms.  This preserves interactive responsiveness (grep | tee,
grep | tail -f) while avoiding 1M+ write(2) syscalls when
processing large inputs.

The flush interval is tracked via clock_gettime(CLOCK_MONOTONIC)
and a static timespec.  --line-buffered continues to flush
immediately via setlinebuf(3), as before.

Benchmark on 1M lines (37MB output to file):
  unconditional fflush:  1.90s  (sys 1.22s)
  periodic 100ms timer:   0.49s  (sys 0.007s)

Reviewed by:		kevans
Differential Revision:	https://reviews.freebsd.org/D57528
2026-06-14 16:26:30 +02:00
Gordon Bergling 8a13adf80c d.7: Correct a few typos in the manual page
- s/occurance/occurrence/
- s/Univeristy/University/

MFC after:	5 days
2026-06-14 11:36:36 +02:00
Gordon Bergling 89234ff7bd umass.4: Correct a typo in the manual page
- s/Sotrage/Storage/

MFC after:	5 days
2026-06-14 11:34:06 +02:00
Gordon Bergling f257497856 acpi(4): Fix a typo in a source code comment
- s/freqency/frequency/

MFC after:	3 days
2026-06-14 10:52:48 +02:00
Gordon Bergling 58cf810066 clk: Fix a typo in a source code comment
- s/freqency/frequency/

MFC after:	3 days
2026-06-14 10:51:59 +02:00
Gordon Bergling 0ea84e9cce et(4): Fix a typo in a source code comment
- s/Diable/Disable/

MFC after:	3 days
2026-06-14 10:50:59 +02:00
Gordon Bergling 6280a06300 qcom_clk: Fix a typo in a source code comment
- s/freqency/frequency/

MFC after:	3 days
2026-06-14 10:50:02 +02:00
Gordon Bergling 54e4b9c9fa ufshci(4): Fix a typo in a source code comment
- s/Diable/Disable/

MFC after:	3 days
2026-06-14 10:48:18 +02:00
Gordon Bergling dd8ba1f2fc sdhci(4): Fix a typo in a source code comment
- s/freqency/frequency/

MFC after:	3 days
2026-06-14 10:47:14 +02:00
Gordon Bergling 49ced8d765 aic7xxx: Fix two typos in source code comments
- s/Diable/Disable/
- s/connonical/canonical/

MFC after:	3 days
2026-06-14 10:45:52 +02:00
Konstantin Belousov 59b0df3441 linux_ntsync(9): check the file type before calling native ntsync(9)
Reported by:	Alex S <iwtcex@gmail.com>
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2026-06-14 07:11:08 +03:00
Konstantin Belousov 64467d2ec3 vnode: move VIRF_KNOTE to v_v2flag
The semantic of the flag has the natural march to the code scope that is
protected by the vnode lock.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D56912
2026-06-14 05:08:20 +03:00
Konstantin Belousov da6aa0648c struct vnode: assign v_rl.resv1 as v_type and v_rl.resv2 as v_state
Use the avaliable space to introduce vnode-locked flag v_v2flag.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D56912
2026-06-14 05:02:38 +03:00
Konstantin Belousov 3d505310b1 sys/rangelock.h: explicitly enumerate padding at the end of the structure
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D56912
2026-06-14 05:02:38 +03:00
Konstantin Belousov 36b155a2b3 vfs: work around the race between vget() and vnlru
Specifically, do not let vtryrecycle() to recycle a used vnode. It is
possible for a vnode to be vref-ed or vuse-ed lockless after it is held
by vhold_recycle_free(). Then, since vtryrecycle() does not recheck the
hold count, we might end up freeing vused vnode.

Since vget_finish() increments v_usecount after obtaining the vnode
lock, we would observe the hold reference anyway when the parallel
vget() is blocked waiting on the vnode lock.

PR:	281749
Reported and tested by:	Steve Peurifoy <ssw01@mathistry.net>, Vladimir Grebenshchikov <vova@zote.me>
Reviewed by:	olce
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D57305
2026-06-14 05:02:38 +03:00
Konstantin Belousov 3eafe01884 rtld-elf: add some tests for parse_integer()
Reviewed by:	des, dim
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D57549
2026-06-14 04:02:00 +03:00
Konstantin Belousov 4249a9bc09 rtld parse_integer(): support binary, octal, and hex C notations
Reviewed by:	des, dim
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D57549
2026-06-14 04:01:55 +03:00
Nick Price 69e20977a4 acl_to_text_nfs4.c: Fix a snprintf() for large uid
Commit 6e7c10c79d fixed a couple of snprintf()s for large
uid/gid numbers above 2Gig.  This patch fixes another one.

Reviewed by:	rmacklem
Differential Revision:	https://reviews.freebsd.org/D57561
2026-06-13 14:15:17 -07:00
Vladimir Kondratyev 511d749ecc LinuxKPI: sync linuxkpi_video with Linux 6.12
MFC after:	1 week
2026-06-13 21:08:58 +03:00
Christos Margiolis de2a136602 mixer(8): Retire deprecated control values
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2026-06-13 19:29:40 +03:00
Mateusz Piotrowski 4ef1a73c22 style.mdoc.5: Document Nd style
The Nd macro takes the rest of the line as an argument,
so there is no need for extra quoting.

MFC after:	3 days
2026-06-13 12:57:05 +02:00
Dimitry Andric 2b619b7c7b Merge commit 93a67259cf23 from llvm git (by ShengYi Hung):
[ToolChains][FreeBSD] Set default Linker to LLD for FreeBSD (#190596)

  When the linker is specified as ld, toolchain applies special handling
  by invoking (triple)-ld instead of resolving ld via standard PATH
  lookup. This causes GNU ld installed via the system package manager to
  take the precedence (since (triple)-ld appears earlier in the search
  path), effectively overriding ld.lld.

  As a result, we set the default Linker on FreeBSD to ld.lld to indicate
  we want to use lld by default.

PR:		292067
MFC after:	3 days
2026-06-13 12:03:11 +02:00
CismonX 4179f1d9de fusefs: only search for FREAD fufh in readdir
The extra search for an FEXEC fufh shall be removed, since readdir
is only supposed to be called on a directory opened with FREAD.  The
sole exception is NFS, which will call VOP_READDIR with directories that
aren't open at all.  fuse already has special code to handle that.

Also remove the fuse_filehandle_get_dir() function, since it's not
used anywhere else.

Signed-off-by:	CismonX <admin@cismon.net>
Reviewed by:	asomers
MFC after:	2 weeks
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1729
2026-06-12 17:48:50 -06:00
Krzysztof Galazka 4ea4116f8d vmimage.subr: Add ability to install src in VM image
In some cases having a src tree in a VM image is convenient
for development or debugging. Add a WITH_SRC variable,
which, when set, will cause the vm-release target to include
FreeBSD-set-src in the list of packages installed in an image.

Signed-off-by: Krzysztof Galazka <krzysztof.galazka@intel.com>

Sponsored by:   Intel Corporation

Reviewed by:	cperciva
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D57143
2026-06-12 20:21:48 +02:00
Pouria Mousavizadeh Tehrani 9f80c8b90b rc.d/routing: Silence errors for loopback routes
_loopback entry in `static_routes` ensures a loopback route
exists in all routing tables.
However, loopback routes may already be added by the kernel.
Therefore, re-adding them triggers an `EEXIST` error on every boot.
This change suppresses those harmless errors.

PR:		259553
MFC after:	1 week
Reviewed by:	glebius, jlduran, markj
Differential Revision:	https://reviews.freebsd.org/D57470
2026-06-12 19:48:28 +03:30
Mark Johnston 75b23c102e tests/jaildesc: Use a more efficient mechanism to block
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D57148
2026-06-12 14:58:43 +00:00
Mark Johnston fe03a78c5d tests/jaildesc: Add some more test scenarios
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D57147
2026-06-12 14:58:19 +00:00
Mateusz Piotrowski 8e1f5baa62 loader.efi.8: Address mandoc -Tlint errors
MFC after:	3 days
2026-06-12 14:27:38 +02:00
Krzysztof Galazka 3101456423 ice(4): Fix link speed after changing cable type
When interface was connected to a link partner with a cable
type limitting maximum supported speed, e.g. SFP+ cable
in 25G port, driver incorrectly saved a supported speed
as the user configured speed. This prevented interface
from using all supported speeds after switching cable to SFP28.
Link was established at 10G as supported by previously used
SFP+ cable. Don't set user requested speed unless actually
configured by an user, to allow automatic selection of highest
available speed. Only when user sets custom config
using advertise_speed sysctl save it and try
to apply after cable is changed.

Also don't save initial supported speeds if FW supports
reporting default PHY config.

Signed-off-by: Krzysztof Galazka <krzysztof.galazka@intel.com>

Reviewed by:	kbowling, erj, mateusz.moga_intel.com
Sponsored by:   Intel Corporation
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D53611
2026-06-12 14:19:06 +02:00
Kristof Provost fcb31b5711 libpfctl: fix memory leak
When we snl_init_writer() we allocate memory in the struct snl_state in the struct pfctl_handle.
This memory was never released again, leading to a memory leak. We still
had a reference to the memory and would release it on pfctl_close()
(so valgrind did not detect it as a leak), but long-lived users (e.g.
bsnmpd) would eventually run out of memory.

Explicitly reset the snl_state when we're done to prevent this.

MFC after:	2 weeks
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2026-06-12 13:53:37 +02:00
Kristof Provost 2a478dfc7f libpfctl: retrieve family id only once
Look up the pfctl family id when we open the handle, rather than for
every function call.
This saves us a lot of netlink calls, at the expense of storing one
extra int in the handle.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
2026-06-12 13:53:37 +02:00
Krzysztof Galazka bea6f7d02d ice(4): Add support for new E810-XXV-2 adapters
Add two new subdevice IDs for E810-XXV-2 and E810-XXV-2 for OCP 3.0.

Signed-off-by: Krzysztof Galazka <krzysztof.galazka@intel.com>

Reviewed by:	kbowling, erj, mateusz.moga_intel.com
Sponsored by:   Intel Corporation
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D54069
2026-06-12 13:37:07 +02:00
Bojan Novković 23c99b6491 bhyve: Document vCPU range pinning
This change documents the recently introduced changes to -p
that allow users to specify CPU ranges instead of having to
specify each individual mapping.

While we're here, move the -p examples to the EXAMPLES section.

Reviewed by:	bcr
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D57480
2026-06-12 11:30:08 +02:00
Enji Cooper d6e3662bc1 Remove fips-module related diff
This particular change didn't come from upstream. It was added locally
in 7a991ecd1 when attempting to enable the fips provider with 3.0.

Given the fact that we no longer build the fips provider and the fips
provider build process (including sources) is very prescribed to
specific build steps and source versions, there's no reason why we need
to continue carrying around this diff anymore.

MFC after:	1 week
Signed-off-by: Enji Cooper <ngie@FreeBSD.org>
2026-06-11 22:50:52 -07:00
Enji Cooper 2de6d07e16 Remove $FreeBSD$ from upstream-provided config file
This diff reduces with the content provided by upstream (OpenSSL).

MFC after:	1 week
2026-06-11 22:45:28 -07:00
Aleksandr Rybalko 1f68ca5802 vt: Do not lock request comming from terminal
only those originated by mouse.  Because the terminal surrounds
requests to vt(4) with locking.

Reported by:	bz, adrian
Reviewed by:	adrian, glebius
Approved by:	glebius (mentor)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D57442
2026-06-12 02:56:03 +03:00
Aymeric Wibo ee13bfb694 amdsmu(4): Small improvements
Suggested by:	olce
Sponsored by:	The FreeBSD Foundation
2026-06-11 17:21:52 -04:00
Aymeric Wibo 4733b4dca5 amdsmu(4): Add manpage
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D57366
2026-06-11 16:43:05 -04:00
Andre Silva 0aa4c25f3e hwpmc_ibs: Add Zen6 IBS ctl2 filters and alternate disable
Add kernel and userland support for Zen6 IBS extensions per AMD pub
69205 (rev 1.00, March 2026): alternate fetch/op disable via ctl2[0],
fetch latency filtering, virtual address bit 63 filtering, and
streaming-store filtering.  Decode the new IbsOpData2 StrmSt and
RmtSocket bits. Update libpmc, pmcstat and manpage.

Pre-Zen6 systems work unchanged with ibs_ctl2 == 0.

Signed-off-by:	Andre Silva <andasilv@amd.com>
Reviewed by:	Ali Mashtizadeh <ali@mashtizadeh.com>, mhorne
Sponsored by:	AMD
Differential Revision:	https://reviews.freebsd.org/D56914
2026-06-11 12:12:30 -03:00
ShengYi Hung ff46acfd52 usb: implement attach kernel driver feature
FreeBSD's USB framework supports detaching kernel drivers to allow
user space applications to exclusively claim USB interfaces. However,
it lacked support for reattaching the kernel driver afterward.

This commit adds the missing functionality, enabling user space
to return control of the device back to the kernel.

Reviewed by:    lwhsu
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52122
2026-06-11 23:08:30 +08:00
Aleksandr Rybalko f056e84e5b virtio-scsi: handle device capacity change event
This feature is utilized when updating storage capacity in capable hypervisors such as QEMU.

Reviewed by:	imp
Approved by:	imp(mentor)
Obtained from:	Fudo Security
MFC after:	2 weeks
Sponsored by:	Fudo Security
Differential Revision:	https://reviews.freebsd.org/D57247
2026-06-11 15:30:04 +03:00
Stefan Eßer b440741db4 tools/test/stress2/misc/msdos12.sh: fix permission issue
This test runs with rights of an un-privileged user writing to a file
system only writable by the owner. Since no UID was provided in the
mount command, the owner of the file system was "root", and thus
writing was not allowed for $testuser. Fix this issue by mounting
with "-u $testuser".

MFC after:	3 days
2026-06-11 13:48:49 +02:00
Piotr Kubaj 92ae21e8a1 sys/arm64: fix return values of freebsd32_{set,swap}context()
This patch aligns the return values of freebsd32_{set,swap}context()
with their counterparts on amd64 and powerpc64, fixing the setcontext()
and swapcontext() calls in armv7 applications running on aarch64.

In particular, this fixes random crashes in armv7 Ruby applications
running on aarch64 hosts.

Tested by:	fuz
MFC after:	1 week
2026-06-11 13:46:38 +02:00
Stefan Eßer 3260c42c41 tools/test/stress2/misc/all.exclude: remove msdos24.sh
Remove test for UFC-16 surrogate pairs in file names from this exclude
list, since kernel support has been committed and the test can be now
expected to succeed.

MFC after:	3 days
2026-06-11 13:39:19 +02:00
Stefan Eßer 596dadbbb5 tools/test/stress2/misc/msdos24.sh: improve surrogate pair test
Instead of varying only the low surrogate do also randomly choose a
suitable high surrogate.

MFC after:	3 days
2026-06-11 13:36:09 +02:00