Increase MKREPRO robustness
- Use C locale to ensure month abbreviations are as expected
- bail out if MKREPRO_TIMESTAMP is not defined
- bail out if resulting __DATE__/__TIME__ replacement strings are empty
The substitute __DATE__ should be %b %e %Y per a C18 draft
Subtle change that won't make a functional difference in this case;
changed only for semantic correctness.
PR/58170: Yoshitaka Tokugawa: Remove blocking statement when the requestor
asks for for an address that is in the cache and that access is prevented
by a cache acl because the querier has no way to know that this access is
denied, so it is not an abuse.
Pull up following revision(s) (requested by skrll in ticket #671):
sys/uvm/pmap/pmap.c: revision 1.78
sys/uvm/pmap/pmap.h: revision 1.27
Fix types in pmap_page_clear_attributes so that the top bits of
the u_long mdpg_attrs aren't dropped giving atomic_cas_ulong no
chance of completing if any of the top bits is set.
Update pmap_page_set_attributes for consistency.
An ATF test run completed for me with this fix.
port-riscv/58006: ATF tests no longer complete on riscv-riscv64
Pull up following revision(s) (requested by kalvisd in ticket #670):
sys/arch/vax/vax/unimpl_emul.S: revision 1.5
vax/unimpl_emul.S: Initialise locations storing floating-point values with
a constant of the appropriate format
Pull up following revision(s) (requested by jakllsch in ticket #663):
external/bsd/ntp/lib/libntp/Makefile: revision 1.30
external/bsd/ntp/lib/libntp/Makefile: revision 1.31
external/bsd/ntp/lib/libntp/Makefile: revision 1.28
external/bsd/ntp/lib/libntp/Makefile: revision 1.29
use ${MKREPRO_TIMESTAMP} for baking in the date and time.
fix format.
remove now-unused assignment
Format MKREPRO_TIMESTAMP with "%b %d %Y" to correctly substitute __DATE__
frag6: fix calculation of fragment length
Because of the miscalculation, 32 bytes fragmented IPv6 packets
have been wrongly dropped.
See https://mail-index.netbsd.org/tech-net/2024/04/14/msg008741.html
for more details.
Patch from Yasuyuki KOZAKAI (with minor tweaks)
dounmount: Avoid &((struct vnode_impl *)NULL)->vi_vnode.
Member access of a null pointer is undefined, even if the result
should also be null because vi_vnode is at the start of vnode_impl.
Reported-by: syzbot+a4b2d13c0d6d4dac2d07 at syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?extid=a4b2d13c0d6d4dac2d07
Pull up following revision(s) (requested by hannken in ticket #669):
sys/dev/ccd.c: revision 1.190
Using a ccd(4) with GPT (dk* at ccd*) the disk framework will call
ccdstrategy() -> ccdstart() -> ccdbuffer() from softint context.
Allocating the buffer with PR_WAITOK here is forbidden.
Change ccdstart() / ccdbuffer() to report failure back to caller and
pass PR_WAITOK / PR_NOWAIT as an additional argument.
Call ccdstart() with PR_NOPWAIT from ccdstrategy() and on error defer
to the kthread. Call ccdstart() with PR_WAITOK from kthread so requests
from kthread always succeed to allocate the buffers.
Remove the (non working) throttling on low memory as it is no longer needed.
Fixes PR kern/58043 "kernel crash in assert_sleepable() in -current,
dk(4) driver?"
Pull up following revision(s) (requested by hannken in ticket #668):
sys/miscfs/procfs/procfs.h: revision 1.83
sys/miscfs/procfs/procfs.h: revision 1.84
sys/kern/vfs_mount.c: revision 1.104
sys/miscfs/procfs/procfs_vnops.c: revision 1.230
sys/kern/init_main.c: revision 1.547
sys/kern/kern_hook.c: revision 1.15
sys/miscfs/procfs/procfs_vfsops.c: revision 1.112
sys/miscfs/procfs/procfs_vfsops.c: revision 1.113
sys/miscfs/procfs/procfs_vfsops.c: revision 1.114
sys/miscfs/procfs/procfs_subr.c: revision 1.117
Print dangling vnode before panic() to help debug.
PR kern/57775 ""panic: unmount: dangling vnode" while umounting procfs"
Protect kernel hooks exechook, exithook and forkhook with rwlock.
Lock as writer on establish/disestablish and as reader on list traverse.
[23 lines not shown]
Pull up following revision(s) (requested by skrll in ticket #667):
sys/arch/aarch64/aarch64/sig_machdep.c: revision 1.9
sys/arch/aarch64/aarch64/cpu_machdep.c: revision 1.15
kern/58149: aarch64: Cannot return from a signal handler if SP was
misaligned when the signal arrived
Apply the kernel diff from the PR
1. sendsig_siginfo() previously assumed that user SP was always aligned to
16 bytes and could call signal handlers with SP misaligned. This is a
wrong assumption because aarch64 demands that SP is aligned *only while*
it's being used to access memory. Now it properly aligns it before
pusing anything on the stack.
2. cpu_mcontext_validate() used to check if _REG_SP was aligned and
considered the ucontext invalid otherwise. This meant if a signal was
sent to a process whose SP was misaligned, the signal handler would fail
to return because the ucontext passed from the kernel was an invalid
one. Now setcontext(2) doesn't complain about misaligned SP.
Pull up following revision(s) (requested by skrll in ticket #666):
sys/arch/arm/arm32/pmap.c: revision 1.443
port-arm/58135: reproducible pmap KASSERT failure for armv7 with NFS root
Don't unconditionally set XN in pmap_clearbit - only set it if a mapping
exists VM_PROT_EXEC is being cleared.
I've simplified the #ifdefs in the patch from the PR.
Pull up following revision(s) (requested by skrll in ticket #665):
sys/ddb/db_proc.c: revision 1.16
Fix alignment of ddb 'ps/[lw]' output. LID matches PID and has more digits.
Pull up following revision(s) (requested by jakllsch in ticket #664):
share/mk/bsd.hostlib.mk: revision 1.21
Filter out -Wp,-iremap,* from CPPFLAGS as is done in hostprog.mk
Seems to fix build of libnbcompat in reproducible mode on host toolchains w/o -iremap
Renamed border/boundary variables to better describe their use.
Fix edge default values, factor out percentage calculation for more consistent
values. Use device_printf/DPRINTF to show errors instead of aprint variants.
Print raw input for debugging.
Correct capability parsing. Old devices were probed with nonexistent
commands and then used undefined boundary values that made them unusuable.
Fixes PR 57874.
Pull up following revision(s) (requested by andvar in ticket #1959):
sys/arch/x86/x86/viac7temp.c: revision 1.10
viac7temp(4): define module metadata using MODULE() macro and implement
viac7temp_modcmd() to handle module load/unload events.
Fixes PR kern/58148. Look OK by mrg@.
Pull up following revision(s) (requested by andvar in ticket #1835):
sys/arch/x86/x86/viac7temp.c: revision 1.10
viac7temp(4): define module metadata using MODULE() macro and implement
viac7temp_modcmd() to handle module load/unload events.
Fixes PR kern/58148. Look OK by mrg@.