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:	Mon, 23 Jun 2008 22:15:25 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Abhishek Sagar <sagar.abhishek@...il.com>
Cc:	Steven Rostedt <rostedt@...dmis.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 0/4] ftrace: prevent ftrace modifications while being
	kprobe'd


* Abhishek Sagar <sagar.abhishek@...il.com> wrote:

> Hi Steven/Ingo,
> 
> These patches address the problem of kprobe registration interfering 
> with dynamic ftrace. A kprobe registered on an mcount call-site can 
> modify that address multiple times during its duration of probing. At 
> the same time, ftrace may simultaneously modify these locations. This 
> could be fatal especially if ftrace modifies the call-site during a 
> kprobe registration on it (between arch_prepare_kprobe and 
> arch_arm_kprobe in __register_kprobe to be more precise). So as a 
> "fix", I've disabled any updates on the mcount call-site while it's 
> being kprobe'd.

applied to tip/tracing/ftrace, thanks Abhishek.

note that i had to do a number of fixups to themerge, and there was one 
chunk which did not merge cleanly and i left it out for now:

@@ -435,8 +502,12 @@ static void ftrace_replace_code(int enable)
                                continue;

                        /* ignore updates to this record's mcount site */
-                       if (get_kprobe((void *)rec->ip))
+                       if (get_kprobe((void *)rec->ip)) {
+                               freeze_record(rec);
                                continue;
+                       } else {
+                               unfreeze_record(rec);
+                       }

please send a delta patch against tip/tracing/ftrace to get that kprobes 
fix. You can pick up -tip via:

 http://people.redhat.com/mingo/tip.git/README

	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