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:	Wed, 23 Jun 2010 20:03:02 +1000
From:	"Ian Munsie" <imunsie@....ibm.com>
To:	linux-kernel@...r.kernel.org, linuxppc-dev@...abs.org
Cc:	Jason Baron <jbaron@...hat.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Ingo Molnar <mingo@...hat.com>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Paul Mackerras <paulus@...ba.org>,
	Michael Ellerman <michael@...erman.id.au>,
	Ian Munsie <imunsie@....ibm.com>,
	FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>,
	Grant Likely <grant.likely@...retlab.ca>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Anton Blanchard <anton@...ba.org>,
	Christoph Hellwig <hch@....de>,
	Russell King <rmk+kernel@....linux.org.uk>,
	"H. Peter Anvin" <hpa@...or.com>
Subject: [PATCH 21/40] trace syscalls, PPC: Add ftrace compat syscall support for PPC64

From: Ian Munsie <imunsie@....ibm.com>

This patch adds the necessary infrastructure to trace 32bit compat
syscalls on PowerPC64.

Signed-off-by: Ian Munsie <imunsie@....ibm.com>
---
 arch/powerpc/Kconfig              |    1 +
 arch/powerpc/include/asm/unistd.h |    4 ++++
 arch/powerpc/kernel/ftrace.c      |    7 +++++++
 3 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 0d5c28d..a724c93 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -142,6 +142,7 @@ config PPC
 	select HAVE_PERF_EVENTS
 	select HAVE_REGS_AND_STACK_ACCESS_API
 	select HAVE_SYSCALL_TRACEPOINTS
+	select HAVE_COMPAT_FTRACE_SYSCALLS if PPC64
 
 config EARLY_PRINTK
 	bool
diff --git a/arch/powerpc/include/asm/unistd.h b/arch/powerpc/include/asm/unistd.h
index f0a1026..f584b71 100644
--- a/arch/powerpc/include/asm/unistd.h
+++ b/arch/powerpc/include/asm/unistd.h
@@ -353,6 +353,10 @@
 #define __NR__exit __NR_exit
 #define NR_syscalls	__NR_syscalls
 
+#ifdef CONFIG_PPC64
+#define NR_syscalls_compat NR_syscalls
+#endif
+
 #ifndef __ASSEMBLY__
 
 #include <linux/types.h>
diff --git a/arch/powerpc/kernel/ftrace.c b/arch/powerpc/kernel/ftrace.c
index f5fadbb..dddbc33 100644
--- a/arch/powerpc/kernel/ftrace.c
+++ b/arch/powerpc/kernel/ftrace.c
@@ -619,3 +619,10 @@ inline bool arch_syscall_match_sym_name(const char *sym, const char *name)
 	return (!strcmp(sym + 4, name + 3));
 }
 #endif /* CONFIG_FTRACE_SYSCALLS && CONFIG_PPC64 */
+
+#ifdef CONFIG_COMPAT_FTRACE_SYSCALLS
+unsigned long __init arch_compat_syscall_addr(int nr)
+{
+	return sys_call_table[nr*2+1];
+}
+#endif
-- 
1.7.1

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