lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 21 May 2007 08:32:49 +0200
From:	Jens Axboe <jens.axboe@...cle.com>
To:	Benny Halevy <bhalevy@...asas.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 8/12] x86-64: update iommu/dma mapping functions to sg  helpers

On Thu, May 10 2007, Benny Halevy wrote:
> @@ -411,12 +406,13 @@ int gart_map_sg(struct device *dev, struct scatterlist *sg, int nents, int dir)
>  			   boundary and the new one doesn't have an offset. */
>  			if (!iommu_merge || !nextneed || !need || s->offset ||
>  			    (ps->offset + ps->length) % PAGE_SIZE) { 
> -				if (dma_map_cont(sg, start, i, sg+out, pages,
> -						 need) < 0)
> +				if (dma_map_cont(start_sg, i - start, sg+out,
> +						  pages, need) < 0)
>  					goto error;
>  				out++;
>  				pages = 0;
> -				start = i;	
> +				start = i;
> +				start_sg = s;
>  			}
>  		}
>  
> @@ -424,7 +420,7 @@ int gart_map_sg(struct device *dev, struct scatterlist *sg, int nents, int dir)
>  		pages += to_pages(s->offset, s->length);
>  		ps = s;
>  	}
> -	if (dma_map_cont(sg, start, i, sg+out, pages, need) < 0)
> +	if (dma_map_cont(start_sg, i - start, sg+out, pages, need) < 0)
>  		goto error;
>  	out++;
>  	flush_gart();

Your patch is (very) buggy, the whole premise of doing chained sg
entries makes sg + int illegal!

-- 
Jens Axboe

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ