[NVPTX] Fix for device function pointer having the same name as generated callprototype (#205639)
The NVPTX backend generates `.callprototype` directives for indirect
calls with compiler generated names previously based off a unsigned
unique call site number. If a \_\_device\_\_ global function pointer is
named prototype_N with a call to that function, we emit ptx with a
global and callprototype with the same name. This PR updates ISel
lowering to produce a unique temporary symbol instead to avoid naming
conflicts with user defined variables.
www/py-proxpi: Require requests-file>=2.1.0 for FILE option
requests-file < 2.1.0 doesn't set Response.request in
FileAdapter.send(), causing AttributeError: 'NoneType' object
has no attribute 'url' in _cache.py when proxpi is configured
with a file:// index or extra index URL.
vm_swapout: Restore handling of RLIMIT_RSS
In commit 13a1129d700c, I removed the mechanism by which the pagedaemon
signals the swapout thread when page reclamation is unable to keep up
with demand. This is because the swapout thread's main action in this
case is to swap out sleeping processes, but we removed this support.
However, it had the secondary effect of causing the swapout thread to
enforce RLIMIT_RSS when racct is not enabled. Without it, if
racct_enabled is false, nothing ever kicks the swapout thread.
Restore the old behaviour of trying to enforce RLIMIT_RSS when the page
daemon is unable to keep up with demand. I'm not at all convinced this
is a good way to implement the limit, but the change wasn't intentional,
so let's restore it for now.
Fixes: 13a1129d700c ("vm: Remove kernel stack swapping support, part 1")
Reviewed by: olce, kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D56142
Don't crash reloading a corefile saved from a live process (#224324)
Saving a live process as a corefile and reloading it can abort lldb
itself:
```
$ cat main.c
int main(int argc, char **argv) { return argc; }
$ cc -g -O0 -o a.out main.c
$ lldb ./a.out -o 'b main' -o run \
-o 'process save-core --plugin-name=minidump --style=stack core.dmp' \
-o quit
$ lldb -c core.dmp
(lldb) target create --core "core.dmp"
...
Assertion failed: (0 && "breakpoint has no resolved locations"), function Activate, file InstrumentationRuntimeBoundsSafety.cpp, line 467.
```
`InstrumentationRuntimeBoundsSafety::CheckIfRuntimeIsValid` only checks
[42 lines not shown]
[X86] Fix CCMP miscompile for flag-source-folded SETCC leaves (#217682)
EmitCmp does not always return a comparison: where
it can it reuses the EFLAGS of an instruction that is computed anyway,
so (X | Y) == 0 comes back as the flags of an X86ISD::OR, (X & Y) == 0
as those of an X86ISD::AND, and (0 - X) == Y is rewritten into
(X + Y) == 0 and comes back as the flags of an X86ISD::ADD.
Only a subtract (CCMP) and an AND (CTEST) have conditional forms, so
build the link from the comparison's own operands rather than from a
flag source:
A comparison with zero can set neither OF nor CF, and TEST clears both,
so the last two are flag-equivalent for every condition code. An equality
comparison is a test of the operands' XOR, so an already live XOR is still
reused instead of keeping both operands live.
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply at anthropic.com>
[HLSL][DirectX] report a fatal error when resource access is not guaranteed to be unique (#225285)
Instead of just a diagnostic, report a fatal error when resource access
is not guaranteed to be unique.
Closes #224422
Assisted by GPT-5.6 Sol
pf: carry pfra_fback in the netlink pfr_addr encoding
The netlink encoding of struct pfr_addr omits pfra_fback, so no
per-address feedback reaches userspace. In particular,
pfr_get_astats() marks entries of tables without counters with
PFR_FB_NOCOUNT, which pfctl uses to skip their counters, so
"pfctl -v -T show" prints zero counters for such tables.
Add PFR_A_FBACK, emit it from the kernel and decode it in libpfctl.
Add a regression test.
Reviewed by: kp
Approved by: kp (mentor)
Fixes: 08f54dfca197 ("pf: convert DIOCRGETASTATS to netlink")
Sponsored by: Rubicon Communications, LLC ("Netgate")
loader.efi: Retain standalone network configuration
DHCP initmd discovery used net_configure() to open and configure SNP,
then immediately closed the socket and released the protocol.
Selecting net0 as currdev subsequently required another exclusive
SNP attach, which may hang on some EDK II firmware.
Keep the configured socket available for ordinary network consumers
so NFS boot can reuse it. Add an explicit deconfiguration operation
and invoke it only when an initmd URL requires handing SNP back
to the firmware network stack.
Signed-off-by: Krzysztof Galazka <krzysztof.galazka at intel.com>
Reviewed by: imp
Assisted by: Github Copilot (GPT-5.6 Sol)
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D59999
loader.efi: Apply command-line DHCP overrides earlier
Ability to override DHCP options with command-line arguments
was affected by intoduction of initmd support. Initmd discovery
configures the network before loader arguments
were parsed, so a dhcp.root-path override was unavailable
during the first network configuration. Move parsing
arguments earlier and apply dhcp.root-path even if DHCP response
does not contain option 17. This allows providing a dynamic NFS
root e.g. by chain loading loader.efi from iPXE.
Signed-off-by: Krzysztof Galazka <krzysztof.galazka at intel.com>
Reviewed by: imp
Assisted by: Github Copilot (GPT-5.6 Sol)
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D59998
[Flang] Fix install components and dependencies (#227365)
Summary:
Two things. After https://github.com/llvm/llvm-project/pull/221724 a
plain `find_package(Flang)` no longer worked with implicit dependencies.
It would reference targets that weren't installed and weren't on the
core dependency path.
Also, ensure that the flang headers have a proper dependency on
tablegen. Makes the generation implicitly depend on them so this stays
in-sync.
[clang-format] Fix crashes on directives in discarded macro call args (#221501)
Rewinding discarded macro arguments processes their preprocessor
directives twice, duplicating lines and causing crashes. Restore the
preprocessor bookkeeping on rewind, but retain the first set of
directive lines and discard duplicates during replay.
Exclude expansion EOF tokens from directive ranges so directives before
empty expansions are still formatted.
Fixes #131157
Assisted-by: Claude Code
[libc] Add setgroups and initgroups entrypoints (#227272)
Add the setgroups and initgroups entrypoints from <grp.h> (GNU
extensions).
A Linux syscall wrapper is added for setgroups, supporting both
SYS_setgroups and SYS_setgroups32. The initgroups entrypoint initialises
the supplementary group access list for a specified user by reading the
group database using a scoped database stream and setting the resulting
groups via setgroups.
Assisted-by: Automated tooling, human reviewed.
fssconfig(8): some minor improvements
Try to clarify snapstore a bit more with more explicit language.
The proverbial desperate sysadmin at 3am doesn't need an exegetic
exercise.
[BoundsSafety][NFC] Add the count-refill logic for late-parsed bounds attributes
Introduce the machinery that fills in a late-parsed bounds attribute's
argument once the enclosing record is complete, without wiring it up yet.
Nothing creates an incomplete CountAttributedType or records one for
completion at this point, so this is inert -- the functions are unused and
behavior is unchanged. Activation follows in the next commit.