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.
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
news68k: add wsdisplay(9) support for NWB-225 framebuffer console
In its 27th year in the NetBSD source tree, news68k finally
gets wsdisplay(9) support for its native framebuffer console.
Character output is implemented directly by the driver and
does not rely on PROM routines.
Add fbbm(4) driver for the NWB-225 framebuffer used on NWS-1750.
The NWB-225 does not provide a CPU-accessible linear framebuffer
so we cannot use MI rasops(9) to support wscons(9). Instead,
implement wsdisplay_emulops directly with the board's ROP engine,
using VRAM-to-VRAM copy, constant fill, and host-to-VRAM write
operations for cursor handling, scrolling, erasing, and putchar.
The ROP programming sequences and function encodings were taken
from NEWS-OS binaries and the NWS-1750 PROM, and checked against
the ROP command model documented in the Sony NWS-15x0 service manual.
[14 lines not shown]
Pull up following revision(s) (requested by jdc in ticket #486):
distrib/sets/lists/man/mi: revision 1.1844
sys/arch/sparc64/conf/files.sparc64: revision 1.173
sys/arch/sparc64/conf/GENERIC: revision 1.256
distrib/sets/lists/manhtml/mi: revision 1.61
sys/arch/sparc64/dev/envmon_ebus.c: revision 1.1
sys/arch/sparc64/dev/envmon_ebusreg.h: revision 1.1
share/man/man4/man4.sparc64/envmon.4: revision 1.1
share/man/man4/man4.sparc64/envmon.4: revision 1.2
share/man/man4/man4.sparc64/Makefile: revision 1.13
Add a driver for the "env-monitor" sensor found on Sun U25/U45 and V215/V245.
On the Ultra machines, the sensor reports the front panel temperature.
On the Fire machines, the sensor reports the front fan tray fan speeds,
the fan fault indicator, the front panel temperature, the keyswitch indicators,
and controls the front and rear status LED's.
[13 lines not shown]
Pull up following revision(s) (requested by jdc in ticket #485):
sys/dev/i2c/pcf8574.c: revision 1.11
sys/dev/i2c/pcf8574.c: revision 1.12
sys/dev/i2c/pcagpio.c: revision 1.14
sys/dev/i2c/pcagpio.c: revision 1.15
sys/dev/i2c/pcagpio.c: revision 1.16
Add sysmon support for indicator pins (mostly taken from pcf8574).
The Sun V245 uses a PCA9555 for the disk present indications.
Set the "active high" flag on the correct pin.
Make prev_state the correct size (only used when debug defined).
Split out the logic for handling indicators, alerts and timeouts, rather
than having special values in the properties.
[3 lines not shown]
Pull up following revision(s) (requested by jdc in ticket #484):
share/man/man4/mk48txx.4: revision 1.17
sys/conf/files: revision 1.1324
sys/dev/ic/mk48txxvar.h: revision 1.8
sys/dev/ic/mk48txx.c: revision 1.30
Add mk48txx support for:
monitoring the battery low flag (via envstat)
stopping/starting the clock oscillator (via sysmon)