From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752219AbYFBR4W (ORCPT ); Mon, 2 Jun 2008 13:56:22 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752892AbYFBR4K (ORCPT ); Mon, 2 Jun 2008 13:56:10 -0400 Received: from hrndva-omtalb.mail.rr.com ([71.74.56.123]:51567 "EHLO hrndva-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752116AbYFBR4J (ORCPT ); Mon, 2 Jun 2008 13:56:09 -0400 Date: Mon, 2 Jun 2008 13:56:06 -0400 (EDT) From: Steven Rostedt X-X-Sender: rostedt@gandalf.stny.rr.com To: Abhishek Sagar cc: Ingo Molnar , Thomas Gleixner , LKML Subject: Re: [PATCH 0/3][RFC] ftrace: track dynamic ftrace update failures In-Reply-To: <4842CB8F.2000702@gmail.com> Message-ID: References: <4842CB8F.2000702@gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 1 Jun 2008, Abhishek Sagar wrote: > > Hi Steven/Ingo, > > In dynamic ftrace any record which fails gets freed to be recycled. This > happens normally during (although not limited to) tracing of init functions. > In general, failures can happen due to multiple reason, such as external > patching of kernel functions, instrumentation of the mcount calls-sites, > hardware error etc. As an example, in the case of kprobes if a probe is > installed on the mcount call site (before being converted to NOP or after) then > eventually ftrace will detect it and free the corresponding record. Kprobes > however will keep on single-sepping the instruction it installed the probe on. > > These patches prevent freeing of records which have failed (except for init > functions). This prevents re-recording of failed functions and allows tracking > them so that they can be listed using a new debugfs file -> 'failures'. The > main change here is preventing removal of ftrace records from ftace_hash. This > way records can be looked up by their 'ip' at any time. > Hi Abhishek, Have you also taken into account adding and removing of modules? This can cause some funny behaviours with ftrace that can be rather dangerous. -- Steve