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]
Message-ID: <1383075117.1534.23.camel@bwh-desktop.uk.level5networks.com>
Date:	Tue, 29 Oct 2013 19:31:57 +0000
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	David Miller <davem@...emloft.net>, <ricec2@....edu>
CC:	<netdev@...r.kernel.org>
Subject: Re: [PATCH net-next] 3c515: Fix warning when building

On Tue, 2013-10-29 at 00:03 -0400, David Miller wrote:
> From: Colin Rice <ricec2@....edu>
> Date: Fri, 25 Oct 2013 21:59:46 +0000
> 
> > -		outl((int) (skb->data), ioaddr + Wn7_MasterAddr);
> > +		outl((size_t) (skb->data), ioaddr + Wn7_MasterAddr);
> 
> outl() takes an "int" not a "size_t".   You're avoiding the warning,
> but on 64-bit, for example, you're silently allowing the compiler
> to accept chopping off the top 32-bits of the 64-bit pointer address
> off.
> 
> The warning is valid, this code won't work in certain environments,
> and killing the warning is just papering over the problem such that
> it will never get addressed properly.
> 
> I'm not applying patches like this, sorry.

The driver is writing a virtual address as the DMA address.  The
hardware is an ISA device and will presumably ignore the top 8 bits,
thus doing the virt-to-bus conversion for us.  Very efficient - so long
as this runs on a PC with no more than 16 MB RAM.

For other chips with a DMA descriptor ring, the driver uses
isa_virt_to_bus() which is less efficient but no more correct.

Maybe the driver should just be deleted, as it doesn't look like it's
actually usable any more.

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ