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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 18 Mar 2009 13:12:46 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Paul Mackerras <paulus@...ba.org>
Cc:	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH] perfcounters: abstract wakeup flag setting in core to
	fix powerpc build


* Paul Mackerras <paulus@...ba.org> wrote:

> Impact: build fix for powerpc
> 
> Commit bd753921015e7905 ("perf_counter: software counter event
> infrastructure") introduced a use of TIF_PERF_COUNTERS into the core
> perfcounter code.  This breaks the build on powerpc because we use
> a flag in a per-cpu area to signal wakeups on powerpc rather than
> a thread_info flag, because the thread_info flags have to be
> manipulated with atomic operations and are thus slower than per-cpu
> flags.
> 
> This fixes the by changing the core to use an abstracted
> set_perf_counter_pending() function, which is defined on x86 to set
> the TIF_PERF_COUNTERS flag and on powerpc to set the per-cpu flag
> (paca->perf_counter_pending).  It changes the previous powerpc
> definition of set_perf_counter_pending to not take an argument and
> adds a clear_perf_counter_pending, so as to simplify the definition
> on x86.
> 
> On x86, set_perf_counter_pending() is defined as a macro.  Defining
> it as a static inline in arch/x86/include/asm/perf_counters.h causes
> compile failures because <asm/perf_counters.h> gets included early in
> <linux/sched.h>, and the definitions of set_tsk_thread_flag etc. are
> therefore not available in <asm/perf_counters.h>.  (On powerpc this
> problem is avoided by defining set_perf_counter_pending etc. in
> <asm/hw_irq.h>.)
> 
> Signed-off-by: Paul Mackerras <paulus@...ba.org>
> ---
> This is in the master branch of my perfcounters.git repository at:
> 
> git://git.kernel.org/pub/scm/linux/kernel/git/paulus/perfcounters.git master
> 
>  arch/powerpc/include/asm/hw_irq.h   |   14 +++++++++++---
>  arch/powerpc/kernel/irq.c           |   11 +++--------
>  arch/powerpc/kernel/perf_counter.c  |    3 +--
>  arch/x86/include/asm/perf_counter.h |    3 +++
>  kernel/perf_counter.c               |    2 +-
>  5 files changed, 19 insertions(+), 14 deletions(-)

Pulled, thanks Paul!

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