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>] [day] [month] [year] [list]
Message-Id: <1197671928.898.69.camel@brick>
Date:	Fri, 14 Dec 2007 14:38:48 -0800
From:	Harvey Harrison <harvey.harrison@...il.com>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	"H. Peter Anvin" <hpa@...or.com>,
	LKML <linux-kernel@...r.kernel.org>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: [PATCH] x86: Add temporary ifdefs to kprobes_{32|64}.c

Keep reducing the diff size moving code around.  This will get
cleaner in the final unified file.

Signed-off-by: Harvey Harrison <harvey.harrison@...il.com>
---
 arch/x86/kernel/kprobes_32.c |   15 +++++++++++++++
 arch/x86/kernel/kprobes_64.c |   17 ++++++++++++-----
 2 files changed, 27 insertions(+), 5 deletions(-)

diff --git a/arch/x86/kernel/kprobes_32.c b/arch/x86/kernel/kprobes_32.c
index cebc077..f4ba584 100644
--- a/arch/x86/kernel/kprobes_32.c
+++ b/arch/x86/kernel/kprobes_32.c
@@ -915,12 +915,27 @@ int __kprobes longjmp_break_handler(struct kprobe *p, struct pt_regs *regs)
 	return 0;
 }
 
+#ifdef CONFIG_X86_64
+static struct kprobe trampoline_p = {
+	.addr = (kprobe_opcode_t *) &kretprobe_trampoline,
+	.pre_handler = trampoline_probe_handler
+};
+#endif
+
 int __kprobes arch_trampoline_kprobe(struct kprobe *p)
 {
+#ifdef CONFIG_X86_64
+	if (p->addr == (kprobe_opcode_t *)&kretprobe_trampoline)
+		return 1;
+#endif
 	return 0;
 }
 
 int __init arch_init_kprobes(void)
 {
+#ifdef CONFIG_X86_32
 	return 0;
+#else
+	return register_kprobe(&trampoline_p);
+#endif
 }
diff --git a/arch/x86/kernel/kprobes_64.c b/arch/x86/kernel/kprobes_64.c
index 6f62a4a..13a92ef 100644
--- a/arch/x86/kernel/kprobes_64.c
+++ b/arch/x86/kernel/kprobes_64.c
@@ -869,20 +869,27 @@ int __kprobes longjmp_break_handler(struct kprobe *p, struct pt_regs *regs)
 	return 0;
 }
 
+#ifdef CONFIG_X86_64
 static struct kprobe trampoline_p = {
 	.addr = (kprobe_opcode_t *) &kretprobe_trampoline,
 	.pre_handler = trampoline_probe_handler
 };
-
-int __init arch_init_kprobes(void)
-{
-	return register_kprobe(&trampoline_p);
-}
+#endif
 
 int __kprobes arch_trampoline_kprobe(struct kprobe *p)
 {
+#ifdef CONFIG_X86_64
 	if (p->addr == (kprobe_opcode_t *)&kretprobe_trampoline)
 		return 1;
+#endif
+	return 0;
+}
 
+int __init arch_init_kprobes(void)
+{
+#ifdef CONFIG_X86_32
 	return 0;
+#else
+	return register_kprobe(&trampoline_p);
+#endif
 }
-- 
1.5.4.rc0.1083.gf568



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