syslogd: Add missing SLIST_INIT()
Add missing SLIST_INIT() in main(). This is not a real bug
because the tls_opt is in BSS and SLIST_INIT() assign NULL.
Written by Masakazu OOHASHI at IIJ.
syslogd: Fix memory-leak during tls_send()
Dealocate unhandled line buffers when error occurred.
Note that it's freed in dispatch_tls_send() on success.
Found and fixed by Masakazu OOHASHI at IIJ.
Do not panic when frame_length > ETHER_MAX_LEN, reset the chip instead
There is no need to panic when RX FIFO desync occurred or garbage frame
arrived. We can recover by resetting the chip, so do that. It's the
same recovery path the driver already used for a bad avail marker.
Do not unload bounce buffer dmamap on error during DMA read/write
Discovered when hacking on jzmmc.
The two functions: sdmmc_mem_single_segment_dma_write_block and
sdmmc_mem_single_segment_dma_read_block are not the owners of bounce
buffer dmamap and have no business in unloading it.
This caused bus_dmamap_sync: bad offset panic during DMA on non-coherent
CPU cores.
Note that this particular code path (bounce buffers) is generally not
well exercised on mainstream platforms, which caused the bug to get
unnoticed.
x86/GENERIC: Enable PCI_RESOURCE.
Has been needed for motherboards that are already several years old
by now, which require the OS to allocate PCI memory regions for some
devices like iwm(4); let's get some experience with having it on by
default.
PR port-amd64/59118: Thinkpad T495s - iwm PCI BAR is zero
make: in meta mode allow more general filtering
When a pre-built tree is cloned or relocated it is necessary to
filter all paths in .meta files that refer to the original location
to refer to the new.
For example (SB names the parent directory of src):
.if ${SB} != ${SB_ORIGIN:U${SB}}
.MAKE.META.FILTER += S,${SB_ORIGIN},${SB},
.endif
for commands; this is applied prior to any filters from
.MAKE.META.CMP_FILTER
but it is also applied to paths in the filemon syscall records
so we do not lose the benefit of them.
Reviewed by: rillig
atomic_store(9): Fix byte indexing on hash-locked architectures.
Fixes the easy part of:
PR kern/60393: hash-locked atomic_store_* is all kinds of busted
The hard part will require redoing these to just hash-lock the whole
store.
Pass the actual mutex to mutex_spin_retry()
Avoid a situation where leftover splraise SR-mask cookie stays in a0.
Make UP kernel that double-acquires a spin mutex die with
"locking against myself" rather misleading garbage-pointer crash.
Part of fix for PR lib/58282
Redo the logic for erasing lines when we have the capability, it was
broken and caused blanks to be written when clearing the screen instead
which caused thrashing and large outputs.
Back out changes to quickch() which were actually just work arounds
for broken hashes and were the cause of an infinite hang seen in
the previous commit of these changes.
wg-userspace(8): Ignore recvfrom errors.
On IPv6 networks, issuing sendto(2) when we've lost IPv6 connectivity
may eventually lead to the next recvfrom(2) failing with EHOSTDOWN.
Example ktrace:
8072 16529 rump_server 1782951176.090085182 CALL sendto(0xa,0x70fb4fa1b50c,0x60,0,0x70fb4f236b00,0x1c)
8072 16529 rump_server 1782951176.090085664 MISC msghdr: [name=0x70fb4f236b00, namelen=28, iov=0xffffc5126bfa8f50, iovlen=1, control=0x0, controllen=0, flags=0]
8072 16529 rump_server 1782951176.090086919 MISC mbsoname: [2601:...]
8072 16529 rump_server 1782951176.090093493 GIO fd 10 wrote 96 bytes
8072 16529 rump_server 1782951176.090094033 RET sendto 96/0x60
...
8072 23248 rump_server 1782951180.090105990 CALL recvfrom(0xa,0x70fb4efe203c,0x233a,0,0x70fb3f7cff50,0x70fb3f7cff4c)
8072 23248 rump_server 1782951180.090106339 MISC msghdr: [name=0x0, namelen=0, iov=0xffffc5126c63ff20, iovlen=1, control=0x0, controllen=0, flags=0]
8072 23248 rump_server 1782951180.090107309 RET recvfrom -1 errno 64 Host is down
In this case, wg_user_rcvthread mistakenly ignored the failing result
and blithely shoved the ssize_t -1 error indicator into
iov[1].iov_len and passed it on to rumpkern_recv_peer:
[34 lines not shown]
wg-userspace(8): Drop <4-byte UDP packets immediately.
Same as the kernel already does. Add an assertion into
wg_receive_packets about this and a couple comments cross-referencing
wg_overudp_cb and wg_receive_packets.
And, while here, as a precaution in case the
inpcb_register_overudp_cb mechanism ever breaks down or gets
refactored, make wg_receive_packets drop <4-byte packets too -- this
path should be hit only when handling handshake packets, so adding
another predicted-not-taken branch here should cost essentially
nothing.
PR bin/60392: assertion "mbuflen >= sizeof(struct wg_msg)" failed
rescue/ldd: Add a couple new symbols for recent rtld changes.
Should fix:
# link rescue/rescue
...
/tmp/build/2026.07.01.20.39.44-i386/tools/lib/gcc/i486--netbsdelf/14.3.0/../../../../i486--netbsdelf/bin/ld: /tmp/build/2026.07.01.20.39.44-i386/obj/usr.bin/ldd/elf32/libldd_elf32.a(load.o): in function `_rtld_load_object':
load.c:(.text+0x23b): undefined reference to `_rtld_objgen'
/tmp/build/2026.07.01.20.39.44-i386/tools/lib/gcc/i486--netbsdelf/14.3.0/../../../../i486--netbsdelf/bin/ld: load.c:(.text+0x256): undefined reference to `_rtld_objrelocpending'
PR lib/59751: dlclose is not MT-safe depending on the libraries
unloaded