Commit Graph

271582 Commits

Author SHA1 Message Date
martin 4c9ceb80d5 Ticket #1840 2024-05-16 12:24:02 +00:00
martin 3a6c3c1b71 Pull up following revision(s) (requested by tsutsui in ticket #1840):
sys/dev/hil/hil.c: revision 1.8

Fix "stray level 1 interrupt" panic by pressing keys during autoconf(9).

Also explicitly initialize sc->sc_status = HIL_STATUS_BUSY in hil_attach().

Previously hil_intr(9) returned immediately during 'cold', but
all interrupts are enabled at the end of configure() (actually
in MD cpu_configure()) and cold is cleared in confiugre2()
after configure(), so there is a small window when hil interrupts
can be triggered during cold.

It looks there is no problem to process hil_intr() before
hil_attach_deferre() is called via configure2() because
we already check 'sc->sc_status != HIL_STATUS_BUSY' on
processing a kthread.

Note this seems also to appease the similar panic on mame's hp9k370
emulation (though mame's emulation around DMAC looks still incomplete).
2024-05-16 12:23:13 +00:00
martin f0c51849e8 Tickets #1838 and #1839 2024-05-11 14:48:38 +00:00
martin 3065e004b7 Pull up following revision(s) (requested by nat in ticket #1839):
sys/arch/mac68k/dev/pm_direct.c: revision 1.31

Return early if PM data is not available.

This avoids random crashes on my Powerbook when using the mouse or keyboard.

The same was needed for the Powerbook 5xx/Duos (compile tested only).
2024-05-11 14:47:31 +00:00
martin a2a5987860 Pull up following revision(s) (requested by tsutsui in ticket #1838):
sys/arch/hp300/stand/uboot/Makefile: revision 1.11
	sys/arch/hp300/stand/inst/Makefile: revision 1.11

Use LINKS to create hard links to generate proper METALOG files.

Also use the default ${PROG} variable and "install" target.

Fixes PR port-hp300/58211.
2024-05-11 14:39:57 +00:00
martin e59bb8bcd4 Tickets #1836 and #1837 2024-04-28 13:32:07 +00:00
martin b06bf0c92e Regen for ticket #1837 2024-04-28 13:30:08 +00:00
martin cbaaa88339 Pull up following revision(s) (requested by maya in ticket #1837):
sys/dev/usb/uftdi.c: revision 1.78
	sys/dev/usb/usbdevs: revision 1.815

Add some USB serial adapters
From Cameron Williams in PR kern/58127

Add support for a range of USB serial adapters
From Cameron Williams in PR kern/58127
2024-04-28 13:29:40 +00:00
martin c274bc0ed8 Pull up following revision(s) (requested by ozaki-r in ticket #1836):
sys/netinet6/frag6.c: revision 1.78

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)
2024-04-28 10:14:18 +00:00
martin 76b1e4b5b3 Welcome to 9.4_STABLE 2024-04-28 10:11:21 +00:00
martin f49b2a9e1b Welcome to NetBSD 9.4 2024-04-20 13:32:21 +00:00
martin 6aaaad0275 Note dedication of 9.4 2024-04-18 18:52:56 +00:00
martin 884affd1f4 Add dedication for the upcoming 9.4 release. 2024-04-18 18:50:59 +00:00
martin da32a184cb Tickets #1827 - #1835 2024-04-18 16:41:58 +00:00
martin 51a1fe22d5 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@.
2024-04-18 16:40:17 +00:00
martin 7c6254e7f6 Pull up following revision(s) (requested by riastradh in ticket #1834):
share/mk/bsd.own.mk: revision 1.1177

ZFS works fine on my v210, so let's enable it for sparc64
2024-04-18 16:12:31 +00:00
martin dec9ffa0ed Pull up following revision(s) (requested by riastradh in ticket #1833):
usr.bin/who/utmpentry.c: revision 1.22

PR/56013: Kouichi Hashikawa: Move setutent/setutxent right before the loops.
2024-04-18 16:09:09 +00:00
martin a03ea888fa Pull up following revision(s) (requested by riastradh in ticket #1832):
external/gpl2/grep/dist/src/grep.c: revision 1.3

PR/56584: Andreas Gustafsson: Skip FIFO's when -D
2024-04-18 16:05:24 +00:00
martin 6296909668 Pull up following revision(s) (requested by riastradh in ticket #1831):
external/bsd/am-utils/dist/include/amq_defs.h: revision 1.2
	external/bsd/am-utils/dist/amq/amq_xdr.c: revision 1.2
	external/bsd/am-utils/dist/amq/amq.c: revision 1.4
	external/bsd/am-utils/dist/amd/amq_subr.c: revision 1.4
	external/bsd/am-utils/dist/amd/amq_subr.c: revision 1.5

fix pointer bug (thanks RVP) and change to use 64 bit times. Don't bother
with backwards compatibility; too much work for little benefit.

remove long cast (thanks RVP)
2024-04-18 15:59:59 +00:00
martin c390936c21 Pull up following revision(s) (requested by riastradh in ticket #1830):
sys/kern/subr_workqueue.c: revision 1.40
	sys/kern/subr_workqueue.c: revision 1.41
	sys/kern/subr_workqueue.c: revision 1.42
	sys/kern/subr_workqueue.c: revision 1.43
	sys/kern/subr_workqueue.c: revision 1.44
	sys/kern/subr_workqueue.c: revision 1.45
	sys/kern/subr_workqueue.c: revision 1.46
	tests/rump/kernspace/workqueue.c: revision 1.7
	sys/kern/subr_workqueue.c: revision 1.47
	tests/rump/kernspace/workqueue.c: revision 1.8
	tests/rump/kernspace/workqueue.c: revision 1.9
	tests/rump/rumpkern/t_workqueue.c: revision 1.3
	tests/rump/rumpkern/t_workqueue.c: revision 1.4
	tests/rump/kernspace/kernspace.h: revision 1.9
	tests/rump/rumpkern/Makefile: revision 1.20
	sys/kern/subr_workqueue.c: revision 1.39
	share/man/man9/workqueue.9: revision 1.15
	(all via patch)

workqueue: Lift unnecessary restriction on workqueue_wait.

Allow multiple concurrent waits at a time, and allow enqueueing work
at the same time (as long as it's not the work we're waiting for).

This way multiple users can use a shared global workqueue and safely
wait for individual work items concurrently, while the workqueue is
still in use for other items (e.g., wg(4) peers).

This has the side effect of taking away a diagnostic measure, but I
think allowing the diagnostic's false positives instead of rejecting
them is worth it.  We could cheaply add it back with some false
negatives if it's important.
workqueue(9): workqueue_wait and workqueue_destroy may sleep.

But might not, so assert sleepable up front.
workqueue(9): Sprinkle dtrace probes.
tests/rump/rumpkern: Use PROGDPLIBS, not explicit -L/-l.

This way we relink the t_* test programs whenever changes under
tests/rump/kernspace change libkernspace.a.

workqueue(9) tests: Nix trailing whitespace.

workqueue(9) tests: Destroy struct work immediately on entry.

workqueue(9) tests: Add test for PR kern/57574.

workqueue(9): Avoid touching running work items in workqueue_wait.

As soon as the workqueue function has called, it is forbidden to
touch the struct work passed to it -- the function might free or
reuse the data structure it is embedded in.

So workqueue_wait is forbidden to search the queue for the batch of
running work items.  Instead, use a generation number which is odd
while the thread is processing a batch of work and even when not.
There's still a small optimization available with the struct work
pointer to wait for: if we find the work item in one of the per-CPU
_pending_ queues, then after we wait for a batch of work to complete
on that CPU, we don't need to wait for work on any other CPUs.
PR kern/57574

workqueue(9): Sprinkle dtrace probes for workqueue_wait edge cases.

Let's make it easy to find out whether these are hit.

workqueue(9): Stop violating queue(3) internals.

workqueue(9): Avoid unnecessary mutex_exit/enter cycle each loop.

workqueue(9): Sort includes.
No functional change intended.

workqueue(9): Factor out wq->wq_flags & WQ_FPU in workqueue_worker.
No functional change intended.  Makes it clearer that s is
initialized when used.
2024-04-18 15:51:35 +00:00
martin 2fda30a8a1 Pull up following revision(s) (requested by riastradh in ticket #1829):
distrib/evbarm/instkernel/sshramdisk/Makefile: revision 1.26

evbarm/instkernel/sshramdisk: Put firmware in the right paths.

Maybe this should also be wired up to `release' to put the ramdisk in
the releasedir so we detect destdir path leakage like this had.

PR port-evbarm/58035
2024-04-18 15:41:13 +00:00
martin aadaf7c76d Pull up following revision(s) (requested by riastradh in ticket #1828):
sys/stand/efiboot/efiboot.c: revision 1.23

efiboot: Duplicate efi_bootdp before we clobber it in efi_net_probe.

Patch from jakllsch@.  Makes Socionext Synquacer boot considerably
more reliably.

PR kern/58075
2024-04-18 15:33:44 +00:00
martin 39cc01ae79 Pull up following revision(s) (requested by riastradh in ticket #655):
sys/modules/Makefile: revision 1.285
	share/mk/bsd.own.mk: revision 1.1365
	share/mk/bsd.own.mk: revision 1.1366
	sys/arch/aarch64/include/sljit_machdep.h: revision 1.4
	sys/external/bsd/sljit/dist/sljit_src/sljitNativeARM_64.c: revision 1.5
	(all via patch)

sljit: Pacify -Wsign-compare.

If these sizes are negative, we're probably in trouble anyway, so
assert nonnegative here.
Needed to resolve PR 58103.

bsd.own.mk: Enable MKLSJIT on aarch64.

Make sure there's only one copy of the conditional, in bsd.own.mk;
just make sys/modules/Makefile conditional on MKSLJIT so we don't
have to keep these in sync.

As a workaround for PR 58106, tweak the conditional definition of
SLJIT_CACHE_FLUSH to use cpu_icache_sync_range only in _HARDKERNEL,
and use __builtin___clear_cache in userland and in rump kernels.

PR 58103: bpfjit.kmod is not built on aarch64
bsd.own.mk: No need for MKSLJIT to be set differently from others.
- Use ?=, not =, so mk.conf setting wins.
- Write out per-architecture tabular settings, not a conditional.
- Add comments for the architectures that look like they should have
  sljit but don't.  (XXX Missing comments about powerpc and mips --
  not sure why, is this because modules don't yet work on those
  architectures, or what?)

Tidying for PR 58103: bpfjit.kmod is not built on aarch64.
2024-04-18 15:24:20 +00:00
martin 91efe1030f Tickets #1825 and #1826 2024-04-17 18:06:32 +00:00
martin 854de1e4e7 Pull up following revision(s) (requested by riastradh in ticket #1826):
share/mk/bsd.lib.mk: revision 1.398
	share/mk/bsd.lib.mk: revision 1.399
	share/mk/bsd.x11.mk: revision 1.152
	(via patch)

PR/58104: Kouichi Hashikawa: Use ${TOOL_AWK}

Back-out unintented commit.
2024-04-17 18:04:57 +00:00
martin 08056559b8 Pull up following revision(s) (requested by riastradh in ticket #1825):
sys/dev/pci/if_iwn.c: revision 1.100

if_iwn.c: pick up proper firmware for Centrino Wireless-N 130

Both variants should use iwlwifi-6000g2b-6 not iwlwifi-6000g2a-6. (It
seems only two specific product variants use iwlwifi-6000g2a-6. We
could simplify by reversing the sense of the test, as OpenBSD does, but
it doesn't seem to matter much, as what we now match seems to be the
full gamut possible, so the simpler diff was chosen here.)

Addresses PR kern/58105 from wandrien.dev%gmail.com@localhost, with the
PCI_PRODUCT_INTEL_WIFI_LINK_130_1 match tested by the reporter. Code
inspection of the FreeBSD driver indicates we should safely be able to
match PCI_PRODUCT_INTEL_WIFI_LINK_130_2 also.
2024-04-17 16:24:26 +00:00
martin 3850965a00 Ticket #1824 2024-04-16 19:07:22 +00:00
martin 7b89a299c9 Pull up following revision(s) (requested by kim in ticket #1824):
etc/mtree/special: revision 1.172
Add /etc/sshd/ssh_host_ed25519_key* .
2024-04-16 19:06:07 +00:00
martin 741d6b6579 Tickets #1819 - #1823 2024-03-25 15:54:20 +00:00
martin 09c828480e Pull up following revision(s) (requested by uwe in ticket #1823):
external/gpl2/groff/dist/tmac/doc.tmac: revision 1.3

doc.tmac: .Lk - handle punctuation without anchor-text correctly
doc-get-arg-type expects that doc-width is set beforehand, so call
doc-get-width to make sure doc-get-arg-type detects the trailing
punctuation correctly.

PR bin/58074
2024-03-25 15:51:47 +00:00
martin 9c11ee0a89 Pull up following revision(s) (requested by riastradh in ticket #1822):
sys/dev/qbus/if_qe.c: revision 1.82

vax/qe(4): supply an ipf->if_init() so that if_init() doesn't crash.

convert the existing qeinit() to one compatible with if_init.
should fix PR#58068.
2024-03-25 15:35:50 +00:00
martin a6ef924305 Pull up following revision(s) (requested by riastradh in ticket #1820):
etc/etc.amd64/Makefile.inc: revision 1.17
	distrib/amd64/ramdisks/common/Makefile.ramdisk: revision 1.17
	etc/etc.i386/Makefile.inc: revision 1.70
	distrib/i386/ramdisks/common/Makefile.ramdisk: revision 1.16

x86: Release the ramdisks too.

This way we will get cgdroot.fs (and zfsroot.fs too) in the release.
PR misc/57534
2024-03-25 15:19:44 +00:00
martin b03fe60d15 Pull up following revision(s) (requested by mrg in ticket #1950):
usr.bin/audio/common/wav.c: revision 1.24

audio_wav_parse_hdr: handle zero-length data files again
the previous clean up turns zero-length data into no data and thus
an error, instead of simply doing nothing.  noted by gson.
2024-03-25 15:11:33 +00:00
martin 120a124a0e Pull up following revision(s) (requested by riastradh in ticket #1819):
crypto/external/bsd/openssl/dist/providers/implementations/digests/sha2_prov.c: revision 1.2
	  (applied to crypto/external/bsd/openssl/dist/crypto/evp/m_sha1.c)
	tests/crypto/libcrypto/t_sha512trunc.c: revision 1.1
	tests/crypto/libcrypto/t_sha512trunc.c: revision 1.2
	tests/crypto/libcrypto/Makefile: revision 1.16
	distrib/sets/lists/tests/mi: revision 1.1311
	distrib/sets/lists/debug/mi: revision 1.430
	crypto/external/bsd/openssl/dist/include/crypto/sha.h: revision 1.2
	crypto/external/bsd/openssl/lib/libcrypto/libc-sha2xx.c: revision 1.4
	(all via patch)

libcrypto: Add some trivial tests for truncated SHA-512 variants.
These should use more of the test vectors from
https://csrc.nist.gov/Projects/Cryptographic-Algorithm-Validation-Program/Secure-Hashing#Testing
but this will do for now to detect the buffer overrun rake we left
lying around for ourselves.
PR lib/58039

libcrypto: Fix buffer overrun in truncated SHA-512 functions.
Further fallout from the libc/openssl sha2 symbol collision.
PR lib/58039
2024-03-25 14:26:15 +00:00
martin d11a6b6970 Tickets #1807 and #1818 2024-03-12 12:45:42 +00:00
martin d312087150 Pull up the following revisions, requested by mrg in ticket #1818:
usr.bin/audio/common/auconv.h                   up to 1.6
	usr.bin/audio/common/audio.c                    up to 1.27
	usr.bin/audio/common/decode.c                   up to 1.2
	usr.bin/audio/common/libaudio.h                 up to 1.22
	usr.bin/audio/common/sun.c                      up to 1.11
	usr.bin/audio/common/wav.c                      up to 1.22
	usr.bin/audio/ctl/audioctl.1                    up to 1.25
	usr.bin/audio/play/audioplay.1                  up to 1.34
	usr.bin/audio/play/play.c                       up to 1.64
	usr.bin/audio/record/audiorecord.1              up to 1.45
	usr.bin/audio/record/record.c                   up to 1.58

- support for playing 32-bit and 64-bit IEEE FP .wav files
- support for recording 24 bit .wav files
- read-overflow fixes for .wav files, and other fixes for the
  wav parser
- audioplay gains -n flag (no play, like make -n)
- audioctl manual spruced up
- audiorecord manual gained useful examples
2024-03-12 12:41:38 +00:00
martin c82b4f356f Pull up following revision(s) (requested by riastradh in ticket #1807):
sys/dev/usb/usbdi.c: revision 1.248

usbdi(9): Avoid calling ubm_softint with lock held and polling on.

PR kern/57783
2024-03-12 12:34:50 +00:00
martin 4328e904d2 Ticket #1817 2024-03-12 10:15:04 +00:00
martin 9928f3c209 Pull up following revision(s) (requested by riastradh in ticket #1817):
sys/dev/ic/nvme.c: revision 1.69

nvme(4): Disestablish admin q interrupt while suspended.

And re-establish on resume.  Fixes nvmectl(8) after a suspend/resume
cycle on some systems.

Adapted from a patch by mrg@.

PR kern/58025
2024-03-12 09:59:31 +00:00
martin b0c7a08c49 Tickets #1813 - #1816 2024-03-11 20:04:38 +00:00
martin da67ab4db2 Pull up following revision(s) (requested by ozaki-r in ticket #1816):
lib/libc/gen/getcap.c: revision 1.58

Fix memory leak in getent()

Memory was not freed if record was not found
2024-03-11 20:02:12 +00:00
martin 2781ace8f0 Pull up following revision(s) (requested by riastradh in ticket #1815):
sys/net/if_tun.c: revision 1.175

tun(4): Allow IPv6 packets with TUNSLMODE configured.
PR kern/58013
2024-03-11 19:30:06 +00:00
martin f837add0f0 Pull up following revision(s) (requested by riastradh in ticket #1814):
sys/kern/sysv_shm.c: revision 1.142

Avoid overflow when computing kern.ipc.shmmax. Keep shmmax (bytes) and
shmall (pages) values aligned and use arithmetic everywhere instead
of shifts.

Should fix PR 57979
2024-03-11 18:01:48 +00:00
martin 4492d064f5 Pull up following revision(s) (requested by christos in ticket #1813):
etc/named.conf: revision 1.11
	usr.sbin/postinstall/postinstall.in: revision 1.59
	external/mpl/bind/dist/lib/isc/netmgr/netmgr-int.h: revision 1.11

Make sure that the extra field is maximally aligned since it is used for
other struct storage.
- fix named.conf (remove dnssec-enable option)
- use proper local variables instead of adding _ or other prefixes.
- centralize rm use
- use grep -q instead of > /dev/null
- reduce constant duplication

remove obsolete option "dnssec-enable"
2024-03-11 17:37:42 +00:00
martin e6cee08a74 Tickets #1806, #1808 - #1812 2024-03-10 19:22:08 +00:00
martin b70e27db7d Pull up following revision(s) (requested by riastradh in ticket #1812):
sys/netinet6/in6.c: revision 1.292

netinet6: Avoid NPD on `ifconfig ifN inet6 ... pltime 0 vltime 0'.
PR kern/53922
2024-03-10 19:12:05 +00:00
martin 185d1352ef Pull up following revision(s) (requested by riastradh in ticket #1811):
usr.bin/getconf/getconf.c: revision 1.37
	usr.bin/getconf/getconf.1: revision 1.14

PR/57875: Jason Bacon: Try again without an _ for portability.
getconf.1: Note that leading underscores in configuration
variable names are ignored by getconf(1).

While here, add a section with examples, and make the synopsis
more concise.

PR bin/57875
2024-03-10 19:04:39 +00:00
martin fa86120aaa Pull up following revision(s) (requested by riastradh in ticket #1810):
sys/dev/usb/if_urtwn.c: revision 1.109 (patch)

urtwn(4): Ditch old queued commands on overflow.
Don't increment ring->queued past what the task will decrement.

This is a stop-gap measure; really, we should just have one task for
each operation that is deferred to the task thread.

PR kern/57965
2024-03-10 18:59:19 +00:00
martin 91f54596b1 Pull up following revision(s) (requested by riastradh in ticket #1809):
sys/netinet6/raw_ip6.c: revision 1.184 (patch)
	sys/netinet6/icmp6.c: revision 1.256 (patch)

Deliver timestamps also to raw sockets.
Fixes PR 57955
2024-03-10 18:54:41 +00:00
martin 3f54da42ef Pull up following revision(s) (requested by riastradh in ticket #1808):
lib/libc/net/getnameinfo.3: revision 1.43

Document the NI_NUMERICSCOPE flag.
PR lib/57832
2024-03-10 18:44:37 +00:00