[lit] Specify endianness in `int.to_byte` (#239388)
Complement to #239364. Adds on other non-default argument to
`int.to_bytes`, which are needed for Python versions <= 3.10.
[llvm-diff] Compare function and call-site attributes (#238928)
Compare the function, return and parameter attributes and the calling
convention of the diffed functions, and of their call sites. Print the
attributes that are on only one side. This resolves the FIXMEs for
attributes and calling conventions.
AI-assisted.
RuntimeLibcalls: Add signatures for size returning new and GPU profiling (#238642)
__size_returning_new and its variants return __sized_ptr_t, a pointer
and size pair. The GPU profiling functions use the compiler-rt
prototypes.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[libc][sys/shm] Implement shmget syscall wrapper on Linux. (#239380)
`shmget` is a POSIX function (see
[docs](https://pubs.opengroup.org/onlinepubs/9799919799/functions/shmget.html#))
that returns a shared memory identifier created for a particular key.
On Linux, it can be implemented as a simple wrapper around `SYS_shmget`
syscall.
This is the first function from the newly added `<sys/shm.h>` header,
other functions / constants
will be added in the follow-up PRs.
[clang codegen] Fix MS ABI with deleted template constructor (#237634)
Under the Microsoft ABI, a class with a user-provided constructor cannot
be returned in a register. This check was fixed in 3ab4ae9e58c09 to also
handle template constructors. That fix missed a special case of the
special case: a deleted template constructor does not count as
user-provided.
Fixes #237188
[GlobalISel] Fold urem x, (shl pow2, y) to a mask (#238879)
Fixes #236466
This PR mirrors SelectionDAG's `OrZero` semantics to allow folding where
`d` is known to be a power of two or zero.
Prior to this, for a shift, `isKnownToBeAPowerOfTwo` only matched `1 <<
y` (which can only lose its bit where `y` is out of range, which is
poison), as shifting any other power of two may produce zero. Thus
`urem_pow2_to_mask` did not fire, and on AMDGPU GlobalISel fell back to
the full ~18 instruction division expansion whereas SelectionDAG
produces `x & (d - 1)`.
This patch adds an `OrZero` flag to `isKnownToBeAPowerOfTwo`, which now
recurses through `G_SHL`, `G_LSHR`, and `G_TRUNC` into the value being
shifted or truncated when said flag is set (or the result is known never
to be zero). The inclusion of `G_TRUNC` in this patch is necessary to
handle the `i64` case where `bypass-slow-division` truncates the
[7 lines not shown]
ggate: fix test intermittency
* ggatel: fix piped output. Flush stdout before daemonizing, so the
output can be read when it's in a command pipeline.
* ggated: bind the port _before_ daemonizing, so an invoking script can
be sure that the port is bound as soon as the command returns.
* tests: allow ggatec or ggatel to automatically allocate a device
number instead of choosing one in a racy way.
With all of these changes I can no run the tests 1000 times without
fail. And in parallel, too.
Sponsored by: ConnectWise
PR: 298942
Reported by: siva
Reviewed by: ngie
Differential Revision: https://reviews.freebsd.org/D60707
[2 lines not shown]
[ARM] Enable SlotIndexes compaction by default (#238515)
Greedy measures live ranges in slot indexes, and the entries left by
instructions erased before allocation make some ranges look longer than
they are. Opt ARM into dropping those entries, as was done for AMDGPU,
so allocation reflects the code actually being allocated.
The test updates are register assignment and spill placement changes.
Merge tag 'mm-core-7.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/mm/core
Pull core memory management fixes from David Hildenbrand:
"Here's a bigger set of MM fixes that we didn't manage to have ready
for -rc1. All fixes are stable-worthy; the majority fixes nasty
long-standing bugs instead of being purely hotfixes.
We have some more of these kinds of stable-worthy fixes in the
pipeline, but we'll focus on the really urgent fixes as we get closer
to the release.
(Leaving urgent MM fixes lurking for various weeks is not good, but
having too many changes close to the release is also not good, it's
tricky ...)
Most issues were reported by Anthropic. Others were found while
reworking proposed fixes, and of course some of the fixes were just
reported and fixed on the mailing list.
[53 lines not shown]
[SelectionDAG] Add opcode class metadata to DOT nodes (#228965)
SelectionDAG DOT graphs only expose printed node labels, so tools cannot
reliably distinguish SelectionDAG opcodes from machine opcodes.
Add `llvm_opcode` and `llvm_is_machine_opcode` attributes to each node
without changing the rendered graph. Add X86 coverage before and after
instruction selection.
nfsserver: Do not increment seqid on BADSEQID
When returning NFSERR_BADSEQID, the server should not have incremented
the sequence ID, yet the call to nfsrv_checkseqid() a few lines above
does precisely that. Instead, check for a legitimate retransmission
of the original successful request, and reject otherwise, before the
ticket is used and sequence ID incremented.
MFC after: 1 week
Fixes: ff45b9fc1a8c ("Bjorn reported a problem...")
Sponsored by: Klara, Inc.
Reviewed by: rmacklem
Differential Revision: https://reviews.freebsd.org/D61156
Merge tag 'mm-nonmm-hotfixes-stable-2026-11-04-20-26' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Pull non-MM fixes from Andrew Morton:
"22 patches. 17 are cc:stable.
Most are OCFS2 fixes. These address extended-attribute corruption,
missing attributes and kernel BUGs, along with crashes during cluster
configuration, lock migration, recovery and unmount. Extent movement
is also fixed to validate its range against a stable file size.
Three FAT changes prevent a failed-write/FIBMAP race from spuriously
making the filesystem read-only, correct directory link counts after
rename, and speed up file expansion. The reported QEMU benchmarks show
particularly large improvements on synchronous mounts.
A taint-string fix prevents an out-of-bounds read which can expose
slab contents in the kernel log. There are also build fixes for
OpenRISC modules on CPUs without hardware multiply and for Clang 24"
[22 lines not shown]
[libc][docs] Check entrypoints and filter stubs in docgen (#238908)
docgen previously checked for matching .cpp and *-macros.h files to mark
symbols as implemented. That counted ENOSYS placeholder stubs as
complete while missing shared entrypoints, Clang freestanding headers,
and macros defined in hdrgen YAML or .h.def templates.
Check exported entrypoints.txt symbols scoped to each header (excluding
TODO stubs) for functions, and include hdrgen YAML, .h.def templates,
and freestanding headers for macros. Point Furo View and Edit links on
generated pages to their docgen YAML definitions instead of build-tree
paths.
Assisted-by: Automated tooling, human reviewed.
math/R-cran-epitools: New port: Epidemiology Tools
Tools for training and practicing epidemiologists including methods
for two-way and multi-way contingency tables.
Approved by: jrm (mentor)
Differential Revision: https://reviews.freebsd.org/D61170
Use truenas_smbhad for SMB stateful failover
Samba now replicates SMB durable handles to the standby controller with
the truenas_smbhad daemon. This replaces the ctdb implementation.
- Remove ctdb and the clustered TDB code. passdb, group mapping, share
ACLs and secrets are local to each controller again.
- Stop setting "clustering" in smb.conf.
- Write /etc/truenas_smbhad.conf with the controller node and its
internal link addresses on HA systems. The daemon cannot detect the
addresses, because net.ipv4.ip_nonlocal_bind lets both bind on either
controller. Reload the daemon when a license change modifies the file.
- Keep smbd stopped on the standby. Restart it on takeover, because it
restores handles only at startup.
- Log the daemon to /var/log/truenas_smbhad.log.
- Remove the update block for stateful failover.
- Fix the default password of async_SSH_start, which was the password
function itself. do_failover(abusive=True) failed with a TypeError.
- Add unit tests and HA tests.