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] [day] [month] [year] [list]
Date:	Thu, 20 Nov 2008 14:52:35 +1030
From:	Rusty Russell <rusty@...tcorp.com.au>
To:	David Miller <davem@...emloft.net>
Cc:	dada1@...mosbay.com, netdev@...r.kernel.org
Subject: Re: [PATCH] net: make ip_rt_acct a normal percpu var

On Thursday 20 November 2008 09:47:54 David Miller wrote:
> We make a big fuss (rightly) about a few hundred bytes and this sucker
> is FOUR KILOBYTES.

Sure, but this is just trading 4k runtime for 4k static, ie. it's just 
unhiding it.  That's very different from adding random bloat.

> Really for the time being I'd rather see this converted to a
> num_possible_cpus() sized normal kzalloc() and direct indexing.  I
> don't want the networking to bloat up the main kernel image by so
> much.

Nooooooo! :)

First, num_possible_cpus() is the wrong answer (if there are holes in 
cpu_possible_map).  Second, there's little point having percpu infrastructure 
which people avoid.  Third, that memory not going to be numa-aware.  Fourth, 
the dynamic percpu version is fewer instructions (with dynamic percpu 
patches).

I've spent an hour trying to implement DEFINE_PER_CPU_ZERO(), but AFAICT it 
can't be done (gas rejects "b" as a section attribute) :(

So I've dropped the patch, but I wonder if this 4k of stats should be here at 
all.

Thanks,
Rusty.
--
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