[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.
Improve metadata fetching to work more reliably across
IPv4-only, IPv6-only, and dual-stack instances.
AWS does not by default enable the metadata service on
IPv6; you have to specify '--metadata-options "HttpProtocolIpv6=enabled"'.
Without this, even a dual-stack instance can't fetch
metadata from the IPv6 endpoint.
In addition, reaching the metadata service takes some
time, so we can't trivially check for network
readiness and instead need to actually try to fetch a
file. Ok.
While here, don't overwrite a hostname that is set
from /etc/rc.conf and only set the hostname if
otherwise unset.
sysutils/firstboot-pkg-upgrade: 1.1 -> 1.2
If a list of repositories has been specified, only run 'pkg update'
on those repositories; in particular, avoiding downloading the entire
FreeBSD-ports repository when we're not going to be using it allows
FreeBSD/EC2 instances (and presumably those other clouds too) to
launch roughly 5 seconds faster.
Reviewed by: ziaee
Sponsored by: Amazon
Differential Revision: https://reviews.freebsd.org/D57033
(cherry picked from commit ac4933ff6f18f126fbf9bc72f1ab9451c9355f29)
sysutils/firstboot-pkg-upgrade: 1.1 -> 1.2
If a list of repositories has been specified, only run 'pkg update'
on those repositories; in particular, avoiding downloading the entire
FreeBSD-ports repository when we're not going to be using it allows
FreeBSD/EC2 instances (and presumably those other clouds too) to
launch roughly 5 seconds faster.
Reviewed by: ziaee
Sponsored by: Amazon
Differential Revision: https://reviews.freebsd.org/D57033
[RISC-V][RVY] Introduce pure-capability ABI names
Adding this will allow updating #177249 to define the datalayout only
based on the triple and ABI instead of inspecting the feature string
which is a per-function property and not a per-module one.
The RVY ABIs are currently under review at this psABI pull request:
https://github.com/riscv-non-isa/riscv-elf-psabi-doc/pull/499
Pull Request: https://github.com/llvm/llvm-project/pull/194270