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]
Message-ID: <20090401101054.0a4b187d@skybase>
Date:	Wed, 1 Apr 2009 10:10:54 +0200
From:	Martin Schwidefsky <schwidefsky@...ibm.com>
To:	Tejun Heo <tj@...nel.org>
Cc:	Ingo Molnar <mingo@...e.hu>, rusty@...tcorp.com.au,
	tglx@...utronix.de, x86@...nel.org, linux-kernel@...r.kernel.org,
	hpa@...or.com, Paul Mundt <lethal@...ux-sh.org>,
	rmk@....linux.org.uk, starvik@...s.com, ralf@...ux-mips.org,
	davem@...emloft.net, cooloney@...nel.org, kyle@...artin.ca,
	matthew@....cx, grundler@...isc-linux.org, takata@...ux-m32r.org,
	benh@...nel.crashing.org, rth@...ddle.net,
	ink@...assic.park.msu.ru, heiko.carstens@...ibm.com
Subject: Re: [GIT RFC] percpu: use dynamic percpu allocator as the default
 percpu allocator

On Wed, 01 Apr 2009 09:07:41 +0900
Tejun Heo <tj@...nel.org> wrote:

> Martin Schwidefsky wrote:
> > 
> > I got the dynamic cpu allocator to work with the patch below. Anybody
> > with an objection against the SHIFT_PERCPU_VAR macro ?
> 
> One of the main goals of the percpu allocator is removing the
> distinction between statically and dynamically allocated percpu
> variables, so that it can be treated like other normal variables.  For
> all archs other than s390, alpha and ia64, achieving this is easy, so
> I wish we could come up with solution for the three archs too.  Is it
> possible to do similar stuff with pointer values with input
> constraint which can take both constant and variable?

Is the goal to use the same access macros for both dynamically and
statically allocated percpu variables? That would make the proposed
solution impractical.

The "X" constraint trick we used so far tells the compiler to pass the
argument verbatim to the assembler. The assembler knows how to deal
with symbol@...ENT. If we pass a gcc variable or even a more general
term via an "X" constraint the assembler gets <something C-ish>@GOTENT.
It is not possible to parse this in the assembler. To do what you want
to achieve would mean to avoid using the "X" constraint. Which means
that we cannot use the GOTENT trick anymore. If we let the compiler
resolve the address for a static per cpu variable we end up with the
larl problem. Ouch!

So far the SHIFT_PERCPU_PTR/SHIFT_PERCPU_VAR is the only solution
I have found for s390 and the dynamic percpu allocator. I'll keep
looking for a better solution but I am not optimistic.

-- 
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.

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