netdev
[Top] [All Lists]

Re: net: generic netdev_ioaddr

To: Krzysztof Halasa <khc@xxxxxxxxx>
Subject: Re: net: generic netdev_ioaddr
From: Al Viro <viro@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 29 Oct 2004 20:38:27 +0100
Cc: Pekka J Enberg <penberg@xxxxxxxxxxxxxx>, davem@xxxxxxxxxxxxx, netdev@xxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
In-reply-to: <m3y8hpbaf9.fsf@xxxxxxxxxxxxxxxxx>
References: <1099044244.9566.0.camel@localhost> <20041029131607.GU24336@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <courier.418290EC.00002E85@xxxxxxxxxxxxxxxxxxxxxx> <m3y8hpbaf9.fsf@xxxxxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.4.1i
On Fri, Oct 29, 2004 at 09:18:18PM +0200, Krzysztof Halasa wrote:
> "Pekka J Enberg" <penberg@xxxxxxxxxxxxxx> writes:
> 
> > Yup, I thought about that after I sent the patch. However, as it
> > stands now, many network drivers use netdev->base_addr for just that.
> > Perhaps it should be nuked completely instead?
> 
> I thinks so. With ifmap, SIOCSIFMAP, ifr_map, mem_end etc.,
> irq, if_port, dma.

SIOCSIFMAP is unfortunate, but legitimate - it passes more or less
opaque structure to driver and lets driver interpret it.

SIOCGIFMAP, OTOH, is really bad - among other things, for many drivers
it leaks ioremapped addresses to userland.  And *that* is a LARTable
offense - it's an information that makes no sense whatsoever for userland
code and should never be exposed, just as with any kernel pointers.

What uses ->base_addr from the data returned by SIOCGIFMAP?

<Prev in Thread] Current Thread [Next in Thread>