sys/mount.h: restore KNF_NOKQLOCK in VFS_KNOTE_{,UN}LOCKED() call to KNOTE()
ZFS needs to take internal sleepable lock in its implementation of
VOP_GETATTR(). Due to this, kq must be unlocked around calls to the vfs
filter methods.
Fixes: 1d5e4020e36e ("vnode: add VIRF_KNOTE flag")
Reported and tested by: des
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
[ELF] Remove redundant memset in SymbolTable::insert. NFC (#198132)
make<SymbolUnion>() value-initializes the union, zero-initializing all
sizeof(SymbolUnion) bytes. The following memset(sym, 0, sizeof(Symbol))
is therefore redundant.
This placeholder path runs no Symbol constructor, so it was not covered
by the constructor initialization in
905a88b923433eb8cd83677ea55bee82eb9ba498.
[X86] isExtractSubvectorCheap - fix typo in vXi1 extraction test (#198127)
Fix typo in check for ResVT subvector being half the size of the SrcVT vector (instead of vice-versa).
Fixes #195695
x86: remove sys/mount.h from genassym.c
The header is not needed, and causes some issues with build because it
requires vnode_if.h generated due to transient dependency from vnode.h.
While there, remove unneeded explicit sys/cdefs.h and sys/param.h usage.
Reported and tested by: thierry
Fixes: 1d5e4020e36e ("vnode: add VIRF_KNOTE flag")
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
[ELF] Initialize Symbol fields in the constructor instead of via memset (#198129)
`initSectionsAndLocalSyms` and `makeDefined` memset the storage to zero
and then placement-new a Symbol-derived object into it. Placement new
begins a new object's lifetime. The standard does not seem to guarantee
the memset bytes carry into members the constructor leaves
uninitialized.
lld built by GCC 16 can make Valgrind report reads of Symbol::flags
(via getSymSectionIndex during finalizeSections) as uses of
uninitialized values (ClangBuiltLinux/linux#2162).
This patch reinstates the per-field initialization that commit
778742760534 ("[ELF] Avoid redundant assignment to Symbol fields. NFC")
had replaced with a bulk memset.
devel/uv: fix build on armv7
Disabling LTO makes the build scrape just below the address space limit
on 32 bit platforms.
Approved by: portmgr (build fix blanket)
MFH: 2026Q2
(cherry picked from commit f5fd3711e1dabd027d6a6f7a07c52cf99be756c8)
devel/uv: fix build on armv7
Disabling LTO makes the build scrape just below the address space limit
on 32 bit platforms.
Approved by: portmgr (build fix blanket)
MFH: 2026Q2
[VPlan] Refine plain CFG iterator name and strengthen assert (NFC). (#198124)
Address post-commit comments for
https://github.com/llvm/llvm-project/pull/197499:
* add rpo prefix the name to indicate traversal (similar to other
vp_depth_first_ helpers)
* Added comment about skipped VPIRBBs + assert.
rtnetlink: Check for allocation failure in nlattr_get_multipath()
Check for alloction failure on `npt_alloc()` for RTA_MULTIPATH
attributes in `nlattr_get_multipath()`.
Reported by: Joshua Rogers of AISLE Research Team
Reviewed by: markj
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D56954
(cherry picked from commit 188631e43a1a5d2985156141c2e244a925670683)
lang/rust: fix build on armv7
This grabs an upstream commit integrated into rust 1.95 and backports it
to rust 1.94 for 2026Q2. The commit reduces the number of TLS keys used
in the fallback TLS implementation, just so ensuring we can build the
rust toolchain without running out.
A more comprehensive fix will be committed for the main branch in the
coming days.
PR: 294545
Obtained from: https://github.com/rust-lang/rust/pull/151382
Approved by: mikael (rust)
rtnetlink: Align RTA_MULTIPATH length validation in nlattr_get
Fix length validation of RTA_MULTIPATH attributes in
nlattr_get_multipath() by making sure the user request is align.
PR: 295102
Reported by: Robert Morris <rtm at lcs.mit.edu>
Reviewed by: markj
Fixes: 7e5bf68495cc ("netlink: add netlink support")
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D56963
(cherry picked from commit 4329663a861ef74796b79b6b0872cfe10d31c591)
Fix sys_shmat().
The shminfo.shmseg could be changed via sysctl during sleeping malloc().
It only grows, so we access memory outside of allocated chunk within the
following 'for' loop. This issue was exposed by syzkaller [1].
Also, p->p_vmspace points to the ps_vmspace common to the whole process,
so p->p_vmspace->vm_shm could be already set by concurrent sys_shmat()
thread. We need to check this case, otherwise the pointer to
concurrently allocated segment will be overwritten.
1. https://syzkaller.appspot.com/bug?extid=9669e87e543ae1f05884
ok deraadt
Replace semid_ds with semid_ds_kern for in-kernel sysv semaphore
implementation.
Note, the buffer used for userland dlivery in sysctl_sysvipc() was
filled with zeros during allocation, we don't need extra zeroing.
ok deraadt millert
[VPlan] Add blocksAs helper (NFC). (#198122)
Add new blocksAs helper which casts all blocks in the provided range to
the specified type, instead of filtering out non-matching blocks.
Migrate a number of users that expect only VPBasicBlocks.
Pointed out post-commit in
https://github.com/llvm/llvm-project/pull/197499.