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:	Tue, 28 Jul 2009 09:49:15 -0700
From:	Joe Perches <joe@...ches.com>
To:	Octavian Purdila <opurdila@...acom.com>
Cc:	David Miller <davem@...emloft.net>, lgrijincu@...acom.com,
	netdev@...r.kernel.org, eric.dumazet@...il.com
Subject: Re: [PATCH] net: shrink net_device by #ifdef-ing protocol-specific
 members

On Tue, 2009-07-28 at 17:43 +0300, Octavian Purdila wrote:
> On Monday 27 July 2009 18:26:44 David Miller wrote:
> > From: Lucian Adrian Grijincu <lgrijincu@...acom.com>
> > > Some members of net_device are used only by some protocols.
> > > If those protocols are not compiled (as modules or linked in) they
> > > should not take up space in the structure.
> > This benefits, at best, %0.000000001 of users of the Linux kernel,
> > because every distribution is going to turn on every single option.
> Not all Linux users are using regular (desktop/server) distributions. Linux is 
> used in embedded systems as well and in these case it makes sense to turn off 
> ax25/econet/decnet and in some cases even wireless/ipv6.
> > If you want to shrink structures, find ways to eliminate or
> > shrink structure members in all cases.
> We are looking into that as well since we have a pretty aggressive goal (get 
> net_device to 450 bytes or so), but we thought of starting with the low 
> hanging fruits. 
> Any suggestions in this area?

Some maybe not so good ones:

Perhaps:
	struct timer_list	watchdog_timer;
might become a
	struct timer_list	*watchdog_timer;

Maybe all the protocol/mac/bridge/vlan/garp/wireless specific
pointers might become a pointer to a list or array of pointers
allocated on demand.

Maybe combine perm_addr/broadcast/mc_list/uc addresses into a
single list with type information.  Maybe include dev_addrs,
but it's iterated with an rcu lock held.

Gaining less than 0, except maybe for weird network testing devices,
use a pointer to struct net_device_stats.


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