netipsec: Allow IPv6 extension headers before UDP encapsulated ESP
udp_ipsec_input() took the UDP header of an IPv6 packet to follow the
IPv6 header directly. With a hop-by-hop, routing or destination options
header in front of it, the SA was still found by its SPI, but the port
check then read the extension header instead of the UDP header, and the
packet was dropped as having no SA. The ESP protocol number was also
written to the next header field of the IPv6 header, not to the one that
led to the UDP header.
Derive the offset of the UDP header from the payload offset that
udp6_append() passes, and find the next header field with
ip6_get_prevhdr(), as ipsec6_input() does since 3d810fa261f1.
udp_ipsec_adjust_cksum() made the same assumption where it recomputes
the checksum of the inner TCP or UDP header
(net.inet.ipsec.natt_cksum_policy set to 1): it summed from the end of
the IPv6 header and stored the result at that offset, inside the
extension header. Use the offset of the transport header that the
[6 lines not shown]
games/vkquake: Improve pkg-message
Recent versions of the commercial game have redesigned localization,
making the last comment no longer necessary. Instead, explain how to
open the firewall for multiplayer :)
MFH: 2026Q4
(cherry picked from commit d87987ce334b1be6a421e6e93f80d22db8e0b5b4)
ValueMapper: Don't cache identity mappings of globals and leaf constants (#247935)
With RF_NoModuleLevelChanges and no materializer, nothing reads identity
mappings back from the map, and globals and ConstantData always map to
themselves. Return them directly instead of adding map entries.
Instructions retired by opt -O3:
tramp3d-v4, x86_64-linux: -0.13%, -0.18% without likely_module_local
hints, -0.10% with -g
CTMark geomean, arm64: -0.01%, -0.06% with -g
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
games/vkquake: Improve pkg-message
Recent versions of the commercial game have redesigned localization,
making the last comment no longer necessary. Instead, explain how to
open the firewall for multiplayer :)
MFH: 2026Q4
[llvm-jitlink] Move platform-setup into its own method. NFC. (#248302)
We'll be adding more platform code in the future, so break this out of
Session's constructor to keep it readable.
articles/freebsd-update-server: Move to distset-update-server
Move the article on building distribution set update server out of the
way so that the new article on building a base system package update
server can take it's place. Improve the warning at the top while here.
This article is unfortunately out of date and needs to be fixed because
distribution sets will be supported until 31 December 2029.
With hat: doceng@, re@
Approved by: cperciva
Differential Revision: https://reviews.freebsd.org/D61655
[SandboxVec][LoadStoreVec] Vectorize store chains whose loads have external uses
Loads that feed a store chain used to block vectorization whenever they
had more than one use. The store chain can now be vectorized even if the
loads have external uses. Once the scalar stores are erased, each
original load is rebuilt from the lanes it occupies in the new vector
load, and reinterpreted back to its original type if needed.
The legality check, canUnpack(), runs before any IR is created, so a load
whose lanes cannot be reinterpreted (for example, a non-integral pointer)
rejects the whole chain instead of leaving a partially rewritten block.
The unpacking itself is done by unpackIfNeeded() after the scalar stores
have been removed.
Co-authored-by: Cursor <cursoragent at cursor.com>
[flang][NFCI] Allow FortranObjectViewOpInterface to report no source. (#248212)
`getViewSource` takes an operation result. A follow-up change will
implement the interface for `fir.unboxchar`, which returns a character
address and a length. Only the address has a view source.
Extend the interface contract so that a null `Value` means the queried
result has no view source. Update callers to handle that case.
Assisted-by: Codex
[compiler-rt] Pass --sysroot to tests when CMAKE_SYSROOT is set (#247993)
We weren't passing --sysroot to tests which could lead to mismatch
between runtime libraries and test binaries resulting in runtime
failures. This uncovered several issues in RTSan and Scudo when using
older glibc version.
stdio: Fix negated wchar scansets
We were recording the start of the scanset before checking if it began
with a caret. We need to check for a caret first, then record whatever
comes next as the start of the scanset.
Note that scanf() did not have this bug, only wscanf(), but this adds
regression tests for both anyway.
MFC after: 1 week
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D62328
[clang] Fix crash on trailing comma in vectorize_width (#246804)
With `#pragma clang loop vectorize_width(4, )`, the token after the
comma is the end marker for the loop hint. The parser diagnoses the
missing argument, then lexes past the marker. Error recovery consumes
the following loop and crashes at the end of the file.
```text
Stack dump:
1. <eof> parser at end of file
2. <stdin>:1:10: parsing function body 'f'
3. <stdin>:1:10: in compound statement ('{}')
```
Leave the end marker for the existing recovery path so parsing resumes
at the following loop. Clang now emits only the malformed hint error.
```text
<stdin>:2:40: error: vectorize_width loop hint malformed; use vectorize_width(X, fixed) or vectorize_width(X, scalable) where X is an integer, or vectorize_width('fixed' or 'scalable')
[5 lines not shown]
[AMDGPU][GlobalISel] Use v_cmpx/s_andn2_wrexec form in RegBankLegalize waterfall loops
Port the UseNewExecInstructions path from SIInstrInfo's waterfall emission
to RegBankLegalizeHelper::executeInWaterfallLoop. On subtargets with
no-sdst v_cmpx and s_andn2_wrexec, the loop now narrows exec with deferred
V_CMPX_EQ_*_nosdst_e32_term compares and computes the remaining lanes with
S_ANDN2 from an exec PHI, written back by S_MOV_term. SIOptimizeExecMasking
then folds the pair into s_and_not1_wrexec, matching SelectionDAG.
Co-authored-by: Cursor <cursoragent at cursor.com>
TableGen: Add \x escape to string literals (#248201)
Accept \xHH in string literals, producing the character with the
hexadecimal value HH. This allows writing names that contain control
characters, such as the \01 prefix used to suppress symbol mangling. A
few edge cases in RuntimeLibcallsInfo need to do this (e.g., on Darwin
there is a function named "\01mcount").
Assisted-by: Claude
[tsan] Intercept mremap on Linux to update shadow memory (#230707)
[tsan] Intercept mremap on Linux to update shadow memory
ThreadSanitizer intercepts `mmap`, `mmap64`, and `munmap`, but did not
intercept Linux `mremap`. When a mapping is relocated (`MREMAP_MAYMOVE`
/ `MREMAP_FIXED`), shrunk in-place, or expanded in-place via `mremap`,
TSan's shadow memory became out of sync with the process address space:
- Relocated mappings left stale shadow state at the unmapped old range
(unless `MREMAP_DONTUNMAP` was set) and did not reset or initialize
shadow memory for the destination range.
- In-place shrinks left stale shadow state on the unmapped trailing
pages.
- In-place expansions did not initialize or reset shadow memory for the
newly mapped pages.
Add a Linux `mremap` interceptor that calls `UnmapShadow` on unmapped
old pages and `MemoryRangeImitateWriteOrResetRange` on newly mapped or
expanded ranges.
[7 lines not shown]