riscv: Make comapt32 compile.
Note: I doubt it will work -- cpu_getmcontext32 and cpu_setmcontext32
appear to be missing save/restore of most registers, so signal
delivery will probably trash them. Also not sure whether to use
l->l_private or tf->tf_reg[_REG_TP] here (or _X_TP). TBD!
PR port-riscv/60889: riscv64: compat_netbsd32 is busticated
sys/conf/files: riscv has no EXEC_AOUT either even for compat32.
Do the same ifdef dance as for mips and arm.
Fixes:
> /home/riastradh/netbsd/current/src/sys/compat/netbsd32/netbsd32_exec_aout.c: In function 'exec_netbsd32_makecmds':
> /home/riastradh/netbsd/current/src/sys/compat/netbsd32/netbsd32_exec_aout.c:119:15: error: 'NETBSD32_MID_MACHINE' undeclared (first use in this function)
> 119 | case (NETBSD32_MID_MACHINE << 16) | ZMAGIC:
> | ^~~~~~~~~~~~~~~~~~~~
PR port-riscv/60889: riscv64: compat_netbsd32 is busticated
printf(3): try to improve description of positional arguments
Don't use "field" to refer to positional argument specification in
`%n$`, as the term is already used for the output field (as in "field
width", etc).
Reword the `*n$` paragraph that first refers to `n` as "one or more
decimal digits" and contrasts it with the "digit string" that actually
refers to an explicitly specified width or precision far away on the
previous page/screen (!). This is very unobvious, especially when you
read the page out of order, as one often does.
The result of this (intentionally) localized edits is still pretty
poor overall, but at least it fixes, hopefully, the two most glaring
problems. Further editorial help is welcome.
drm: Nix `highmem' memory accounting.
This led to confusing dmesg output when the kernel map size was
enlarged between 9 and 10, probably by this commit:
> Module Name: src
> Committed By: chs
> Date: Wed Aug 3 01:52:11 UTC 2022
>
> Modified Files:
> src/sys/uvm: uvm_km.c
>
> Log Message:
> for platforms which define NKMEMPAGES_MAX_UNLIMITED, set nkmempages
> high enough to allow the kernel to map all of RAM into kmem,
> so that free physical pages rather than kernel virtual space is
> the limiting factor in allocating kernel memory. this gives ZFS
> more flexibility in tuning how much memory to use for its ARC cache.
>
[13 lines not shown]
Make mpl115a2 return correct values.
Do not byteswap calibration coefficients - apparently, this was always
wrong. Properly wait before reading. Calculate in 64-bit arithmetic.
Use ENVSYS_PRESSURE.
vr(4): set or clear VR_RXCFG_RX_PROMISC bit in vr_setmulti().
Previously the promiscuous bit was only handled in vr_init().
When an interface is added to or removed from bridge(4), its
IFF_PROMISC flag is changed through the interface flags (SIOCSIFFLAGS).
On a running interface it does not reinitialize device, but calls
vr_setmulti() directly, which did not update the promiscuous bit in RX filter.
PR port-i386/60884
printf(3): use emphasis when a term is used for the first time
Use it for "conversion specification", "flag", "field width,
"precision", "length modifier", "conversion specifier".
printf(3): tweak formatting of n$
XXX: The way the description of positional arguments is worded is
pretty awkward. It [ab]uses "field" to refer to the conversion
specification itself, when the standard already uses it to refer to
the output field.
Pull up following revision(s) (requested by kre in ticket #1364):
common/lib/libc/string/memset2.c: revision 1.12
PR port-mips/60780 UBSan: long int << fix (src/common/lib/libc/string/memset2.c)
The comments say that memword_t is intended to be unsigned, but
presume that __register_t will provide that attribute. It usually
doesn't, so we need an unsigned type for building the fill value.
Thanks to Alexander Schreiber for running the UBSan built system
and reporting this (and others), and hopefully, in advance for
testing that this one is now fixed.
Pull up following revision(s) (requested by kre in ticket #1363):
lib/libc/stdio/vfwprintf.c: revision 1.42,1.43
PR lib/60708 - include 'F' format when fetching %n$ args.
PR bin/60496 - fix printf(3) with non-single-byte decimal point & thousands sep
These fixes are relatively simple, and should be safe -- I have had them
in my source tree for ages now.
The fix for the decimal point case is taken more or less directly from
an old FreeBSD fix for the same issue.
The thousands separator case is different - our code and FreeBSD's have
diverged so much in this area that simply using their method would have
been more trouble than it was worth, so I reimplemented it differently
to better fit our code model.
[3 lines not shown]
Pull up following revision(s) (requested by kre in ticket #531):
lib/libc/stdio/vfwprintf.c: revision 1.42,1.43
PR lib/60708 - include 'F' format when fetching %n$ args.
PR bin/60496 - fix printf(3) with non-single-byte decimal point & thousands sep
These fixes are relatively simple, and should be safe -- I have had them
in my source tree for ages now.
The fix for the decimal point case is taken more or less directly from
an old FreeBSD fix for the same issue.
The thousands separator case is different - our code and FreeBSD's have
diverged so much in this area that simply using their method would have
been more trouble than it was worth, so I reimplemented it differently
to better fit our code model.
[3 lines not shown]
Pull up following revision(s) (requested by nat in ticket #530):
sys/arch/mac68k/obio/ascaudio.c: revision 1.19
Return early if aux.interrupts.
Patch and testing by Ray Tran.
Pull up following revision(s) (requested by nat in ticket #529):
sys/arch/mac68k/obio/ascaudio.c: revision 1.20
Honor playback block size within resonable limits.
Patch and testing by Ray Tran.
Pull up following revision(s) (requested by nat in ticket #528):
sys/arch/mac68k/obio/ascaudio.c: revision 1.21
Fix typo for building ascaudio(4) as a module.
Patch and testing by Ray Tran.
Pull up following revision(s) (requested by nat in ticket #527):
sys/arch/mac68k/obio/ascaudio.c: revision 1.22
Respect maximum and minimum values when recording.
Patch and testing by Ray Tran.
Pull up following revision(s) (requested by nat in ticket #526):
sys/arch/mac68k/obio/ascaudio.c: revision 1.23
Avoid use of lock before inited.
Patch and testing by Ray Tran.
Pull up following revision(s) (requested by nat in ticket #525):
sys/arch/mac68k/dev/akbd.c: revision 1.31
Honor keyboard bell volume.
Addresses PR port-mac68k/60691.
Patch and testing by Ray Tran.
Pull up following revision(s) (requested by mrg in ticket #1362):
sys/net/bsd-comp.c: revision 1.24
Properly bounds check the max_ent check in bsd_decompress().
A specially crafted packet from PPP can trigger a backwards write of
an mbuf of a character, and can cause hangs and crashes as it corrupts
memory in the kernel.
The check against max_ent has an off-by-one error, fixed in this change
and fixes the problem (tested on arm64.)
From Acts1631 via OpenBSD.