NetBSD Problem Report #57107

From www@netbsd.org  Sun Dec 11 08:23:52 2022
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))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id A9BE71A921F
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 11 Dec 2022 08:23:52 +0000 (UTC)
Message-Id: <20221211082351.111041A9239@mollari.NetBSD.org>
Date: Sun, 11 Dec 2022 08:23:51 +0000 (UTC)
From: netbsd@linear.network
Reply-To: netbsd@linear.network
To: gnats-bugs@NetBSD.org
Subject: kernel panic on -current when configuring network with sn(4) on mac68k
X-Send-Pr-Version: www-1.0

>Number:         57107
>Category:       port-mac68k
>Synopsis:       kernel panic on -current when configuring network with sn(4) on mac68k
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    tsutsui
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Dec 11 08:25:00 +0000 2022
>Closed-Date:    Sat Jan 07 15:26:17 +0000 2023
>Last-Modified:  Sat Jan 07 15:26:17 +0000 2023
>Originator:     linear cannon
>Release:        -current 202212102100
>Organization:
>Environment:
>Description:
on mac68k on a quadra 700 (sn(4) network driver), the following panic occurs when attempting to configure network during installation:

sn0: executing: /libexec/dhcpcd-rupool-run-hooks CARRIER
sn0: executing: /libexec/dhcpcd-rupool-ru
pool_redzone_check: [mclpl] 0x00 != 0x97
[  58.1755711] cpu0: Begin traceback...
[  58.1755711] ?(?)
[  58.2357605] db_panic(a54040,ffffffff,ffffffff,9e748c,59ade64) at 0
[  58.3024361] vpanic(225620,59ade70,59ade84,149730,225620) + 162
[  58.4357886] panic(225620,22673b,229da9,0,97) + c
[  58.5691411] pool_redzone_check.part.0(?)
[  58.6524809] eventfd_filt_read(9e748c, a54040) + 74
[  58.7191602] pool_cache_put_paddr(9e748c,a54040,ffffffff) + 48
[  58.8691743] m_ext_free(?)
[  58.9525255] unp_drop(a52124) + 17a
[  59.0191998] m_free(a52124) + 3c
[  59.0859379] m_freem(a52124,2000,148d80,148b74,38ea) + 16
[  59.2025842] ether_input (a98a40,a52124,a98a40,a52124,a9c400,0) + 506
[  59.3025867] if_percpuq_softint(a14de0,fbb70,40,59a0170,5bdea0) + 9c
[  59.3859762] softint_thread(59a0170) + 264
[  59.4525970] lwp_trampoline() + e
[  59.4525970] cpu0: End traceback...
Stopped in pid 0.3 (system) at netbsd:cpu_Debugger+0x6:    unlk    a6
db> 

(panic was OCRd and hand-edited, there may be minor mistakes i missed)
>How-To-Repeat:
on a 68k mac with a network device supported by the sn(4) driver, boot the installation kernel, and attempt to configure the network.

the panic happens very reliably during configuration, and the stack trace output is, as far as i can tell, identical each time, save for timestamps.


>Fix:

>Release-Note:

>Audit-Trail:
From: David Brownlee <abs@absd.org>
To: gnats-bugs@netbsd.org
Cc: port-mac68k-maintainer@netbsd.org, gnats-admin@netbsd.org, 
	netbsd-bugs@netbsd.org
Subject: Re: port-mac68k/57107: kernel panic on -current when configuring
 network with sn(4) on mac68k
Date: Sun, 11 Dec 2022 16:30:49 +0000

 I wonder if it would be possible to narrow down if this is transmit or
 receive triggered - possibly by installing without network and then
 running tcpdump on the interface to see if it triggers

From: linear cannon <linear@linear.network>
To: gnats-bugs@netbsd.org, port-mac68k-maintainer@netbsd.org,
 gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, netbsd@linear.network
Cc: 
Subject: Re: port-mac68k/57107: kernel panic on -current when configuring
 network with sn(4) on mac68k
Date: Sun, 11 Dec 2022 14:32:35 -0500

 i can try that out today. i've been unable to install on this system 
 because of what i believe to be a firmware bug in the SCSI drive 
 emulator i am using, but i have another one that i know works with 
 NetBSD since i'm using it with NetBSD on my VAX, so i'm about to stick 
 that drive in this machine instead and give it a shot.

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: gnats-bugs@netbsd.org
Cc: tsutsui@ceres.dti.ne.jp
Subject: Re: port-mac68k/57107: kernel panic on -current when configuring network
	 with sn(4) on mac68k
Date: Fri, 30 Dec 2022 13:35:29 +0900

 > >Synopsis:       kernel panic on -current when configuring network with sn(4) on mac68k
  :
 > >Description:
 > on mac68k on a quadra 700 (sn(4) network driver), the following panic occurs when attempting to configure network during installation:

 Also happens on my LC630 with Apple Ethernet CS Twisted-Pare Card.

 - HEAD/202212280510Z/mac68k/installation/instkernel/netbsd-INSTALLSBC.gz
   in NetBSD-daily fails

 - netbsd-9/202212290100Z/mac68k/installation/instkernel/netbsd-INSTALLSBC.gz
   in NetBSD-daily works

 - it looks triggered in very early m_freem() on sonic_txintr() and
   ether_input() or arpintr() etc. invoked from softintr(9) thread
   after sonic_rxintr()

 - there is no siginificant changes in MI sonic (src/sys/dev/ic/dp83932.c)
   between netbsd-9 and HEAD

 - it looks one major change around network layer between netbsd-9 and HEAD
   is pktqueue(9) (but not investigated yet)

 - another posibility is wrong POOL_REDZONE check that was not enabled in
   netbsd-9 (note mac68k INSTALL has options DIAGNOSTIC but GENERIC doesn't)
  http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/kern/subr_pool.c#rev1.259

 ---
 Izumi Tsutsui

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: gnats-bugs@netbsd.org
Cc: tsutsui@ceres.dti.ne.jp
Subject: Re: port-mac68k/57107: kernel panic on -current when configuring networkwith
	 sn(4) on mac68k
Date: Fri, 30 Dec 2022 15:18:35 +0900

 >  - another posibility is wrong POOL_REDZONE check that was not enabled in
 >    netbsd-9 (note mac68k INSTALL has options DIAGNOSTIC but GENERIC doesn't)
 >   http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/kern/subr_pool.c#rev1.259

 GENERIC + options DIAGNOSTIC + options POOL_REDZONE kernel on netbsd-9
 also complains the redzone check (no panic on netbsd-9):

 ---
 [   1.0000000] pool redzone disabled for 'kmem-8192'
 [   1.0000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
 [   1.0000000]     2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017,
 [   1.0000000]     2018, 2019, 2020, 2021, 2022
 [   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 9.3 (GENERIC_DIAGNOSTIC) #0: Fri Dec 30 14:47:14 JST 2022
 [   1.0000000] 	tsutsui@mirage:/s/netbsd-9/src/sys/arch/mac68k/compile/GENERIC_DIAGNOSTIC
 [   1.0000000] Apple Macintosh Quadra 630  (68040)
 [   1.0000000] cpu: delay factor 1058
 [   1.0000000] fpu: emulator
 [   1.0000000] total memory = 36864 KB
 [   1.0000000] avail memory = 31048 KB
 [   1.0000000] pool redzone disabled for 'buf64k'
 [   1.0000000] mrg: 'Quadra630 ROMs' ROM glue, tracing off, debug off, silent traps
 [   1.0000000] mrg: I/O map kludge for ROMs that use hardware addresses directly.
 [   1.0000000] mainbus0 (root)
 [   1.0000000] obio0 at mainbus0
 [   1.0000000] esp0 at obio0 addr 0 (quick): address 0x4ca000: NCR53C96, 16MHz, SCSI ID 7
 [   1.0000000] scsibus0 at esp0: 8 targets, 8 luns per target
 [   1.0000000] wdc0 at obio0 (Quadra/Performa series IDE interface)
 [   1.0000000] atabus0 at wdc0 channel 0
 [   1.0000000] adb0 at obio0
 [   1.0000000] asc0 at obio0: Apple Sound Chip
 [   1.0000000] intvid0 at obio0 @ f9001000: Valkyrie video subsystem
 [   1.0000000] intvid0: 832 x 624, 256 color
 [   1.0000000] macfb0 at intvid0
 [   1.0000000] wsdisplay0 at macfb0 (kbdmux ignored)
 [   1.0000000] sn0 at obio0: integrated SONIC Ethernet adapter
 [   1.0000000] sn0: Ethernet address 08:00:07:9f:07:c6
 [   1.0000000] iwm0 at obio0: Apple GCR floppy disk controller
 [   1.0000000] iwm: Chip revision not supported (-77)
 [   1.0000000] zsc0 at obio0 chip type 0 
 [   1.0000000] zsc0 channel 0: d_speed   9600 DCD clk 0 CTS clk 0
 [   1.0000000] zstty0 at zsc0 channel 0 (console i/o)
 [   1.0000000] zsc0 channel 1: d_speed   9600 DCD clk 0 CTS clk 0
 [   1.0000000] zstty1 at zsc0 channel 1
 [   1.0000000] nubus0 at mainbus0
 [   1.0033631] scsibus0: waiting 2 seconds for devices to settle...
 [   1.0906026] adb0 (direct, Cuda): 2 targets
 [   1.1447897] aed0 at adb0 addr 0: ADB Event device
 [   1.2026967] akbd0 at adb0 addr 2: keyboard II (Japanese layout)
 [   1.2745564] wskbd0 at akbd0 (mux ignored)
 [   1.3203974] ams0 at adb0 addr 3: 1-button, 100 dpi mouse
 [   1.4141614] wsmouse0 at ams0 (mux ignored)
 [   3.2143427] sd0 at scsibus0 target 0 lun 0: <Logitec, LHD-U32H/E, 105S> disk fixed
 [   3.3149401] sd0: 30533 MB, 62037 cyl, 16 head, 63 sec, 512 bytes/sect x 62533296 sectors
 [   3.4311881] sd0: async, 8-bit transfers
 [   3.9311127] cd0 at scsibus0 target 3 lun 0: <MATSHITA, CD-ROM CR-8008, 8.0e> cdrom removable
 [   4.0363887] cd0: sync (248.00ns offset 15), 8-bit (4.032MB/s) transfers
 [   7.2813106] wd0 at atabus0 drive 0
 [   7.3361156] wd0: <IBM-DALA-3360>
 [   7.3743164] wd0: 348 MB, 929 cyl, 16 head, 48 sec, 512 bytes/sect x 713472 sectors
 swwdog0: software watchdog initialized
 [   7.4502368] boot device: sd0
 [   7.5143925] root on sd0a dumps on sd0b
 [   7.5977284] root file system type: ffs
 [   7.6500261] kern.module.path=/stand/mac68k/9.3/modules
 [   7.7311179] PRAM time does not appear to have been read correctly.
 [   7.8126130] PRAM: 0x83da4f80, macos_boottime: 0x63ae7ce5.
 Enter pathname of shell or RETURN for /bin/sh: 
 We recommend creating a non-root account and using su(1) for root access.
 # ifconfig sn0 192.168.20.35
 # ping -n 192.168.20.1
 PING 192.1[  37.2356356] pool_redzone_check: 0x90e840: 0x00 != 0x47
 [  37.3121151] pool_redzone_check: 0x90e841: 0x00 != 0xe5
 68.20.1 (192.168.20.1): 56 data bytes
 64 bytes from 192.168.20.1: icmp_seq=0 ttl=255 time=143.709151 ms
 [  38.2691068] pool_redzone_check: 0x90f8c0: 0x05 != 0xdb
 [  38.3318314] pool_redzone_check: 0x90f8c1: 0x81 != 0x79
 64 bytes from 192.168.20.1: icmp_seq=1 ttl=255 time=140.392667 ms
 64 bytes from 192.168.20.1: icmp_seq=2 ttl=255 time=17.691738 ms
 [  40.2694348] pool_redzone_check: 0xa21140: 0x00 != 0x3e
 [  40.3307515] pool_redzone_check: 0xa21141: 0x00 != 0xdd
 64 bytes from 192.168.20.1: icmp_seq=3 ttl=255 time=138.906761 ms
 64 bytes from 192.168.20.1: icmp_seq=4 ttl=255 time=18.568729 ms
 [  42.2697195] pool_redzone_check: 0xa22940: 0x00 != 0x72
 [  42.3320063] pool_redzone_check: 0xa22941: 0x00 != 0x10
 64 bytes from 192.168.20.1: icmp_seq=5 ttl=255 time=140.026297 ms
 64 bytes from 192.168.20.1: icmp_seq=6 ttl=255 time=17.756842 ms
 [  44.2700170] pool_redzone_check: 0xa239c0: 0x00 != 0x05
 [  44.3330697] pool_redzone_check: 0xa239c1: 0x00 != 0xa3
 64 bytes from 192.168.20.1: icmp_seq=7 ttl=255 time=139.279514 ms
 64 bytes from 192.168.20.1: icmp_seq=8 ttl=255 time=17.618975 ms
 [  46.2703603] pool_redzone_check: 0xa251c0: 0x00 != 0x39
 [  46.3314766] pool_redzone_check: 0xa251c1: 0x00 != 0xd7
 64 bytes from 192.168.20.1: icmp_seq=9 ttl=255 time=138.816126 ms
 64 bytes from 192.168.20.1: icmp_seq=10 ttl=255 time=17.958538 ms
 [  48.2706361] pool_redzone_check: 0xa269c0: 0x00 != 0x6c
 [  48.3321034] pool_redzone_check: 0xa269c1: 0x34 != 0x0a
 64 bytes from 192.168.20.1: icmp_seq=11 ttl=255 time=139.173560 ms
 64 bytes from 192.168.20.1: icmp_seq=12 ttl=255 time=19.035948 ms
 [  50.2709386] pool_redzone_check: 0xa27a40: 0x00 != 0xff
 [  50.3335893] pool_redzone_check: 0xa27a41: 0x08 != 0x9e
 64 bytes from 192.168.20.1: icmp_seq=13 ttl=255 time=140.386284 ms
 64 bytes from 192.168.20.1: icmp_seq=14 ttl=255 time=17.627911 ms
 [  52.2712769] pool_redzone_check: 0xa29240: 0x00 != 0x33
 [  52.3325195] pool_redzone_check: 0xa29241: 0x00 != 0xd1
 64 bytes from 192.168.20.1: icmp_seq=15 ttl=255 time=138.994843 ms
 64 bytes from 192.168.20.1: icmp_seq=16 ttl=255 time=17.834712 ms
 [  54.2715552] pool_redzone_check: 0xa2ca40: 0x00 != 0x55
 [  54.3328361] pool_redzone_check: 0xa2ca41: 0x00 != 0xf4
 64 bytes from 192.168.20.1: icmp_seq=17 ttl=255 time=140.582874 ms
 64 bytes from 192.168.20.1: icmp_seq=18 ttl=255 time=17.636846 ms
 [  56.2718577] pool_redzone_check: 0xa2dac0: 0x00 != 0xe9
 [  56.3332778] pool_redzone_check: 0xa2dac1: 0x00 != 0x87
 64 bytes from 192.168.20.1: icmp_seq=19 ttl=255 time=139.251430 ms
 64 bytes from 192.168.20.1: icmp_seq=20 ttl=255 time=17.737694 ms
 ^C
 ----192.168.20.1 PING Statistics----
 21 packets transmitted, 21 packets received, 0.0% packet loss
 round-trip min/avg/max/stddev = 17.618975/81.856545/143.709151/62.449087 ms
 # tcpdump -n -i sn0
 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
 listening on sn0, link-type EN10MB (Ethernet), capture size 262144 bytes
 [ 113.1305396] pool_redzone_check: 0xa35bc0: 0x00 != 0xdd
 [ 113.2024197] pool_redzone_check: 0xa35bc1: 0x3d != 0x7b
 14:55:26.263135 IP 192.168.20.1 > 192.168.20.35: ICMP echo request, id 65460, seq 0, length 64
 14:55:26.265119 IP 192.168.20.35 > 192.168.20.1: ICMP echo reply, id 65460, seq 0, length 64
 14:56:18.518105 IP 192.168.20.1.525 > 192.168.20.255.525: TSP_LOOP vers 1 seq 41214 hopcnt 10 name mirage
 ^C
 3 packets captured
 3 packets received by filter
 0 packets dropped by kernel
 # 
 ---

 Maybe we should check MI sonic driver (especially on RX) again,
 but with a quick glance I cannot find obvious botch.

 I also wonder if we should disable options DIAGNOSTIC in
 mac68k/conf/INSTALL for now..

 ---
 Izumi Tsutsui

From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: port-mac68k/57107: kernel panic on -current when configuring
 networkwith sn(4) on mac68k
Date: Fri, 30 Dec 2022 08:26:41 +0100

 On Fri, Dec 30, 2022 at 06:20:02AM +0000, Izumi Tsutsui wrote:
 >  I also wonder if we should disable options DIAGNOSTIC in
 >  mac68k/conf/INSTALL for now..

 That will turn the still existing bug into silent kernel memory corruption
 (unless this is a compiler issue, which sounds unlikely).

 Martin

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: martin@duskware.de
Cc: gnats-bugs@netbsd.org, tsutsui@ceres.dti.ne.jp
Subject: Re: port-mac68k/57107: kernel panic on -current when configuringnetworkwith
	 sn(4) on mac68k
Date: Fri, 30 Dec 2022 22:18:37 +0900

 martin@ wrote:

 >  On Fri, Dec 30, 2022 at 06:20:02AM +0000, Izumi Tsutsui wrote:
 >  >  I also wonder if we should disable options DIAGNOSTIC in
 >  >  mac68k/conf/INSTALL for now..
 >  
 >  That will turn the still existing bug into silent kernel memory corruption
 >  (unless this is a compiler issue, which sounds unlikely).

 On mac68k, options DIAGNOSTIC is not enabled even in GENERIC,
 but only INSTALL has it.  Is it intended?

 ---
 Izumi Tsutsui

From: Martin Husemann <martin@duskware.de>
To: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
Cc: gnats-bugs@netbsd.org
Subject: Re: port-mac68k/57107: kernel panic on -current when
 configuringnetworkwith sn(4) on mac68k
Date: Fri, 30 Dec 2022 15:28:42 +0100

 On Fri, Dec 30, 2022 at 10:18:37PM +0900, Izumi Tsutsui wrote:
 > On mac68k, options DIAGNOSTIC is not enabled even in GENERIC,
 > but only INSTALL has it.  Is it intended?

 Heh, no - makes no sense that way.
 I dimly recall size/bootloader issues (but all of bootloader is a sad
 story).

 Martin

From: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
To: gnats-bugs@netbsd.org
Cc: port-mac68k-maintainer@netbsd.org, gnats-admin@netbsd.org,
        netbsd@linear.network
Subject: Re: port-mac68k/57107: kernel panic on -current when
 configuringnetworkwith sn(4) on mac68k
Date: Fri, 30 Dec 2022 15:16:07 +0100

 On Fri, 30 Dec 2022 13:20:01 +0000 (UTC), Izumi Tsutsui wrote:
 > On mac68k, options DIAGNOSTIC is not enabled even in GENERIC,
 >  but only INSTALL has it.  Is it intended?

 Probably not...

 Cheerio,
 Hauke

 --=20
 Hauke Fath                        <hauke@Espresso.Rhein-Neckar.DE>
 Linn=E9weg 7
 64342 Seeheim-Jugenheim
 Germany

Responsible-Changed-From-To: port-mac68k-maintainer->tsutsui
Responsible-Changed-By: tsutsui@NetBSD.org
Responsible-Changed-When: Sat, 31 Dec 2022 04:25:20 +0000
Responsible-Changed-Why:
I'm checking this. (smells something wrong in m68k bus_dmamap_sync(9) PREREAD)


State-Changed-From-To: open->analyzed
State-Changed-By: tsutsui@NetBSD.org
State-Changed-When: Thu, 05 Jan 2023 15:15:59 +0000
State-Changed-Why:
15 years old bug in bus_dmamap_sync(9) in src/sys/arch/m68k/m68k/bus_dma.c
rev 1.25 by me :-(
 http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/m68k/m68k/bus_dma.c#rev1.25


From: "Izumi Tsutsui" <tsutsui@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/57107 CVS commit: src/sys/arch/m68k/m68k
Date: Thu, 5 Jan 2023 18:27:48 +0000

 Module Name:	src
 Committed By:	tsutsui
 Date:		Thu Jan  5 18:27:48 UTC 2023

 Modified Files:
 	src/sys/arch/m68k/m68k: bus_dma.c

 Log Message:
 Fix out of bounds invalidate (and writeback) in bus_dmamap_sync(9) ops.

 Detected by the POOL_REDZONE check in sys/kern/subr_pool.c that
 has been activated if options DIAGNOSTIC is enabled on post netbsd-9.
 The extra invalidate on DMASYNC_PREREAD op discards redzone pattern
 data allocated right after an mbuf cluster without proper writeback
 to memory so that it triggers false redzone assertions on freeing mbufs.
 This bug was my botch in rev 1.25 committed 15 years ago. (sigh)

 Fixes PR/57107 (kernel panic on -current when configuring network
 with sn(4) on mac68k), as actually the bus_dma(9) op changes
 in the past days were introduced for mac68k sn(4) improvements
 by using the MI SONIC (src/sys/dev/ic/dp83932.c) driver.
  https://mail-index.netbsd.org/port-mac68k/2007/06/01/0001.html

 Should be pulled up to netbsd-9 and netbsd-10.


 To generate a diff of this commit:
 cvs rdiff -u -r1.38 -r1.39 src/sys/arch/m68k/m68k/bus_dma.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Izumi Tsutsui" <tsutsui@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/57107 CVS commit: src/sys/arch/mac68k/conf
Date: Thu, 5 Jan 2023 18:48:13 +0000

 Module Name:	src
 Committed By:	tsutsui
 Date:		Thu Jan  5 18:48:13 UTC 2023

 Modified Files:
 	src/sys/arch/mac68k/conf: INSTALL

 Log Message:
 Disable (comment out) options DIAGNOSTIC in INSTALL kernels.

 It has been there since the initial revision 1.1 while
 it was disabled in GENERIC in revision 1.121 back in 2002:
  http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/mac68k/conf/GENERIC#rev1.121

 Briefly discussed in PR/57107, and maybe should be pulled up to
 netbsd-9 and netbsd-10.


 To generate a diff of this commit:
 cvs rdiff -u -r1.57 -r1.58 src/sys/arch/mac68k/conf/INSTALL

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: analyzed->needs-pullups
State-Changed-By: tsutsui@NetBSD.org
State-Changed-When: Thu, 05 Jan 2023 18:54:29 +0000
State-Changed-Why:
I'll send requests later.


State-Changed-From-To: needs-pullups->pending-pullups
State-Changed-By: tsutsui@NetBSD.org
State-Changed-When: Sat, 07 Jan 2023 04:18:29 +0000
State-Changed-Why:
[pullup-9 #1564][pullup-10 #39] sys/arch/m68k/m68k/bus_dma.c
[pullup-9 #1565][pullup-10 #40] sys/arch/mac68k/conf/INSTALL


From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/57107 CVS commit: [netbsd-10] src/sys/arch/m68k/m68k
Date: Sat, 7 Jan 2023 14:56:44 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Sat Jan  7 14:56:44 UTC 2023

 Modified Files:
 	src/sys/arch/m68k/m68k [netbsd-10]: bus_dma.c

 Log Message:
 Pull up following revision(s) (requested by tsutsui in ticket #39):

 	sys/arch/m68k/m68k/bus_dma.c: revision 1.39

 Fix out of bounds invalidate (and writeback) in bus_dmamap_sync(9) ops.

 Detected by the POOL_REDZONE check in sys/kern/subr_pool.c that
 has been activated if options DIAGNOSTIC is enabled on post netbsd-9.

 The extra invalidate on DMASYNC_PREREAD op discards redzone pattern
 data allocated right after an mbuf cluster without proper writeback
 to memory so that it triggers false redzone assertions on freeing mbufs.

 This bug was my botch in rev 1.25 committed 15 years ago. (sigh)

 Fixes PR/57107 (kernel panic on -current when configuring network
 with sn(4) on mac68k), as actually the bus_dma(9) op changes
 in the past days were introduced for mac68k sn(4) improvements
 by using the MI SONIC (src/sys/dev/ic/dp83932.c) driver.

 https://mail-index.netbsd.org/port-mac68k/2007/06/01/0001.html


 To generate a diff of this commit:
 cvs rdiff -u -r1.38 -r1.38.4.1 src/sys/arch/m68k/m68k/bus_dma.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/57107 CVS commit: [netbsd-9] src/sys/arch/m68k/m68k
Date: Sat, 7 Jan 2023 14:57:55 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Sat Jan  7 14:57:55 UTC 2023

 Modified Files:
 	src/sys/arch/m68k/m68k [netbsd-9]: bus_dma.c

 Log Message:
 Pull up following revision(s) (requested by tsutsui in ticket #1564):

 	sys/arch/m68k/m68k/bus_dma.c: revision 1.39

 Fix out of bounds invalidate (and writeback) in bus_dmamap_sync(9) ops.

 Detected by the POOL_REDZONE check in sys/kern/subr_pool.c that
 has been activated if options DIAGNOSTIC is enabled on post netbsd-9.

 The extra invalidate on DMASYNC_PREREAD op discards redzone pattern
 data allocated right after an mbuf cluster without proper writeback
 to memory so that it triggers false redzone assertions on freeing mbufs.

 This bug was my botch in rev 1.25 committed 15 years ago. (sigh)

 Fixes PR/57107 (kernel panic on -current when configuring network
 with sn(4) on mac68k), as actually the bus_dma(9) op changes
 in the past days were introduced for mac68k sn(4) improvements
 by using the MI SONIC (src/sys/dev/ic/dp83932.c) driver.

 https://mail-index.netbsd.org/port-mac68k/2007/06/01/0001.html


 To generate a diff of this commit:
 cvs rdiff -u -r1.35 -r1.35.34.1 src/sys/arch/m68k/m68k/bus_dma.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/57107 CVS commit: [netbsd-10] src/sys/arch/mac68k/conf
Date: Sat, 7 Jan 2023 15:00:54 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Sat Jan  7 15:00:54 UTC 2023

 Modified Files:
 	src/sys/arch/mac68k/conf [netbsd-10]: INSTALL

 Log Message:
 Pull up following revision(s) (requested by tsutsui in ticket #40):

 	sys/arch/mac68k/conf/INSTALL: revision 1.58

 Disable (comment out) options DIAGNOSTIC in INSTALL kernels.

 It has been there since the initial revision 1.1 while
 it was disabled in GENERIC in revision 1.121 back in 2002.

 Briefly discussed in PR/57107


 To generate a diff of this commit:
 cvs rdiff -u -r1.57 -r1.57.20.1 src/sys/arch/mac68k/conf/INSTALL

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/57107 CVS commit: [netbsd-9] src/sys/arch/mac68k/conf
Date: Sat, 7 Jan 2023 15:02:38 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Sat Jan  7 15:02:38 UTC 2023

 Modified Files:
 	src/sys/arch/mac68k/conf [netbsd-9]: INSTALL

 Log Message:
 Pull up following revision(s) (requested by tsutsui in ticket #1565):

 	sys/arch/mac68k/conf/INSTALL: revision 1.58

 Disable (comment out) options DIAGNOSTIC in INSTALL kernels.

 It has been there since the initial revision 1.1 while
 it was disabled in GENERIC in revision 1.121 back in 2002.

 Briefly discussed in PR/57107


 To generate a diff of this commit:
 cvs rdiff -u -r1.56 -r1.56.8.1 src/sys/arch/mac68k/conf/INSTALL

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: pending-pullups->closed
State-Changed-By: tsutsui@NetBSD.org
State-Changed-When: Sat, 07 Jan 2023 15:26:17 +0000
State-Changed-Why:
Fixed and pulled up to release branches. Thanks for a detailed report!


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2023 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.