Apply upstream commit "Change file initialization to use INIT_GDB_FILE macro".
Tom Tromey on Thu, 26 Jun 2025, id 5fe70629ceafc157d896adec7799a8888d51dd6b
kernel_lock_spinout: fix an assertion failure
it's possible for the calling lwp to be preempted in the middle
of this function and migrated to the "holder" cpu.
this commit would fix the following crash seen on my qemu/nvmm VM
on a busy host:
```
[ 36199.6483272] cpu0[1851 nbxz]: kernel lock spinout
[ 36199.6483272] panic: kernel diagnostic assertion "curcpu() != ci" failed: file "/root/git/netbsd-src/sys/kern/subr_ipi.c", line 358
[ 36199.6483272] cpu0: Begin traceback...
[ 36199.6483272] vpanic() at netbsd:vpanic+0x189
[ 36199.6634956] kern_assert() at netbsd:kern_assert+0x4b
[ 36199.6634956] ipi_unicast() at netbsd:ipi_unicast+0x1a2
[ 36199.6634956] _kernel_lock() at netbsd:_kernel_lock+0x254
[ 36199.6634956] bdev_strategy() at netbsd:bdev_strategy+0xab
[ 36199.6634956] spec_strategy() at netbsd:spec_strategy+0x77
[ 36199.6634956] VOP_STRATEGY() at netbsd:VOP_STRATEGY+0x3c
[ 36199.6755210] uvm_swap_io() at netbsd:uvm_swap_io+0x2c1
[8 lines not shown]
zfs: fix zfs_range_lock_try
the change "zfs: add zfs_range_lock_try" was incomplete.
i've observed the following deadlock:
```
db{0}> tr /a ffff96777f74f400
trace: pid 0 lid 125 at 0xffffce80c3203b50
sleepq_block() at netbsd:sleepq_block+0xf4
cv_wait() at netbsd:cv_wait+0xca
pool_grow() at netbsd:pool_grow+0x47b
pool_get() at netbsd:pool_get+0xae
pool_cache_get_slow() at netbsd:pool_cache_get_slow+0x136
pool_cache_get_paddr() at netbsd:pool_cache_get_paddr+0x27d
kmem_intr_alloc() at netbsd:kmem_intr_alloc+0x13c
kmem_alloc() at netbsd:kmem_alloc+0x2a
zfs_range_lock_impl() at zfs:zfs_range_lock_impl+0x30
zfs_netbsd_putpages() at zfs:zfs_netbsd_putpages+0x1c0
VOP_PUTPAGES() at netbsd:VOP_PUTPAGES+0x43
[6 lines not shown]
Update to dhcpcd-10.3.1 with the following changes:
* BSD: don't send uninitialised memory using ps_root_indirectioctl
* Fix fallback_time option by @ColinMcInnes
* IPv4: Ignore DHCP state when building routes
* options: Ensure ldop is not NULL dereferenced
* route: Routes may not have an interface assinged
* options: Ensure that an overly long bitflag string does not crash
* options: Don't assume vsio options have an argument
* common: Cast via uintptr_t rather than unsigned long in UNCONST
* privsep: Ensure we recv for real after a successful recv MSG_PEEK
* DHCP: Add parentheses to macro definitions
* ipv6nd: empty IPV6RA_EXPIRE eloop queue when dropping
Add support for mercurial (Hg)
This version will use hg if in a src directory hg clone,
or CVS if in a checked out CVS tree.
Normal usage remains:
sh tzdata2netbsd =
Clean-up / consolidation of m68k bus error / address error handling
code. This is not a very radical change for most m68k platforms,
since they were using a version of this re-factored code already via
an #include directive in locore.s. Now, however, the bus error handlers
are split into CPU "generation"-specific files, and brought into the
kernel via the CPU options in the kernel config file (the goal being
to reduce boilerplate in each locore.s).
The more notable changes:
- amiga and atari no longer have their own copy of each handler, and
some of their local tweaks have been folded into the shared code.
- sun2's bus error handling code has been re-factored into a shared
buserr_10.s to facilitate support for other 68010-based systems (all
of which have their own custom MMU).
- sun3's bus error handling code has been re-refactored into the
shared buserr_2030.s. The Sun3-specific MMU handling is treated
just like the HP-specific MMU handling that was already there.
This additional #ifdef is a small price to pay for more code sharing.
- sun3x now also uses the shared buserr_2030.s rather than an identical
[12 lines not shown]
Make the _C_LABEL definition match exactly <sys/cdefs_elf.h> because
atomic_cas.S now includes <sys/ras.h> and <sys/ras.h> includes <sys/cdefs.h>
because it wants things like __CONCAT(). I think it is better to do it this
way rather than #undef here or in atomic_cas.S because then if the definition
changes it will break again.
libX11: suppress about 2000 lint warnings
Realistically, nobody is going to look at these since there are so many
of them and they repeat. Instead, allow to focus on the remaining
warnings that don't occur so often.
PR/60011: TLS alignment wrong on powerpc
Fix previous where I only got the alignment right for the architectures
where the thread pointer points to the struct tcb. Handle the
architectures that have a thread pointer that is relative to end of the
struct tcb, e.g. powerpc.
Hopefully the commit in the tls.c explains what's going on.
Thanks to riastrah@ and andvar@ for comments/things to fix.
make posix timer family functions reject itimer timer ids
we provide two sets of similar apis:
* BSD itimer api (setitimer, ITIMER_xxx, and friends)
* posix timer api (timer_create and friends)
for some reason, some of posix timer functions
(namely timer_settime, timer_gettime, timer_getoverrun,
timer_delete) are allowed to operate on timer_id=2,
which actually belongs to the BSD itimer. (ITIMER_PROF)
it seems that it has always been this way since they were
introduced on the nathanw_sa branch in 2001.
10 years later, in 2011, it got a bit worse by the addition
of ITIMER_MONOTONIC, which is also accepted by the posix
timer functions.
as there seems to be no reasons to give the special
[2 lines not shown]
zfs: purge name cache on teardown
this fixes name cache inconsistencies on
certain events. eg. rollback
```
zfs create $FS
echo a > /$FS/a.txt
echo b > /$FS/b.txt
echo c > /$FS/c.txt
zfs snap $FS at 2
rm /$FS/b.txt
cat /$FS/a.txt
cat /$FS/b.txt || : # create negative cache entry
cat /$FS/c.txt
zfs rollback $FS at 2
cat /$FS/a.txt
cat /$FS/b.txt # hit the negative cache entry because of the bug
cat /$FS/c.txt
```
zfs: fix case insensitive / utf-8 normalized file names
zfs has a few options for file name comparison.
when they are enabled, disable netbsd's name cache, which only
supports exact-byte-matching, to avoid inconsistent behaviors.
cf. "casesensitivity" and "normalization" in zfs(8)