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:	Thu, 10 May 2007 23:38:39 +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:
> Jens Axboe wrote:
> <snip>
> > @@ -323,13 +324,17 @@ static int __dma_map_cont(struct scatterlist *sg, int start, int stopat,
> >  {
> >  	unsigned long iommu_start = alloc_iommu(pages);
> >  	unsigned long iommu_page = iommu_start; 
> > -	int i;
> > +	struct scatterlist *s;
> > +	int i, nelems;
> >  
> >  	if (iommu_start == -1)
> >  		return -1;
> > +
> > +	nelems = stopat - start;
> > +	while (start--)
> > +		sg = sg_next(sg);
> 
> Ouch.  This will suck if we merge many times in a long list.
> How about keeping and passing start as a struct scatterlist * rather
> than an index? (see attached example, (compiles, bu untested though)

It will suck indeed, I like your patch! I'll review and incorporate.
Your other points are good, noted.

-- 
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