amd64 memchr(3): Fix case when ptr + len wraps around address space.
While here, give meaningful names to the various internal labels.
PR lib/60744: memchr(3) is busticated
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.
Tested with both NetBSD 11.0 and -current on Atari TT030 and
must be pulled up to netbsd-11.
firefox52: fix a type problem
Still doesn't build:
ld: warning: ../../../firefox-52.9.0esr/toolkit/library/StaticXULComponents.ld contains output sections; did you forget -T?
ld: cannot find -lcrmf: No such file or directory
ld: cannot find -lsmime: No such file or directory
ld: cannot find -lnss: No such file or directory
ld: cannot find -lnssutil: No such file or directory
ipsec: Nix wrong assertion added in key.c rev. 1.288.
On LP32 platforms, the xpl0 pointer may not be 64-bit aligned itself;
we just require all the _internal_ structures inside that buffer to
be 64-bit aligned.
Should fix various ipsec tests mostly on LP32 platforms.
PR kern/60669: netipsec key_sp2msg buffer overrun
i915: Fix null pointer deref in i915_gem_object_get_dma_address.
Matches the Linux code in the #else this way.
PR kern/60755: i915drmkms crashes on Intel Bay Trail GPU making the
machine rebooting
compat_linux inotify(2): Re-check number of entries in loop.
Might have changed between two calls to inotify_readdir.
XXX Should maybe not do two calls to inotify_readdir! Can we hold
the vnode lock or use a fixed temporary buffer size or something?
PR kern/60756: compat_linux inotify(2): TOCTOU and locking shenanigans
compat_ultrix: Fix shmat/shmdt confusion.
Also omit needless initializer while here, which was added to pacify
a gcc12 warning without actually fixing the problem the warning
should have alerted us to.
kern/60753: compat_ultrix shmsys(2): busted shmdt
compat_linux, compat_linux32: Always zero syscall args on stack.
This is an attempt to systematically eliminate a class of stack
garbage bugs:
PR kern/60750: compat_linux: stack garbage mistakes
compat_linux recv(m)msg(2): Fix mistakes in error branches.
1. If copying out the cmsghdr _succeeds_, we want to copy out the
cmsg data -- not if copying out the cmsghdr _fails_.
2. If any part of the BSD cmsg to Linux cmsg conversion or copyout
_fails_, we must pass the whole mbuf chain to free_control_mbuf to
close all the file descriptors in it -- otherwise, they would leak
because the user process has no idea it has been given the fds.
3. Add missing `if (error)' before `return error' in recvmmsg(2)
branch for copying in timeout.
Found while reviewing code nearby:
PR kern/60748: compat_linux: possible integer truncation/overflow
issues in socket syscalls
compat_linux recv(m)msg(2): Tighten arithmetic bounds.
And avoid overflow test idioms that involve doing the overflow.
PR kern/60748: compat_linux: possible integer truncation/overflow
issues in socket syscalls
databases/mongodb4: Fix type error objected to by gcc12 (NetBSD 11)
Resolves building under NetBSD 11.
Patch from Paul Ripke, who is running it with unifi.
Unifi starts for me with on NetBSD 11 (with no previous db).