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, 17 May 2007 09:32:56 +1000
From:	Michael Ellerman <michael@...erman.id.au>
To:	Linas Vepstas <linas@...tin.ibm.com>
Cc:	Jeff Garzik <jgarzik@...ox.com>, netdev@...r.kernel.org,
	cbe-oss-dev@...abs.org
Subject: Re: [Cbe-oss-dev] [PATCH 4/10] spidernet: zero out a pointer.

On Wed, 2007-05-16 at 17:09 -0500, Linas Vepstas wrote:
> Invalidate a pointer as its pci_unmap'ed; this is a bit of 
> paranoia to make sure hardware doesn't continue trying to 
> DMA to it.
> 
> Signed-off-by: Linas Vepstas <linas@...tin.ibm.com>
> 
> ----
>  drivers/net/spider_net.c |    7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> Index: linux-2.6.22-rc1/drivers/net/spider_net.c
> ===================================================================
> --- linux-2.6.22-rc1.orig/drivers/net/spider_net.c	2007-05-15 13:31:11.000000000 -0500
> +++ linux-2.6.22-rc1/drivers/net/spider_net.c	2007-05-15 13:31:16.000000000 -0500
> @@ -1081,7 +1082,9 @@ spider_net_decode_one_descr(struct spide
>  	chain->tail = descr->next;
>  
>  	/* unmap descriptor */
> -	pci_unmap_single(card->pdev, hwdescr->buf_addr,
> +	hw_buf_addr = hwdescr->buf_addr;
> +	hwdescr->buf_addr = 0x0;

If you're going to be paranoid, shouldn't you do something here to make
sure the value's hit the device?

> +	pci_unmap_single(card->pdev, hw_buf_addr,
>  			SPIDER_NET_MAX_FRAME, PCI_DMA_FROMDEVICE);
>  

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person

Download attachment "signature.asc" of type "application/pgp-signature" (190 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ