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, 10 Jun 2008 20:05:18 +0200
From:	Eric Dumazet <dada1@...mosbay.com>
To:	Christoph Lameter <clameter@....com>
Cc:	Mike Travis <travis@....com>, akpm@...ux-foundation.org,
	linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org,
	David Miller <davem@...emloft.net>,
	Peter Zijlstra <peterz@...radead.org>,
	Rusty Russell <rusty@...tcorp.com.au>
Subject: Re: [patch 02/41] cpu alloc: The allocator

Christoph Lameter a écrit :
> On Wed, 4 Jun 2008, Mike Travis wrote:
> 
>> I'm a bit confused.  Why is DEFINE_PER_CPU_SHARED_ALIGNED() conditioned on
>> ifdef MODULE?
>>
>>         #ifdef MODULE
>>         #define SHARED_ALIGNED_SECTION ".data.percpu"
>>         #else
>>         #define SHARED_ALIGNED_SECTION ".data.percpu.shared_aligned"
>>         #endif
>>
>>         #define DEFINE_PER_CPU_SHARED_ALIGNED(type, name)                       \
>>                 __attribute__((__section__(SHARED_ALIGNED_SECTION)))            \
>>                 PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name             \
>>                 ____cacheline_aligned_in_smp
> 
> Looks wrong to me. There can be shared objects even without modules.
> 
> 

Well, MODULE is not CONFIG_MODULES :)

If compiling an object that is going to be statically linked to kernel, 
MODULE is not defined, so we have shared objects.

When compiling a module, we cannot *yet* use .data.percpu.shared_aligned 
section, since module loader wont handle this section.

Alternative is to change modules linking for all arches to merge 
.data.percpu{*} subsections correctly, or tell module loader to take 
into account all .data.percpu sections.

AFAIK no module uses DEFINE_PER_CPU_SHARED_ALIGNED() yet...



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