NetBSD Problem Report #59849

From www@netbsd.org  Fri Dec 19 21:51:38 2025
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
	 client-signature RSA-PSS (2048 bits) client-digest SHA256)
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id E41A41A9239
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 19 Dec 2025 21:51:37 +0000 (UTC)
Message-Id: <20251219215136.957C81A923A@mollari.NetBSD.org>
Date: Fri, 19 Dec 2025 21:51:36 +0000 (UTC)
From: thorpej@me.com
Reply-To: thorpej@me.com
To: gnats-bugs@NetBSD.org
Subject: NetBSD trunk 2025.11.22.23.00.00 fails to boot on NetBSD/sun2, 2025.11.22.22.00.00 works
X-Send-Pr-Version: www-1.0

>Number:         59849
>Category:       kern
>Synopsis:       NetBSD trunk 2025.11.22.23.00.00 fails to boot on NetBSD/sun2, 2025.11.22.22.00.00 works
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Dec 19 21:55:00 +0000 2025
>Last-Modified:  Sat Dec 20 00:45:01 +0000 2025
>Originator:     Jason Thorpe
>Release:        NetBSD 11.99.4 2025.11.22.23.00.00
>Organization:
Retrogrouches-R-Us
>Environment:
NetBSD/sun2 running in TME
>Description:
NetBSD 11.99.4 2025.11.22.23.00.00 fails to boot on NetBSD/sun2 inside TME.  It gets stuck probing the SCSI disk:

relocating program...Starting program at 0x6000
[   1.0000000] console is ttya
[   1.0000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
[   1.0000000]     2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013,
[   1.0000000]     2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023,
[   1.0000000]     2024, 2025
[   1.0000000]     The NetBSD Foundation, Inc.  All rights reserved.
[   1.0000000] Copyright (c) 1982, 1986, 1989, 1991, 1993
[   1.0000000]     The Regents of the University of California.  All rights reserved.

[   1.0000000] NetBSD 11.99.4 (RAMDISK) #13: Fri Dec 19 13:20:57 PST 2025
[   1.0000000] 	thorpej@the-ripe-vessel:/home/nbsd/netbsd-sun2/src/sys/arch/sun2/compile/RAMDISK
[   1.0000000] Model: sun2 {120,170}
[   1.0000000] fpu: no math support
[   1.0000000] total memory = 6144 KB
[   1.0000000] avail memory = 4022 KB
[   1.0000000] mainbus0 (root)
[   1.0000000] obio0 at mainbus0
[   1.0000000] zs0 at obio0 addr 0x2000 ipl 6
[   1.0000000] zstty0 at zs0 channel 0 (console i/o)
[   1.0000000] zstty1 at zs0 channel 1
[   1.0000000] clock0 at obio0 addr 0x2800 ipl 5
[   1.0000000] tod0 at obio0 addr 0x3800: mm58167
[   1.0000000] obmem0 at mainbus0
[   1.0000000] mbmem0 at mainbus0
[   1.0000000] sc0 at mbmem0 addr 0x80000 ipl 2: options=0xff
[   1.0000000] scsibus0 at sc0: 8 targets, 8 luns per target
[   1.0000000] ec0 at mbmem0 addr 0xe0000 ipl 3
[   1.0000000] ec0: address 08:00:20:11:aa:33
[   1.0000000] enabling interrupts
[   1.0000000] WARNING: system needs entropy for security; see entropy(7)
[   1.0000030] scsibus0: waiting 2 seconds for devices to settle...
[   3.0000030] sd0 at scsibus0 target 0 lun 0: <TME, DISK, 0000> disk fixed
<stall>

Booting a kernel from  2025.11.22.22.00.00 works:

relocating program...Starting program at 0x6000
[   1.0000000] console is ttya
[   1.0000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
[   1.0000000]     2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013,
[   1.0000000]     2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023,
[   1.0000000]     2024, 2025
[   1.0000000]     The NetBSD Foundation, Inc.  All rights reserved.
[   1.0000000] Copyright (c) 1982, 1986, 1989, 1991, 1993
[   1.0000000]     The Regents of the University of California.  All rights reserved.

[   1.0000000] NetBSD 11.99.4 (RAMDISK) #12: Fri Dec 19 13:17:14 PST 2025
[   1.0000000] 	thorpej@the-ripe-vessel:/home/nbsd/netbsd-sun2/src/sys/arch/sun2/compile/RAMDISK
[   1.0000000] Model: sun2 {120,170}
[   1.0000000] fpu: no math support
[   1.0000000] total memory = 6144 KB
[   1.0000000] avail memory = 4022 KB
[   1.0000000] mainbus0 (root)
[   1.0000000] obio0 at mainbus0
[   1.0000000] zs0 at obio0 addr 0x2000 ipl 6
[   1.0000000] zstty0 at zs0 channel 0 (console i/o)
[   1.0000000] zstty1 at zs0 channel 1
[   1.0000000] clock0 at obio0 addr 0x2800 ipl 5
[   1.0000000] tod0 at obio0 addr 0x3800: mm58167
[   1.0000000] obmem0 at mainbus0
[   1.0000000] mbmem0 at mainbus0
[   1.0000000] sc0 at mbmem0 addr 0x80000 ipl 2: options=0xff
[   1.0000000] scsibus0 at sc0: 8 targets, 8 luns per target
[   1.0000000] ec0 at mbmem0 addr 0xe0000 ipl 3
[   1.0000000] ec0: address 08:00:20:11:aa:33
[   1.0000000] enabling interrupts
[   1.0000000] WARNING: system needs entropy for security; see entropy(7)
[   1.0000030] scsibus0: waiting 2 seconds for devices to settle...
[   3.0000030] sd0 at scsibus0 target 0 lun 0: <TME, DISK, 0000> disk fixed
[   3.0200030] sd0: fabricating a geometry
[   3.0200030] sd0: 100 MB, 100 cyl, 64 head, 32 sec, 512 bytes/sect x 204800 sectors
[   3.0300030] sd0: async, 8-bit transfers
[   3.4700030] st0 at scsibus0 target 4 lun 0: <EMULEX, MT-02 QIC, 0000> tape removable
[   3.4700030] st0: density code 5, 512-byte blocks, write-protected
[   3.4800030] st0: async, 8-bit transfers
[   3.7800030] boot device: <unknown>
[   3.7900030] root on md0a dumps on md0b
>How-To-Repeat:
See above.
>Fix:
Unknown at this time, but the following files changed between those two date tags:

P sys/arch/x86/x86/via_padlock.c
P sys/crypto/aes/aes.h
P sys/crypto/aes/aes_impl.c
U sys/crypto/aes/aes_keysched.c
U sys/crypto/aes/aes_keysched.h
P sys/crypto/aes/files.aes
P sys/crypto/aes/arch/x86/aes_via.c
P sys/external/bsd/drm2/dist/drm/nouveau/nouveau_fence.c

The AES changes are the likely culprit, as I think they're involved in entropy harvesting, in which autoconfigurating timing is an input.

>Audit-Trail:
From: Jason Thorpe <thorpej@me.com>
To: gnats-bugs@netbsd.org
Cc: kern-bug-people@netbsd.org,
 gnats-admin@netbsd.org,
 netbsd-bugs@netbsd.org
Subject: Re: kern/59849: NetBSD trunk 2025.11.22.23.00.00 fails to boot on
 NetBSD/sun2, 2025.11.22.22.00.00 works
Date: Fri, 19 Dec 2025 14:28:06 -0800

 > On Dec 19, 2025, at 1:55=E2=80=AFPM, thorpej@me.com wrote:
 >=20
 > The AES changes are the likely culprit

 On top-of-tree, if I revert this commit[*]:

     =
 https://mail-index.netbsd.org/source-changes/2025/11/22/msg159124.html

 then the kernel boots.

 [*] Also reverting the things stacked on top of said commit, but =
 that=E2=80=99s the commit that appeared in the problem date window.

 -- thorpej

From: Jason Thorpe <thorpej@me.com>
To: gnats-bugs@netbsd.org
Cc: kern-bug-people@netbsd.org,
 gnats-admin@netbsd.org,
 netbsd-bugs@netbsd.org
Subject: Re: kern/59849: NetBSD trunk 2025.11.22.23.00.00 fails to boot on
 NetBSD/sun2, 2025.11.22.22.00.00 works
Date: Fri, 19 Dec 2025 15:52:02 -0800

 > On Dec 19, 2025, at 2:28=E2=80=AFPM, Jason Thorpe <thorpej@me.com> =
 wrote:
 >=20
 >> On Dec 19, 2025, at 1:55=E2=80=AFPM, thorpej@me.com wrote:
 >>=20
 >> The AES changes are the likely culprit
 >=20
 > On top-of-tree, if I revert this commit[*]:
 >=20
 >    =
 https://mail-index.netbsd.org/source-changes/2025/11/22/msg159124.html

 If I go back to stock top-of-trunk and apply the following diff, the =
 kernel boots:

 Index: aes_impl.c
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: /cvsroot/src/sys/crypto/aes/aes_impl.c,v
 retrieving revision 1.12
 diff -u -p -r1.12 aes_impl.c
 --- aes_impl.c 23 Nov 2025 22:44:14 -0000 1.12
 +++ aes_impl.c 19 Dec 2025 23:51:14 -0000
 @@ -463,7 +463,7 @@ aes_keysched_selftest(void)
   { 24, AES_192_NROUNDS, rk192enc, rk192dec },
   { 32, AES_256_NROUNDS, rk256enc, rk256dec },
   };
 - uint32_t rk[60];
 + uint32_t rk[120];
   unsigned i;
     for (i =3D 0; i < __arraycount(C); i++) {


 -- thorpej

From: Jason Thorpe <thorpej@me.com>
To: gnats-bugs@netbsd.org
Cc: kern-bug-people@netbsd.org,
 gnats-admin@netbsd.org,
 netbsd-bugs@netbsd.org
Subject: Re: kern/59849: NetBSD trunk 2025.11.22.23.00.00 fails to boot on
 NetBSD/sun2, 2025.11.22.22.00.00 works
Date: Fri, 19 Dec 2025 16:42:14 -0800

 > On Dec 19, 2025, at 3:52=E2=80=AFPM, Jason Thorpe <thorpej@me.com> =
 wrote:
 >=20
 >=20
 >=20
 >> On Dec 19, 2025, at 2:28=E2=80=AFPM, Jason Thorpe <thorpej@me.com> =
 wrote:
 >>=20
 >>> On Dec 19, 2025, at 1:55=E2=80=AFPM, thorpej@me.com wrote:
 >>>=20
 >>> The AES changes are the likely culprit
 >>=20
 >> On top-of-tree, if I revert this commit[*]:
 >>=20
 >>   =
 https://mail-index.netbsd.org/source-changes/2025/11/22/msg159124.html
 >=20
 > If I go back to stock top-of-trunk and apply the following diff, the =
 kernel boots:

 This one does, too, but [64] does not:

 Index: aes_impl.c
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: /cvsroot/src/sys/crypto/aes/aes_impl.c,v
 retrieving revision 1.12
 diff -u -p -r1.12 aes_impl.c
 --- aes_impl.c 23 Nov 2025 22:44:14 -0000 1.12
 +++ aes_impl.c 20 Dec 2025 00:41:40 -0000
 @@ -463,7 +463,7 @@ aes_keysched_selftest(void)
   { 24, AES_192_NROUNDS, rk192enc, rk192dec },
   { 32, AES_256_NROUNDS, rk256enc, rk256dec },
   };
 - uint32_t rk[60];
 + uint32_t rk[65];
   unsigned i;
     for (i =3D 0; i < __arraycount(C); i++) {

 -- thorpej

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.