NetBSD/src iTRJuMzbin/sh jobs.c trap.c

   /bin/sh fix trap/jobid builtins when run from grandchild

   The trap and jobid builtins are designed to allow

        T=$(trap)

   (etc) to see (output) the traps (or jobs for jobid) of parent shell (the one
   running the assignment) to be seen from inside a subshell (here the command
   substitution, which it usually would be).

   But all that should be reported are the traps (jobs) of the parent of
   that subshell, not recursively up the chain.

   That is

        ( T=$(trap) )

   should usually be equivalent to T='' as inside a subshell environment
   all non-ignored traps are defined to be reset to their defaults

    [33 lines not shown]
VersionDeltaFile
1.127+42-9bin/sh/jobs.c
1.63+9-5bin/sh/trap.c
1.200+3-3bin/sh/eval.c
+54-173 files

NetBSD/src olzB1M0tests/bin/sh t_builtins.sh

   sh tests: builtins: add more content

   Many of the t_builtins sh tests were just placeholders for things to come.
   They've been that way for years...

   This adds some actual content to some of them - still very primitive in
   most cases, but better than was there before.   There are still too many
   empty tests (test the builtin exists, but that's it).

   Also, add a test for the trap builtin - that wasn't there before as traps
   are tested in other of the sh tests ... this new one is therefor not testing
   that traps work (or not in any way that's meaningful), rather it is testing
   that the various ways the trap command can be used all work.

   Currently two of the sub-tests will fail, the new trap test, and the
   (was previously empty) jobid test (testing a NetBSD extension builtin).

   Adding those failing tests was the inspiration for all of this.  The bug
   they expose is exotic, and never likely to be encountered, or do any harm

    [7 lines not shown]
VersionDeltaFile
1.9+235-37tests/bin/sh/t_builtins.sh
+235-371 files

NetBSD/src 71eZpxbtests/bin/sh t_arith.sh

   sh tests: arithmetic: fix test for support of pre ++/-- ops

   The C prefix and postfix unary ++ and -- operators are optional
   in POSIX sh (supported in NetBSD's sh).   To allow these tests to be
   used to test other shells, the tests generally attempt to verify that
   optional features are supported, before testing them.

   The prefix ++ and -- tests, to see if there was support in ${TEST_SH}
   were not guaranteed to work, as ++X might be preincrement X, or it
   might just be + + X (ie: applying the unary + operator twice).

   Fix that by testing whether ++X and + + X give the same result, if
   they do, then prefix ++ is not supported (also if ++X generates an error)

   Just the same for the prefix -- operator.

   The postfix operator tests are OK, X-- is either X-- or an error.

   NFCI for tests of the NetBSD sh.   (This change has been in my local
   set of sh tests for a long time now.)
VersionDeltaFile
1.11+11-3tests/bin/sh/t_arith.sh
+11-31 files

NetBSD/src nIb7Nhesys/net if_wg.c

   Avoid stupid macro name clash: m68k/include/reg.h defines R0 and R1
   as the register offsets for returning values from functions in the.
   These clash with local buffers R0 and R1 here.
   Rename them to cookie_R0 and cookie_R1 to make all m68k ports build again.
VersionDeltaFile
1.140+7-7sys/net/if_wg.c
+7-71 files

NetBSD/src XHggdlWetc Makefile, etc/unbound unbound.conf Makefile

   unbound: Install a default configuration.

   This way, setting unbound=YES is enough to get a working local
   recursive resolver listening on 127.0.0.1:53 and [::1]:53.

   PR misc/60339: unbound=YES in rc.conf should be enough to get a
   recursive resolver

   Additionally, this includes the workaround for:

   PR bin/60325: unbound emits warning: so-sndbuf 4194304 was not
   granted
VersionDeltaFile
1.1+49-0etc/unbound/unbound.conf
1.84+15-2share/man/man8/afterboot.8
1.3+14-1external/bsd/unbound/etc/rc.d/unbound
1.1+14-0etc/unbound/Makefile
1.195+12-1share/man/man5/rc.conf.5
1.477+2-2etc/Makefile
+106-62 files not shown
+110-88 files

NetBSD/src 2kji2lusys/arch/x86/x86 efi_machdep.c

   x86/efi_machdep.c: Nix extra blank line.

   No functional change intended.
VersionDeltaFile
1.8+2-3sys/arch/x86/x86/efi_machdep.c
+2-31 files

NetBSD/src K93C2bJsys/arch/x86/x86 efi_machdep.c

   x86/efi: Bypass kASAN memcpy when copying the efi runtime.

   Fixes crash at boot with `options KASAN' enabled on EFI systems.

   We could try to find some way to exclude the EFI runtime mappings
   from kASAN, e.g. by hacking kasan_md_unsupported.  But there's a lot
   of detailed exclusions to pass through to that (every entry in the
   EFI memory map), and this is the only memcpy in the whole kernel that
   all those details are likely to be applicable.

   PR kern/60391: kernel panic in efi_init() with "options KASAN"
VersionDeltaFile
1.7+9-3sys/arch/x86/x86/efi_machdep.c
+9-31 files

NetBSD/src OZVCckcsys/arch/ofppc/conf EFIKA

   Add kernel config for EFIKA 5200B. The board is supported now.
VersionDeltaFile
1.1+271-0sys/arch/ofppc/conf/EFIKA
+271-01 files

NetBSD/src 9QpNxuBsys/arch/powerpc/mpc5200 mpc5200_ac97.c

   Add debugging to MPC5200B AC97 driver.

   An attempt to hunt down rare cold boot race.
VersionDeltaFile
1.2+26-7sys/arch/powerpc/mpc5200/mpc5200_ac97.c
+26-71 files

NetBSD/src Ui0b2ucsys/arch/powerpc/conf files.ofw, sys/arch/powerpc/oea ofw_subr.S

   Introduce EFIKA_OFW_WORKAROUNDS - patch OFW trampoline for EFIKA.

   Long story short, is that SmartFirmware (EFIKA's OpenFirmware) misbehaves
   on every OF call from the kernel by zeroing SDR1 and messing with BATs.

   In the olden days, these problems were worked around with FIRMWORKSBUGS
   option. However, that option does not work currently on EFIKA. Presumaly,
   something has changed between 2012 and now, which causes FIRMWORKSBUGS
   to hang on SmartFirmware very early (before NetBSD copyright banner is
   printed).

   So we get this kludge, which only does the bare minimum to let OFW
   call succeed, and the kernel continue after the call.
VersionDeltaFile
1.21+48-1sys/arch/powerpc/oea/ofw_subr.S
1.7+9-1sys/arch/powerpc/conf/files.ofw
+57-22 files

NetBSD/src eage6aZlib/libc/citrus/modules citrus_viqr.c

   citrus/VIQR: unsigned chlen for simplicity; sprinkle assertions.

   PR 59019: various iconv issues
VersionDeltaFile
1.9+14-3lib/libc/citrus/modules/citrus_viqr.c
+14-31 files

NetBSD/src 0n1zEmmlib/libc/citrus/modules citrus_utf7.c

   citrus/UTF7: unsigned chlen for simplicity; sprinkle assertions.

   PR 59019: various iconv issues
VersionDeltaFile
1.9+26-6lib/libc/citrus/modules/citrus_utf7.c
+26-61 files

NetBSD/src 10gCbbolib/libc/citrus/modules citrus_hz.c

   citrus/HZ: Be more careful about encoding buffer.

   1. Use unsigned char for chlen, since it's never negative and only
      needs to be big enough for the ch array.

   2. Expand the ch array by space for two escape sequences, each of
      which is two characters.

      I don't think it is currently possible with the i18n data we ship
      for it to emit two escape sequences in a row -- there is a code
      path to do this, but I don't think it can be reached without
      setting escape sequences for variable 1 and extending this in some
      way.  Nevertheless, let's err on the side of safety.

   3. Sprinkle assertions everywhere.

   PR 59019: various iconv issues
VersionDeltaFile
1.7+22-6lib/libc/citrus/modules/citrus_hz.c
+22-61 files

NetBSD/src D74v71Slib/i18n_module Makefile.inc, lib/libc/citrus/modules citrus_viqr.c citrus_hz.c

   i18n_modules: Build with _DIAGNOSTIC.

   Fix some bitrot that it turned up here.

   PR 59019: various iconv issues
VersionDeltaFile
1.8+19-6lib/libc/citrus/modules/citrus_viqr.c
1.6+6-4lib/libc/citrus/modules/citrus_hz.c
1.17+6-4lib/libc/citrus/modules/citrus_iconv_std.c
1.15+2-1lib/i18n_module/Makefile.inc
+33-154 files

NetBSD/src GLq16Yytests/lib/libc/locale t_iconv.c

   iconv(3): Fix printing bytes on test failure.

   Don't sign-extend to a 32-bit quantity causing the left to be padded
   with f's; just print the 8-bit quantity.

   PR 59019: various iconv issues
VersionDeltaFile
1.8+5-5tests/lib/libc/locale/t_iconv.c
+5-51 files

NetBSD/src exLfYVQtests/lib/libc/locale t_iconv.c

   iconv(3): Expand ISO-2022-CN tests a little.

   This one is broken for a partial input case, not yet sure why.

   PR 59019: various iconv issues
VersionDeltaFile
1.7+19-4tests/lib/libc/locale/t_iconv.c
+19-41 files

NetBSD/src tLcn45Jtests/lib/libc/locale t_iconv.c

   iconv(3): Add a test case for ISO-2022-CN.

   From Mark Johnston of FreeBSD.

   PR 59019: various iconv issues
VersionDeltaFile
1.6+7-2tests/lib/libc/locale/t_iconv.c
+7-21 files

NetBSD/src iXtkor3lib/libc/citrus/modules citrus_zw.c, tests/lib/libc/locale t_iconv.c

   iconv(3): Fix buffer overrun in ZW encoding.

   Based on a report by Nick Wellnhofer.

   PR 59019: various iconv issues
VersionDeltaFile
1.7+5-2lib/libc/citrus/modules/citrus_zw.c
1.5+3-3tests/lib/libc/locale/t_iconv.c
+8-52 files

NetBSD/src KdxNOXslib/libc/citrus/modules citrus_viqr.c, tests/lib/libc/locale t_iconv.c

   iconv(3): Fix buffer overrun in VIQR encoding.

   Based on a report by Nick Wellnhofer.

   PR 59019: various iconv issues
VersionDeltaFile
1.7+7-3lib/libc/citrus/modules/citrus_viqr.c
1.4+3-3tests/lib/libc/locale/t_iconv.c
+10-62 files

NetBSD/src XWZH6ktlib/libc/citrus/modules citrus_utf7.c, tests/lib/libc/locale t_iconv.c

   iconv(3): Fix buffer overrun in UTF-7 encoding.

   Based on a report by Nick Wellnhofer.

   PR 59019: various iconv issues
VersionDeltaFile
1.8+16-6lib/libc/citrus/modules/citrus_utf7.c
1.3+5-5tests/lib/libc/locale/t_iconv.c
+21-112 files

NetBSD/src Pv4xBtflib/libc/citrus/modules citrus_hz.c, tests/lib/libc/locale t_iconv.c

   iconv(3): Fix null pointer dereference with HZ8 encoding.

   Based on a report by Nick Wellnhofer.

   PR 59019: various iconv issues
VersionDeltaFile
1.5+4-2lib/libc/citrus/modules/citrus_hz.c
1.2+2-4tests/lib/libc/locale/t_iconv.c
+6-62 files

NetBSD/src zZNqQJ5distrib/sets/lists/debug mi, distrib/sets/lists/tests mi

   iconv(3): Draft some automatic tests.

   Based on a report by Nick Wellnhofer.

   PR 59019: various iconv issues
VersionDeltaFile
1.1+354-0tests/lib/libc/locale/t_iconv.c
1.1423+2-1distrib/sets/lists/tests/mi
1.19+2-1tests/lib/libc/locale/Makefile
1.515+2-1distrib/sets/lists/debug/mi
+360-34 files

NetBSD/src UzWRGXksys/arch/ofppc/include intr.h

   Increase the number of possible interrupt sources.

   Needed for MPC5200B, harmless for others.
VersionDeltaFile
1.17+2-2sys/arch/ofppc/include/intr.h
+2-21 files

NetBSD/src ARjs9Kasys/arch/powerpc/include/oea vmparam.h, sys/arch/powerpc/oea pmap.c

   Define number of segment registers, instead of using magic value.
VersionDeltaFile
1.124+3-3sys/arch/powerpc/oea/pmap.c
1.24+1-0sys/arch/powerpc/include/oea/vmparam.h
+4-32 files

NetBSD/src vYo1ZdZsys/arch/ofppc/conf files.ofppc, sys/arch/ofppc/ofppc mainbus.c

   Start wiring up MPC5200B support into ofppc port.

   Interrupt controller peculiarities, properly gating legacy code under kernel
   appropriate options, PSC console support (kludge).
VersionDeltaFile
1.28+18-2sys/arch/powerpc/oea/ofw_consinit.c
1.22+12-2sys/arch/ofppc/pci/ofwpci.c
1.33+7-3sys/arch/ofppc/ofppc/mainbus.c
1.14+3-3sys/arch/powerpc/pci/pcib.c
1.50+4-1sys/arch/ofppc/conf/files.ofppc
+44-115 files

NetBSD/src rBNxzCfsys/arch/powerpc/mpc5200 fec.c fecreg.h

   Several enchancements and bug fixes to FEC driver.

   - Fix SRAM leak in fec_stop()
   - Skip busy wait link-poll on reset and recovery
   - Properly program muilticast hash filter
   - 802.3 full duplex flow control, advertise and honor received pause
   - Statistics exposed via if_stats
   - Accept VLAN frames
VersionDeltaFile
1.2+160-24sys/arch/powerpc/mpc5200/fec.c
1.2+21-1sys/arch/powerpc/mpc5200/fecreg.h
1.2+5-1sys/arch/powerpc/mpc5200/fecvar.h
+186-263 files

NetBSD/src LgLnBMOsys/sys featuretest.h

   sys/featuretest.h: Fix typo in previous.

   POSIX.1-2024 is `Issue 8', not `Issue 7'.  Noticed by kre@.
VersionDeltaFile
1.16+2-2sys/sys/featuretest.h
+2-21 files

NetBSD/src Ha1GneZsys/net if_wg.c, tests/net/if_wg t_basic.sh

   wg(4): Move DoS mitigation a little earlier.

   1. Don't store the cookie -- just recompute it on the fly as a
      pseudorandom function of the current two-minute unit, under a
      secret key generated at interface configuration time.

      This way we don't need to find what peer we're talking with --
      which requires a DH key agreement -- before we can verify mac2.

   2. Actually, recompute _two_ cookies on the fly, one for
      floor(now/60) and the other for 1 + floor(now/60), and accept a
      valid mac2 under either cookie, or if mac2 is not valid, send the
      1 + floor(now/60) cookie.

      This way every cookie is valid for a total possible time of 2min,
      but the cookie we send is always valid for at least 1min in the
      future, so we never send a cookie that's going to immediately
      expire and require another REKEY-TIMEOUT delay (and this works
      without keeping any state).

    [28 lines not shown]
VersionDeltaFile
1.139+235-131sys/net/if_wg.c
1.10+49-7tests/net/if_wg/t_basic.sh
+284-1382 files

NetBSD/src om9o5yDsys/stand/efiboot smbios.h

   s/repersentation/representation/ in one more place.
VersionDeltaFile
1.2+2-2sys/stand/efiboot/smbios.h
+2-21 files

NetBSD/src jk3RLJEsys/arch/powerpc/include/oea pmap.h

   Clamp PMAP_DIRECT_MAPPED_LEN below USER_SR/KERNEL_SR

   Derive it from MIN(USER_SR, KERNEL_SR) so the direct-mapped region never
   overlaps the kernel HTAB window on ports where KERNEL_SR < USER_SR,
   like ofppc. This made pmap_pvo_find_va() panic on legit lookup misses.
VersionDeltaFile
1.40+6-4sys/arch/powerpc/include/oea/pmap.h
+6-41 files