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, 4 Mar 2010 16:33:38 GMT
From:	tip-bot for Will Deacon <will.deacon@....com>
To:	linux-tip-commits@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, acme@...hat.com, paulus@...ba.org,
	hpa@...or.com, mingo@...hat.com, a.p.zijlstra@...llo.nl,
	will.deacon@....com, efault@....de, jamie.iles@...ochip.com,
	fweisbec@...il.com, linux@....linux.org.uk, tglx@...utronix.de,
	mingo@...e.hu
Subject: [tip:perf/pebs] perf, ARM: Modify kuser rmb() call to compile for Thumb-2

Commit-ID:  da7196e1f986c846ffa8b2ec385223fad38e8518
Gitweb:     http://git.kernel.org/tip/da7196e1f986c846ffa8b2ec385223fad38e8518
Author:     Will Deacon <will.deacon@....com>
AuthorDate: Wed, 3 Mar 2010 11:47:58 +0000
Committer:  Ingo Molnar <mingo@...e.hu>
CommitDate: Thu, 4 Mar 2010 12:13:28 +0100

perf, ARM: Modify kuser rmb() call to compile for Thumb-2

The Thumb-2 instruction set does not provide an encoding
for sub pc, r0, #95 as present in the rmb() definition used
by perf. This results in compilation failure when using a
compiler targetting an instruction set other than ARM.

This patch redefines rmb() for ARM by casting the address
of the kuser helper to a function pointer, therefore getting
the compiler to take care of making the call.

Patch taken against tip/master.

Signed-off-by: Will Deacon <will.deacon@....com>
Cc: Russell King - ARM Linux <linux@....linux.org.uk>
Cc: Jamie Iles <jamie.iles@...ochip.com>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Mike Galbraith <efault@....de>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: Frederic Weisbecker <fweisbec@...il.com>
LKML-Reference: <1267616878-2154-1-git-send-email-will.deacon@....com>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
 tools/perf/perf.h |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/tools/perf/perf.h b/tools/perf/perf.h
index 75f941b..6fb379b 100644
--- a/tools/perf/perf.h
+++ b/tools/perf/perf.h
@@ -65,9 +65,7 @@
  * Use the __kuser_memory_barrier helper in the CPU helper page. See
  * arch/arm/kernel/entry-armv.S in the kernel source for details.
  */
-#define rmb()		asm volatile("mov r0, #0xffff0fff; mov lr, pc;" \
-				     "sub pc, r0, #95" ::: "r0", "lr", "cc", \
-				     "memory")
+#define rmb()		((void(*)(void))0xffff0fa0)()
 #define cpu_relax()	asm volatile("":::"memory")
 #endif
 
--
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