Reland "[libc] Implement basename and dirname in libgen.h #204554" (#205352)
Added the POSIX standard functions basename and dirname under a new libgen.h header. The implementations modify the input path in-place using cpp::string_view to determine boundaries safely.
Added find_last_not_of to cpp::string_view to support trailing slash removal.
Implemented:
libc/include/libgen.yaml, libgen.h.def: Public API definitions.
libc/src/libgen/basename.cpp, dirname.cpp: Generic implementations.
libc/test/src/libgen/: Unit and hermetic tests.
Registered the new entrypoints for all active Linux targets (x86_64, aarch64, arm, riscv) and added docgen configuration.
The tests are skipped when using ASan because death tests do not currently work with them.
Assisted-by: Automated tooling, human reviewed.
net/frr: Some options are in the rc file, some in zebra. Distinguish whats still possible to be changed in general options by hiding zebra relevant options
handbook/jails: Small fixes to the Linux jail section
- Add missing containers/ path in one instance
- Move the jail.conf creation to the beginning of this section (slightly
modified from the original patch), because it fits better there
instead of letting the reader know about it when starting the jail
- Use sh as the shell executed when running jexec to ensure it is a jail
that is present in Linux
- Rephrase a sentence to avoid a comma and instead use "and" to connect
the two packages to install (also modified from the original
submission)
Event: Halifax Hackathon 202606
PR: 295777
Differential Revision: https://reviews.freebsd.org/D57771
fts: refactor to use fd-relative operations internally
Replace all _open() calls with _openat() in __fts_open(), fts_read(),
and fts_children().
Add fts_dirfd to FTSENT. Callers can use
openat(ent->fts_dirfd, ent->fts_name, ...) to access files
safely without relying on fts_accpath, which enables:
1. Capsicum capability mode where path-based operations fail
2. Security-sensitive programs that avoid TOCTOU races
Replace statfs(ent->fts_path) with _fstatfs(ent->fts_dirfd) in
fts_ufslinks() when fts_dirfd is valid, falling back to statfs() for
root-level entries where fts_dirfd is -1
This is a preparatory change for fts_openat() which will allow
callers to provide a pre-opened directory fd, enabling fts(3)
traversal inside Capsicum capability mode.
[5 lines not shown]
sys: use curthread_pflags_set/restore to manage TDP_DEADLKTREAT for uio
For i386, remove now unused label.
Remove unneeded initialization of the 'save' local.
Reviewed bu: brooks
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D57726
Allocate mbufs in high memory if only 64 bit DMA interfaces exist.
Mbufs on amd64 were allocated below 4 GB so that devices not capable
of 64 bit DMA can access the memory. Interface drivers use
BUS_DMA_64BIT to allow the DMA layer doing 64 bit transfers. Now
flag interfaces with IFXF_MBUF_64BIT that are capable of 64 bit DMA
on all their mbuf rings.
If only such interfaces exist in the system during amd64 boot,
allocate mbufs and mbuf clusters also in high memory. Other
architectures may be limited to 32 bit memory anyway or use an
IOMMU. On riscv64 or arm64 busses may exists that support less
than 64 bit, this will be handled later.
Hotplug devices that do not support 64 bit DMA will use bounce
buffering. By changing the flags in device drivers we can force
bounce buffering and find missing calls to bus_dmamap_sync().
OK kettenis@ deraadt@
[mlir][arith] Reject signful integer element types in `arith.constant` (#204937)
Update arith.constant verification to reject integer constants with
signed and unsigned element types including shaped constants like
tensors and vectors, as the arith dialect does not support
signed/unsigned types.
This incidentally address cases where further lowering would crash (e.g.
SPIR-V constant lowering used IntegerAttr::getInt() on an unsigned
integer attribute from tensor<2xui8>)
Fixes #204911
libusb: Add missing default in handling option switch
This makes GCC happy
Fixes: 2879c818e553 ("implement libusb_set_option")
Event: Halifax Hackathon 202606
Sponsored by: The FreeBSD Foundation
[Hexagon] Add KCFI support for forward-edge control flow integrity (#191746)
Add KCFI support for Hexagon. KCFI provides lightweight forward-edge CFI
for indirect calls by embedding a type hash before each function and
checking it before indirect calls, without requiring LTO.
basilisk: Update to 2026.06.12
This brings the engine up to date with the most recent Pale Moon
releases, with associated security fixes and JavaScript improvements.
As such the diff has been reduced with the palemoon package.
[clang] Avoid per-builtin std::string allocation in initializeBuiltins (#205162)
`initializeBuiltins()` previously registered every builtin through an
allocated std::string every time a `CompilerInstance` initialized. This
was hot for module-heavy builds, where each built module re-registered
the full set.
Add `getBuiltinNameInto()`, which writes the name into a caller-provided
buffer and returns a `StringRef`, with no allocation when the shard has
no prefix (the common case). `Info::getName` now delegates to it so the
two cannot diverge. This change is output behavior-preserving.
Resolves: rdar://178672190
[clang] Update C++ DR status page (#205342)
The post-Brno draft will not be out for three more weeks, but Brno
updates for Core issues statuses are already trickling in.
Notably, [CWG507](https://cplusplus.github.io/CWG/issues/507.html)
"Ambiguity with built-in binary operator candidates for class object
convertible to built-in type", which used to be marked as a duplicate of
[CWG260](https://cplusplus.github.io/CWG/issues/260.html) "User-defined
conversions and built-in `operator=`", is open again, presumably because
it contains an example that goes beyond the scope of CWG260. Relatively
recent CWG thread that might be related (WG21 access required):
[link](https://lists.isocpp.org/core/2025/08/18478.php).