NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

re: port-arm/55737: Apparent bug in evbarm64 DMA code causes filesystem corruption



The following reply was made to PR port-arm/55737; it has been noted by GNATS.

From: matthew green <mrg%eterna.com.au@localhost>
To: port-arm-maintainer%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,
    netbsd-bugs%netbsd.org@localhost, gnats-bugs%netbsd.org@localhost, skrll%netbsd.org@localhost,
    rmtodd%servalan.servalan.com@localhost
Cc: 
Subject: re: port-arm/55737: Apparent bug in evbarm64 DMA code causes filesystem corruption
Date: Tue, 20 Oct 2020 17:31:48 +1100

 matthew green writes:
 > i think both are wrong.  it should start true, and if any
 > entry is outside the parent range, set to false.
 
 i meant to include this untested patch.  not meant to be
 commited as-is, but should confirm or deny my guess with
 a repro attempt.
 
 
 .mrg.
 
 
 Index: bus_dma.c
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/arm/arm32/bus_dma.c,v
 retrieving revision 1.123
 diff -p -u -r1.123 bus_dma.c
 --- bus_dma.c	8 Sep 2020 10:30:17 -0000	1.123
 +++ bus_dma.c	20 Oct 2020 06:29:52 -0000
 @@ -1816,7 +1816,7 @@ _bus_dmatag_subregion(bus_dma_tag_t tag,
  
  #ifdef _ARM32_NEED_BUS_DMA_BOUNCE
  	struct arm32_dma_range *dr;
 -	bool subset = false;
 +	bool subset = true;
  	size_t nranges = 0;
  	size_t i;
  	for (i = 0, dr = tag->_ranges; i < tag->_nranges; i++, dr++) {
 @@ -1826,7 +1826,7 @@ _bus_dmatag_subregion(bus_dma_tag_t tag,
  		 */
  		if (dr->dr_sysbase >= min_addr
  		    && dr->dr_sysbase + dr->dr_len - 1 <= max_addr) {
 -			subset = true;
 +			//subset = true;
  		} else {
  			subset = false;
  		}
 


Home | Main Index | Thread Index | Old Index