fifo: Fix EOF reporting in various cases.
According to POSIX:
> When attempting to read from an empty pipe or FIFO:
>
> If no process has the pipe open for writing, read() shall
> return 0 to indicate end-of-file.
So:
1. When there are no writers, after open(O_RDONLY|O_NONBLOCK),
blocking reads should immediately report EOF instead of blocking,
and should continue to immediately report EOF on repeated reads.
Previously, they would simply block, because the wrong socket was
initialized with SS_CANTRCVMORE -- though curiously, nonblocking
reads would consistently report EOF.
[42 lines not shown]
sendmsg(2): Report ENOBUFS instead of success on failure to pass fds.
PR kern/60832: AF_LOCAL stream: sendmsg() with SCM_RIGHTS silently
drops data and descriptors but reports success
cmsg: Test edge case of fd-passing near buffer size.
This test allows sendmsg to fail with ENOBUFS without blocking, and
verifies that the fds are received if it succeeds.
When passing file descriptors, sendmsg can fail with ENOBUFS it did
not or would not block because _after_ the blocking criterion is
tested in the AF-generic uipc_socket.c logic (essentially, whether
the data length + control length would exceed the send buffer size),
the control buffer is expanded on some architectures by converting
each int file descriptor to a struct file pointer in the kernel, and
then the buffer size is checked again in AF_LOCAL-specific logic when
unp_send calls sbappendcontrol.
Frankly I think this is a bad design, and sendmsg should just not
fail for this reason if it has passed the blocking criterion: either
(a) the AF_LOCAL-specific logic should count the user's control
buffer size with ints rather than the the kernel's control buffer
[16 lines not shown]
mips: Avoid shifting into sign bit by using unsigned type instead.
Maybe this loop should do arithmetic in the other direction? But at
least left shifts on unsigned t-bit types are reduced mod 2^t and not
undefined, so this is a simpler change to avoid UB.
PR port-evbmips/60812: UBSan: Undefined Behavior in [sys-src] member
access within misaligned address [..] for type '[..]' which requires
128 byte alignment
policy based routing in NPF addition
route-to interface should be specified using "interface" paramter.
indroduces IPv4 and IPv6 gateway using "via" and "via6" parameters.
introduces "dup-to" to duplicated packet and route duplicated traffic via
npf's configured route while allowing the normal packet continue its
journey.
simple use case
route: "interface" wm1, "via" 192.168.64.100 "via6" fe80::1 "dup-to"
Import tzdata2026e from https://github.com/JodaOrg/global-tz/releases/download/2026egtz/tzdata2026egtz.tar.gz
Summary of changes in tzdata2026e (2026-09-29 17:14:38 -0700):
* Manitoba’s 2026-03-08 spring forward was its last foreseeable clock
change, as it moved to permanent -05 thereafter.
* As the change affects both America/Winnipeg and its backward
compatibility link, the obsolescent setting TZ="Canada/Central"
will now use the abbreviation EST for affected timestamps,
akin to TZ="Canada/Pacific" behavior introduced in 2026b.
* In 1925 Ireland fell back on 09-20 not 10-04 (thanks to Stan Ulbrych).
fssconfig(8): Clarify some details.
- Note up front that fssdev can be mounted with mount(8).
- Emphasize that fssconfig -c takes a mount point, not an arbitrary
directory.
- Break the prose paragraph of options for snapstore into a bulleted
list.
- Clarify that you needn't use fssconfig(8) at all with dump(8).
- Move dump -X/-x option up front to make it more obvious.
Pull up following revision(s) (requested by joe in ticket #1344):
usr.sbin/npf/npfctl/npf_build.c: revision 1.64,1.67
improve table load error in npf
an EEXIST should clearly state already defined and a load failure should
also clearly be stated. do not class all error returns under EEXIST
since npf_table_insert can return other errors aside EEXIST.
provide more context into npf reload failures with const tables.
PR lib/60740
Pull up following revision(s) (requested by joe in ticket #494):
usr.sbin/npf/npfctl/npf_build.c: revision 1.64,1.67
improve table load error in npf
an EEXIST should clearly state already defined and a load failure should
also clearly be stated. do not class all error returns under EEXIST
since npf_table_insert can return other errors aside EEXIST.
provide more context into npf reload failures with const tables.
PR lib/60740
Pull up following revision(s) (requested by tsutsui in ticket #493):
sys/kern/vfs_bio.c: revision 1.309
vfs_bio: retry fresh buffer allocation if recycling fails
getnewbuf() uses buf_lotsfree() to choose whether to
allocate a fresh buffer before trying BQ_AGE and BQ_LRU.
If fresh allocation is skipped and no buffer can actually be
recycled, it sleeps on needbuffer_cv even when the buffer cache
is still below its high water mark.
In that situation, a thread which could release a buffer may
itself need another buffer, resulting in a deadlock.
To avoid this, if recycling finds no usable buffer and bufmem is
still below bufmem_hiwater, make one more PR_NOWAIT fresh allocation
attempt before sleeping. See PR kern/60584 for details.
Pull up following revision(s) (requested by tsutsui in ticket #492):
sys/arch/atari/atari/atari_init.c: revision 1.121
sys/arch/atari/atari/atari_init.c: revision 1.122
atari: Fix fatal 68030 MMU TC initialization bug
ATARITT kernels from NetBSD 11.0 and -current fail to boot on my
Atari TT030.
The inline asm that loads TC specifies only `"a" (&tc)` as an input,
so the compiler may eliminate the initialization of tc as a dead store.
Then the generated code loads an uninitialized value from the stack
into TC.
Add an `"m" (tc)` input operand to the inline asm so that the compiler
knows that the asm reads tc from memory.
[26 lines not shown]
Add various Intel models (Lakefield, Granite Rapids, Arrow Lake, Panther Lake,
WildCat, Clearwater Forest, Sierra Forest, Lunar Lake).
Fix Yonah name (missing comma between Pentium and Core Duo).
Add few more AMD K8 models (Lima, Sherman, Windsor FX, Tyler, Richmond).
Fix overly aggressive rejection of valid servers.
Patch taken from https://bugs.ntp.org/3877 . This patch is likely to be
included in the next release.
Fixes PR bin/60831
Rewrite Thumb-2 NEON into ARM form before dispatching the trap.
Now neon_handler() recognize it and turns the FPU on.
Fixes execution of Thumb-2 userland on ARMv7 NEON kernel, which
previously was SIGILLed on the first SIMD code after switching the
FPU off.
Use lfence to serialize rdtsc for VIA Nano and up, same as Linux do.
Unlike Linux I didn't add a 64-bit guard on assumption that it should work
the same way and the 64-bit version will likely be the preferred one by users.
planning to pull up to netbsd-11, netbsd-10.
PR kern/68010 - sys/conf/osrelease.sh - add comments
Add some comments to osrelease.sh to explain its purpose,
keep away gawkers, etc...
While here, fix a couple of sh quoting botches.
NFCI.
No pullups.
Include model 7 in CPUID_TO_MODEL() extended model check.
Accommodates Zhaoxin CPUs using extended model.
Update the comment accordingly and fix one typo in it.
evbarm/INTEGRATOR_CP: establish interrupt handler for PL181 controller
PR/60818 plmmc_ifpga.c does not establish interrupt handler for PL181 controller
Capture the handle returned from ifpga_intr_establish - someone might
write the code to call ifpga_intr_disestablish.
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.