x86: Save and restore all supported extended CPU state on signals.
While here, disable Intel AMX, whose state size (>>8 KiB) exceeds
MINSIGSTKSZ (8 KiB), until we are ready to safely update the ABI for
sigaltstack(2). This isn't a regression: we've never had a release
with Intel AMX support.
Previously, on signal delivery, we would only save and restore at
most what FXSAVE does, which is the x87 and SSE registers that always
exist on amd64.
To save and restore the upper halves of the YMM or ZMM registers
(AVX/AVX2/AVX512), or the AVX512 registers ZMM16..ZMM31, or the
enormous AMX state, we need to do more. And we need to do that even if
the signal handler doesn't use AVX instructions, because an SSE
instruction modifying xmmN (e.g., in a vectorized memcpy) will, as a
side effect, zero the high half of ymmN.
Fortunately, the x86 architecture has an extensible mechanism for
[47 lines not shown]
kqueue(2): Tighten branch in previous change.
If sleepok is true, then kmem_zalloc should never fail, and this
routine is inline with constant arguments at every call site, so
let's let the compiler prune dead branches for the call sites that
can sleep.
PR kern/60436: kqueue(2): random kernel null pointer deref in
EVFILT_PROC NOTE_TRACK
PR/60362 (gdb can not insert breakpoints on aarch64)
Update aarch64-netbsd-tdep.c to use modern gdb initialisation method and
re-gen libgdb/arch/aarch64/init.c
PR bin/58577 - install(1) -d issues
Fix issues where "install -d" (with no directory) simply
exit(0)s. That one is kind of marginal, installing nothing
when nothing is needed could be treated as OK, but the man
page does indicate in the SYNOPSIS that with -d, at least
one directory is needed (it says nothing at all about that
in the text).
Second, after creating a directory, if a later operation
(chown, chmod) fails, that is not success, a warning was
issued (good), a bad metalog was being created (bad).
That is clearly a bug (though probably doesn't happen
very often).
And third, when install -d fails, and issues an error,
(warn()) the exit status from install(1) should not be zero.
This only applies after the (rare, I'd assume) errors
from the 2nd fix (which were not previously regarded as
[22 lines not shown]
PR lib/59067 (wctrans got error member)
Patches from the OP (ru_j217) and from RVP - see the PR
This looks to be just correcting what appear to be simple
errors in the code.
XXX pullup -11
Properly fix the libc build
I had this change in early testing, but convinced myself it couldn't
possibly be required, so deleted it - and all worked. But that's
because I do update builds, and this extra dependency required after
the first build.
It shouldn't be required ever, it is insane, but there will shortly
be a PR about that! For now, this does no harm.
PR xsrc/59858 (locale fixes for xsrc)
From RVP - see the PR
Oversimplifying: this causes Mesa to use LC_NUMERIC=C when using
strtod() to parse stuff (ie: the radix char (decimal point) is '.',
regardless of the user's locale).
XXX pullup -11
Fix builds - limit new user.stuff in sysctl to real libc
Keep the user.ostype (etc) new sysctls for the real libc (and
suitable facsimilies) - other places that "borrow" syctl.c for
their own purposes can survive without, if any of those want
to include these mib vars in their version, all that is required
is to add the appropriate Makefile glue to create the header file
in the appropriate place, and add -Ipath to the sysctl.o build, and
the new magic -D to enable it.
Add new user.* nodes to sysctl
This adds the nodes (and documentation for them):
user.ostype = NetBSD
user.osrevision = 1199000600
user.osrelease = 11.99.6
user.built = 2026-07-10 02:46:18 UTC
to the sysctl mib (the values shown there just what happened for a test build).
The first three are more or less identical to the kern.* mib variables of the
same names - the difference is that these reflect userland, or at least, libc
so do not alter just because a new updated kernel is booted without updating
the rest of the system. The fourth gives either the date when libc was
built (as shown) or if the value contains a trailing "!" (after a space
after UTC) the value is the MKREPERO_TIMESTAMP for the build (keep building
with the same value and the date/time there won't alter). The date/time
are always in UTC.
[11 lines not shown]
Adding src/lib/libc/gen/grab-version.sh
A simple script that gets current system version information and
builds a header file containing it. To be used in a following commit.
PR port-sparc64/60428
Just return instead of asserting that devhandle is DEVHANDLE_TYPE_OF.
This happens for USB disks (sd @ scsibus @ umass @ @ uhub @ usb) which
are not enumerated by the firmware.
Original patch from riastradh@ .
Apply the same for wd and fc-al as well.
Verify signal delivery preserves various FPU state.
Should also test AVX512 but I'm not sure I have hardware handy to do
this right now and qemu doesn't emulate it, as far as I know! TBD.
(Plus: there's umpteen different cpuid feature bits to consider,
annoyingly, and that means a lot of manual reading to sort through
them.)
PR kern/60426: Signal handler corrupts AVX (YMM) registers
dev/ic/mpt_netbsd.c - another clang appeasement attempt
and change all strncat() (which were not what was intended)
into strlcat() which implement the original intent.