libnvmm(3): Remove unused GVA computation artifacts
On single-memory-operand instructions, we use the GPA provided by
the hardware and discard the GVA. The code that calculates the GVA
is therefore effectively unused. Remove it.
Obtained-from: NVMM Reference Implementation
testcases/libnvmm: Remove the two RIP-relative addressing tests
This reverts commit dea513a396514e21fa2cb677cd1e42929283d797 where I
added these two commits, which only helped validate the instruction
decoder and thus were not important. Remove them to keep in sync with
the upstream NVMM Reference Implementation.
libnvmm(3): Fix sign-extension on RCX and RDI/RSI
* Fix sign-extension on RCX when using the REP prefix.
* Fix sign-extension on RDI/RSI when emulating MOVS.
Obtained-from: NVMM Reference Implementation
libnvmm(3): Fix EXEC_INSTR()
- op2 is overwritten, so it needs "+r".
- RFLAGS is modified, so it needs "cc".
- PUSHFQ touches memory, so it needs "memory".
- The MOV is not needed, so remove it.
Obtained-from: NVMM Reference Implementation
libnvmm(3): Fix segment limits calc and support expand-down segments
The SVM/VMX hardware already calculates the segment limits in bytes
taking the G bit into account, so fix the emulator not to miscompute
the limits, and add a unit-test to ensure correctness.
Support expand-down segments and extend the 32bit segment limit
unit-test to ensure correctness.
Obtained-from: NVMM Reference Implementation
libnvmm(3): Fix zero-extension on RDI/RSI
* Fix zero-extension on RDI/RSI when emulating INS/OUTS.
* Fix zero-extension on RDI/RSI when emulating LODS/STOS.
Obtained-from: NVMM Reference Implementation
libnvmm(3): Allow partial fetches of instructions
An instruction may end at the boundary of a page followed by an
unmapped page. In that case, fetching the full 15-byte maximum
instruction length should not cause the assist to fail.
Allow partial instruction fetches to succeed, and add a unit-test
for that.
Obtained-from: NVMM Reference Implementation
libnvmm(3): Remove unneeded segment checks on CS
If the CS attributes did not allow the instruction to execute,
then the guest would have received an internal #GP and we wouldn't
have received an IO/MMIO VMEXIT. So no need to validate the CS
attributes.
Obtained-from: NVMM Reference Implementation
libnvmm(3): Fix the emulation of PAE 2MB large pages
The definitions of the PAE frame masks were incorrect: in PAE the
PTEs are 64bit-wide, not 32bit-wide. Fix this.
Obtained-from: NVMM Reference Implementation
libnvmm(3): Sync misc changes
- Replace EPROGMISMATCH by the standard ENOSYS.
- Remove finished TODO items; and move the remaining TODO items to the
code.
Obtained-from: NVMM Reference Implementation
[lld][riscv] Remove integer check for R_RISCV_SET32 (#219143)
If linker relaxation is enabled, the assembler might emit a
R_RISCV_SET[n]/R_RISCV_SUB[n] relocation pair for symbolic differences in
case of debug info relaxation (i.e. when relaxing DWARF CFA).
During relocation, the linker checks if the value for the R_RISCV_SET32
relocation fits a 32-bit signed integer (and a range error is issued if
it does not). If the symbol's absolute address is high enough (e.g. the
text section starts from 0x80000000), this results in a linker error.
R_RISCV_SET32 is also an absolute relocation type, so this check should
be removed.
[lldb] Guard SourceManager::File's line offsets with a mutex (#219424)
A SourceManager::File is shared by every Target and Process because
Debugger and Process hand out cached instances (see SourceFileCache).
m_offsets is the one member that is computed after the File was
created. CalculateLineOffsets() indexes the file on the first access.
Two threads that read the same source file at the same time therefore
race in the current implementation.
This patch guards m_offsets with a `Guarded` which avoids any potential
races. The shared mutex allows concurrent accesses once the line
offsets were calculated.
assisted-by: claude
www/adjuster: Update 3.248 => 3.249
This release adds support for the new HTTP QUERY method to Web Adjuster,
as well as several updates to Annotator Generator's Android code generation.
Commit log:
https://github.com/ssb22/adjuster/compare/v3.248...v3.249
PR: 298094
Reported by: Silas S. Brown <ssb22 at cam.ac.uk> (maintainer)
Approved by: osa, vvd (Mentors, implicit)
vmstat: Drop vm_cnt compat hack
Prior to FreeBSD 11, vm_cnt was named cnt. When it was renamed, vmstat
was modified to fall back to the old name if the new name was not found.
It's time we dropped this.
Reviewed by: kib, jhb, emaste
Differential Revision: https://reviews.freebsd.org/D59255
[ConstantTime][Clang] Restore __builtin_ct_select docs, ported to Markdown
The LanguageExtensions section was dropped when the branch was rebased
over the docs Markdown migration; re-add it in MyST form.
[LangRef][ConstantTime] Add documentation for llvm.ct.select.* constant-time intrinsics (#181042)
This PR introduces and documents the llvm.ct.select.* constant-time
intrinsics, providing timing-independent selection operations for
security-sensitive code. The LangRef is updated with syntax, semantics,
supported types, and usage guidance.
Additionally, test coverage is extended with a new <8 x float> variant
(llvm.ct.select.v8f32) and corresponding X86 codegen tests to ensure
correct lowering on both x64 and x32 targets.
various: Fix nlist invocations
Fix nlist(3) consumers that either expected our toolchain to prepend an
underscore to symbol names or expected nlist(3) to ignore the mismatch,
as it did until we overhauled it back in May.
While here, also fix cases where the last element in the list had an
empty string instead of NULL as sentinel.
MFC after: 3 days
Fixes: 4617a6cb82a6 ("nlist: Handle multiple symbol tables")
Reviewed by: kib, jhb
Differential Revision: https://reviews.freebsd.org/D59254
[LLVM][CodeGen] Improve CTSELECT fallback lowering and target support modeling (#179395)
This pull request refactors and improves the **fallback handling** of
constant-time select (CTSELECT) in LLVM’s code generation
infrastructure. The changes clarify semantics, simplify
target-capability checks, and improve the correctness and
maintainability of fallback lowering, without changing the intended
constant-time guarantees.
- **CTSELECT semantics**
- Clarified documentation for the `CTSELECT` node to explicitly describe
its operands and its role as the lowering target for the constant-time
select intrinsic.
- **TargetLowering cleanup**
- Removed CTSELECT-specific entries from `SelectSupportKind`.
- Introduced a dedicated `isCtSelectSupported(EVT)` hook to cleanly
separate ISA select support from constant-time guarantees.
- Updated intrinsic lowering to use this new capability check.
[21 lines not shown]