nd6: Keep addresses tentative in in6_if_up
in6_if_up() runs from the IFNET_EVENT_UP handler on every
IFF_UP 0->1 transition, whether or not the interface is ifdisabled.
Ignore state transitions in in6_if_up() for now.
Reported by: llm-postcr
Fixes: f0ce2ae67f9f ("nd6: Do not make SLAAC addresses usable with ifdisabled")
[Xtensa] Reserve the emergency spill slot for unencodable frame offsets (#243518)
We want to reserve an emergency spill slot when a frame offset cannot be
encoded in the instruction. This can happen when the instruction's reach
is not enough, when the offset isn't a multiple of the instruction's offset
scale (e.g. with inline assembly), or when incoming arguments push the
address out of reach.
Compute an upper bound on the stack size: start from
MachineFrameInfo::estimateStackSize() (which can underestimate) and add
each object's worst-case alignment padding. Then check whether every
instruction can encode its frame offset. Since the layout isn't known
yet, check against every offset the object could end up at. Reserve the
slot if any instruction can't.
We can also skip reserving a slot for instructions that can reuse their
destination register for the address calculation, specifically far
loads.
[6 lines not shown]
[Clang] [Driver] Normalize target features forwarded to external tools (#245200)
Use unifyTargetFeatures() before constructing -mattr= arguments for
Hexagon external assembly and AMDGPU linker-plugin forwarding.
Keep the last selection for each feature and preserve the relative order
of surviving entries, matching Clang's normal target-feature emission.
Preserve existing empty-list handling; no overall behavior change is
expected.
Fixes #245199
Signed-off-by: Rishabh Bali <rbali at qti.qualcomm.com>
Co-authored-by: Rishabh Bali <rbali at hu-rbali-hyd.qualcomm.com>
[GitHub] Label floating-point PRs touching APFloat, KnownFPClass, and related files (#246233)
This should label PRs if they touch, APFloat, ConstantFPRange,
KnownFPClass, and other floating-point related files.
TargetLibraryInfo: Add NetBSD, OpenBSD and DragonFly function list (#150885)
Describe which libc functions NetBSD, OpenBSD and DragonFly have, so
that LLVM uses the ones that exist and does not emit calls to ones
that do not.
NetBSD:
- getc_unlocked, getchar_unlocked, putc_unlocked and putchar_unlocked
are available.
OpenBSD:
- ffsl and ffsll are available.
- getc_unlocked, getchar_unlocked, putc_unlocked and putchar_unlocked
are available.
DragonFly:
- bcmp, ffsl, ffsll, fls, flsl and flsll are available.
- fputc_unlocked, fputs_unlocked, fread_unlocked, fwrite_unlocked,
getc_unlocked, getchar_unlocked, putc_unlocked and putchar_unlocked
[11 lines not shown]
[ValueTracking] Only use ninf to rule out infinite fma operands (#246224)
computeKnownFPClass for fma/fmuladd applied KnownNotFromFlags to the
operands. That mask includes classes ruled out for the result by
nofpclass on the call and by dominating conditions, not just the
nnan/ninf flags.
A NaN operand always gives a NaN result, so a NaN-free result still
means NaN-free operands. That is not true for infinity: fma produces
NaN when multiplying zero by infinity, or when adding two exact
infinities of the opposite sign. A result known not to be infinite says
nothing about the operands, and treating them as non-infinite lets NaN
be ruled out wrongly.
Only use the ninf flag to rule out infinite operands.
Fixes #246208
---------
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
sysrc: Restore the ability to pin default value
Fix 1 issue identified in post-commit review of eaf7113:
POSTCR-1: "unchanged" short-circuit counts a value that only comes
from RC_DEFAULTS, so `sysrc -f file var=<default>` writes nothing.
Add an ATF test to ensure we preserve this functionality.
Reported by: llm-postcr
Fixes: eaf7113bef8f ("sysrc: Add "unchanged" messages")
Merge tag 'for-7.4-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux
Pull btrfs fixes from David Sterba:
"A number of fixes as reported on the Sashiko Bugs page and the usual
bag of regular fixes:
- send fixes:
- fix sending file hole punching command in incremental mode
- fix invalid memory access for inline extent
- fixes for nowait semantics:
- fix memory allocation in encoding read ioctl
- don't wait for ordered extents in buffered write
- don't propagate nodatacow from mount option to files with
compression flag inherited from parent directory
- fix fsync mode in encoded write so the data are fully written
[38 lines not shown]
lualoader: don't run a failed command twice from the prompt
interp_run() hands each command line to cli_execute, which runs
builtins through loader.command. If that returned an error, it then
ran the command again with interp_builtin_cmd(), as a fallback for when
lua couldn't run the command at all. A command that simply failed thus
ran twice, printing any errors twice and repeating whatever it did
before it failed.
Only fall back when the lua call itself failed, and otherwise take the
command's own result.
Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D61845
loader: i386: fix vectx handling in chain error paths
Once vectx_open() succeeds, the stat, device, root device and read error
paths all returned without freeing the context, leaking it.
We also closed the fd before calling vectx_close(), which may need to
read the remainder of the file to finish hashing it. This is harmless
as-is because we've always read the whole file by that point, but close
it afterwards so that we aren't relying on that.
Reviewed by: sjg
Sponsored by: The FreeBSD Foundation
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D61840
stand/zfs: leave variables that nvstore doesn't own alone
Setting an nvstore variable also sets it in the loader's environment,
both when we store it and when we import the nvstore at startup. We
did that with EV_NOHOOK, which is right for our own variables, since
their hook is what stores them. A variable that something else in the
loader created, e.g., currdev or console, has hooks of its own that
validate it or act on it. We bypassed those, so a stored value never
really took effect, and we could set or discard a variable whose hooks
would have refused.
Refuse to set or unset such a variable with EPERM before we touch the
pool label, and skip it when we import the nvstore.
Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D61844
libsecureboot: don't remember files accepted unverified
verify_file() caches the result for each file by dev/ino, including
VE_UNVERIFIED_OK. That status only says that the file was unverified
but acceptable at the severity the caller asked for, but a later
request for the same file takes the cached result as-is: verify_prep()
and vectx_open() both treat it as "not verifying this", even at
VE_MUST.
As a result, anything that could be opened at a lower severity could
then be loaded where it must verify, e.g.:
include /boot/modules/evil.ko # VE_WANT, no fingerprint
load evil # VE_MUST, but cached as OK
Stop caching VE_UNVERIFIED_OK so that each request is judged by its own
severity, under whatever policy is in effect at the time. Files that
would be accepted unverified have no usable fingerprint, so there's
nothing to hash; they're just looked up again (and reported, if verbose)
[6 lines not shown]
loader: fix double free of vectx on verification failure
vectx_close() always frees the context it is handed, but both
file_loadraw() and the i386 chain command would free(vctx) again when
it reported a verification failure.
Reviewed by: imp, sjg
Sponsored by: The FreeBSD Foundation
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D61839
lualoader: match the .lua extension literally
Both config.processFile() and try_include() checked for a .lua
extension with ".lua$", but '.' matches any character, so a name like
foo_lua also matched.
In processFile(), that meant that a config file such as /boot/foo_lua
was run as lua, though it was opened like any other config file.
With veriexec, that file only needs VE_WANT rather than the VE_MUST
that we expect for lua code, so an unverified file could be run as lua.
Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D61843