[libc] Change __llvm_libc_stdio_seek to match cookie_io_functions_t (#225632)
This allows using __llvm_libc_stdio_seek directly without a need for an
adapter, matching the rest of the stdio embedding interface.
[LoongArch] Fix crash on SIGN_EXTEND of non-simple vector types (#222250)
Custom lowering of ISD::SIGN_EXTEND assumed a simple vector source,
which does not hold for e.g. the <4 x i24> mask promoted from an i24
vector compare. Bail out so the type legalizer falls back to the
default path; also guard lowerSIGN_EXTEND_VECTOR_INREG.
Fixes #222088
[ADT] Fix cfi-unrelated-cast with polymorphic types & add unittests (#239176)
When storing polymorphic types by value in `SmallVector`, `PagedVector`,
or copying them via `ArrayRef::copy`, raw untyped storage (`void *`) is
allocated and cast to `T *` prior to constructing elements in place.
While casting `void *` to `T *` before construction is valid in C++,
`-fsanitize=cfi-unrelated-cast` checks the vtable pointer at the point
of the cast, reading uninitialized memory before any constructor has
initialized the vtable pointer.
- Annotate `SmallVectorTemplateCommon::begin` and
`SmallVectorTemplateBase::mallocForGrow` with
`LLVM_NO_SANITIZE("cfi-unrelated-cast")`.
- Allocate untyped storage in `ArrayRef::copy` and
`PagedVector::operator[]` (avoiding premature `static_cast<T *>` inside
`BumpPtrAllocatorImpl::Allocate<T>`) and annotate both methods with
`LLVM_NO_SANITIZE("cfi-unrelated-cast")`.
- Add unit tests exercising polymorphic types across `ArrayRef`,
`DenseMap`, `DenseSet`, `MapVector`, `PagedVector`, `PointerUnion`,
[3 lines not shown]
Merge commit 5472aa0c1321 from llvm git (by Piotr Kubaj):
[PowerPC] Use the 16-byte stack and vector alignment on FreeBSD (#232336)
FreeBSD uses the ELFv2 ABI on both byte orders, so it has the same
16-byte stack alignment as Linux. The explicit vector alignment is a
backend workaround that does not depend on the OS. There is no
reason for the layouts to differ.
llvm 21 still keeps the data layout in two places, so the check is
changed in both the PowerPC backend and clang. They have to match, or
clang errors out with a data layout mismatch.
Reviewed by: dim
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D61678
security/ca_root_nss: Update to 3.134
Changes to the certificate store since 3.132:
- Removed Buypass Class 2 Root CA and Buypass Class 3 Root CA
- Removed the websites trust bit from Certigna Root CA, QuoVadis Root CA
1 G3 and QuoVadis Root CA 3 G3
- Set a server distrust date for emSign Root CA - G1, DigiCert Trusted
Root G4 and Autoridad de Certificacion Firmaprofesional CIF A62634068
Changelog: https://groups.google.com/a/mozilla.org/g/dev-tech-crypto/c/MNwzDRxeOOo
Sponsored by: Netzkommune GmbH
(cherry picked from commit b64078572ff32d435a0757a72c74bee9960e39af)
security/ca_root_nss: Update to 3.134
Changes to the certificate store since 3.132:
- Removed Buypass Class 2 Root CA and Buypass Class 3 Root CA
- Removed the websites trust bit from Certigna Root CA, QuoVadis Root CA
1 G3 and QuoVadis Root CA 3 G3
- Set a server distrust date for emSign Root CA - G1, DigiCert Trusted
Root G4 and Autoridad de Certificacion Firmaprofesional CIF A62634068
Changelog: https://groups.google.com/a/mozilla.org/g/dev-tech-crypto/c/MNwzDRxeOOo
Sponsored by: Netzkommune GmbH
[LoongArch] Select [x]vbitset/[x]vbitrev for or/xor of bitcasted shl(splat(1), y)
When the shift of splat(1) is performed in a narrower element type than
the or/xor, e.g.
```llvm
%s = shl <8 x i16> splat (i16 1), %y
%m = bitcast <8 x i16> %s to <2 x i64>
%r = xor <2 x i64> %x, %m
```
the existing [x]vbitset.{b/h/w} and [x]vbitrev.{b/h/w} patterns fail to
match and we emit vrepli + vsll + vor.v/vxor.v.
Fold OP(bitcast(shl(splat(1), y)), x) into
bitcast(OP(shl(splat(1), y), bitcast(x))) for OP in {or, xor} so that
the operation is done in the shift's element type and selected as a
single [x]vbitset or [x]vbitrev.
Assisted-By: LLM
[LoongArch][NFC] Pre-commit tests for [x]vbitset/[x]vbitrev through bitcast
Add tests where the shift of splat(1) is done in a narrower element type
and then bitcast to the type of the or/xor operation.
Assisted-By: LLM
[NVPTX] Add support for s2f6x2 conversion on sm_107a (#243416)
This change adds `sm_107a` to the list of supported architectures for
`s2f6x2` conversion intrinsics in the NVPTX backend, and tests for the
same.
The test has been verified on `ptxas-13.5`.
freebsd.update.conf.5: No crossreferences in title
Crossreferences in titles are strongly discouraged and incompatible
with our own tooling. This is a wontfix by most of manpages ecosystem
because it is bad editorial style in the first place.
MFC after: 3 days
bspatch.1: No crossreferences in titles
Crossreferences in titles are strongly discouraged and incompatible
with our own tooling. This is a wontfix by most of manpages ecosystem
because it is bad editorial style in the first place.
MFC after: 3 days
ix.4: Canoncialize wake sysctl
Integrate the wake sysctl in SYNOPSIS and SYSCTL VARIABLES so that
it is integrated into the search engine and visible in the canonical
sections. Also, add a blank line after the example for visual harmony.
Fixes: c004384343be (ixgbe: Correct Wake-on-LAN configuration)
MFC after: the above is MFCed
Reviewed by: kbowling
Differential Revision: https://reviews.freebsd.org/D61702
rge.4: Polish
+ trim document description to fit on one line
+ canonicalize synopsis
+ move supported speeds to hardware with consistency with latest drivers
+ organize hardware in descending capability for marketing purposes
+ fix cursed line wrapping
+ make link to realtek.com clickable
+ first shipped in 15.2 actually
+ fix authors section line break and linter warning
Reviewed by: adrian
MFC after: immediately because this is shipping in 15.2
Differential Revision: https://reviews.freebsd.org/D61704
[Remarks] Parse YAML hotness as a 64-bit count (#243469)
We hit a parse error when reading YAML remarks with `Hotness` above
`UINT32_MAX`. The parser reads it as `unsigned`, rejecting valid 64-bit
counts. Parse `Hotness` as `uint64_t` to match `Remark::Hotness` and the
YAML serializer, while keeping debug-location fields as `unsigned`.
Add 3 unit tests to the existing YAML parser tests:
- Hotness = 2^32 / UINT64_MAX -> parsed without truncation
- Hotness = 2^64 -> rejected
- DebugLoc.Line = 2^32 -> rejected
Tested on Linux x86-64, Release build with assertions enabled:
- The 64-bit Hotness test fails before the fix for both 2^32 and
UINT64_MAX.
- All 52 Remarks unit tests pass after the fix.
- Hotness = 2^64 and DebugLoc.Line = 2^32 remain rejected.
[3 lines not shown]
[scudo] Clean up zero on deallocate change. (#244070)
Instead of having a separate bool for Zero in the secondary cache entry,
use the already existing Flags instead.
Fix bug where a secondary cache entry is zeroed by releasing to the
kernel, but the entry was not marked as being zeroed. Update the test
for this since it was wrong too.
Move the zeroing of the entry so that if the secondary quarantine is
enabled, the entry is zeroed before being put in quarantine.
Move the zeroing outside of the lock when zero on deallocate is enabled.
Use the ClassId value in combined.h instead of using Header->ClassId.
BUG=b:581873117
BUG=b:582375770
MFC: libdwarf: standard DWARF 5 form names, DW_LANG_C17 and C23
7bb441c86678 added the fixed-size string and address index forms
0x25 to 0x2c as DW_FORM_ref_strx1..4 and DW_FORM_ref_addrx1..4; the
standard (DWARF 5, table 7.6) names them DW_FORM_strx1..4 and
DW_FORM_addrx1..4, with no "ref". Rename them, keep the old spellings
as aliases since the header is installed, and update dwarf_dump.c's
form names accordingly. Add DW_LANG_C17 (0x2c) and DW_LANG_C23 (0x3e),
which clang emits for -std=c17 and -std=c23 units. ctfconv(1) needs
all of these; it carried them in a private header until now.
Reviewed by: markj, emaste
Differential Revision: https://reviews.freebsd.org/D61154
(cherry picked from commit f22d65998fe15b6bed9c8c3a2eede25c706837e1)
[libc] implement sys/mount.h (#244047)
The mount header is for mounting and unmounting filesystems. This PR
adds mount, umount, and umount2, plus tests. Tests are pretty minimal
since we generally can't and don't want to mount or unmount random
files.
Assisted-by: Automated tooling, human reviewed.