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:	Mon, 12 Dec 2011 22:27:23 +0100
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Arun Sharma <asharma@...com>
Cc:	linux-kernel@...r.kernel.org, Kumar Sundararajan <kumar@...com>,
	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>,
	john stultz <johnstul@...ibm.com>,
	Andy Lutomirski <luto@....EDU>
Subject: Re: [PATCH 2/2] Add a thread cpu time implementation to vDSO

Le lundi 12 décembre 2011 à 13:19 -0800, Arun Sharma a écrit :
> On 12/12/11 12:13 PM, Eric Dumazet wrote:
> 
> >> +
> >> +struct vcpu_data {
> >> +	struct vpercpu_data vpercpu[NR_CPUS];
> >> +	unsigned int tsc_khz;
> >> +	unsigned int tsc_unstable;
> >> +};
> >
> > Thats a showstopper.
> >
> > Try to compile the thing with NR_CPUS=4096 ?
> >
> 
> I get a link time error:
> 
> ld: section .data..percpu [0000000001ac2000 -> 0000000001ad48ff] 
> overlaps section .vvar [0000000001ac0000 -> 0000000001b0083f]
> 
> which I consider better than runtime memory corruption :)
> 
> I could add a BUILD_BUG_ON() that tries to catch this earlier in the 
> compile process.
> 
> Re: Fixing the build for NR_CPUS > 64
> 
> How about something along the lines of the following:
> 
> From: Arun Sharma <asharma@...com>
> Date: Mon, 12 Dec 2011 13:13:43 -0800
> Subject: [PATCH] Handle NR_CPUS > 64
> 
> ---

This only works if CONFIG_X86_L1_CACHE_SHIFT=6

Some configurations have 128 bytes cache lines

But really most modern distros have NR_CPUS > 64



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ