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]
Message-ID: <1265291391.24386.16.camel@gandalf.stny.rr.com>
Date:	Thu, 04 Feb 2010 08:49:50 -0500
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Masami Hiramatsu <mhiramat@...hat.com>
Cc:	Ingo Molnar <mingo@...e.hu>, lkml <linux-kernel@...r.kernel.org>,
	systemtap <systemtap@...rces.redhat.com>,
	DLE <dle-develop@...ts.sourceforge.net>,
	PrzemysławPawełczyk <przemyslaw@...elczyk.it>,
	Frederic Weisbecker <fweisbec@...il.com>
Subject: Re: [PATCH -tip 4/4] ftrace: Remove record freezing

Sorry for the late reply.


On Tue, 2010-02-02 at 16:49 -0500, Masami Hiramatsu wrote:
> Remove record freezing. Because kprobes never puts probe on
> ftrace's mcount call anymore, it doesn't need ftrace to check
> whether kprobes on it.
> 
> Signed-off-by: Masami Hiramatsu <mhiramat@...hat.com>
> Cc: Ingo Molnar <mingo@...e.hu>

Acked-by: Steven Rostedt <rostedt@...dmis.org>

-- Steve

> Cc: Przemysław Pawełczyk <przemyslaw@...elczyk.it>
> Cc: Frederic Weisbecker <fweisbec@...il.com>
> ---
> 
>  include/linux/ftrace.h |    1 -
>  kernel/trace/ftrace.c  |   39 ---------------------------------------
>  2 files changed, 0 insertions(+), 40 deletions(-)
> 
> diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
> index 9d127ef..eb054ae 100644
> --- a/include/linux/ftrace.h
> +++ b/include/linux/ftrace.h
> @@ -143,7 +143,6 @@ enum {
>  	FTRACE_FL_ENABLED	= (1 << 3),
>  	FTRACE_FL_NOTRACE	= (1 << 4),
>  	FTRACE_FL_CONVERTED	= (1 << 5),
> -	FTRACE_FL_FROZEN	= (1 << 6),
>  };
>  
>  struct dyn_ftrace {
> diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
> index 3d90661..1904797 100644
> --- a/kernel/trace/ftrace.c
> +++ b/kernel/trace/ftrace.c
> @@ -22,7 +22,6 @@
>  #include <linux/hardirq.h>
>  #include <linux/kthread.h>
>  #include <linux/uaccess.h>
> -#include <linux/kprobes.h>
>  #include <linux/ftrace.h>
>  #include <linux/sysctl.h>
>  #include <linux/ctype.h>
> @@ -898,36 +897,6 @@ static struct dyn_ftrace *ftrace_free_records;
>  		}				\
>  	}
>  
> -#ifdef CONFIG_KPROBES
> -
> -static int frozen_record_count;
> -
> -static inline void freeze_record(struct dyn_ftrace *rec)
> -{
> -	if (!(rec->flags & FTRACE_FL_FROZEN)) {
> -		rec->flags |= FTRACE_FL_FROZEN;
> -		frozen_record_count++;
> -	}
> -}
> -
> -static inline void unfreeze_record(struct dyn_ftrace *rec)
> -{
> -	if (rec->flags & FTRACE_FL_FROZEN) {
> -		rec->flags &= ~FTRACE_FL_FROZEN;
> -		frozen_record_count--;
> -	}
> -}
> -
> -static inline int record_frozen(struct dyn_ftrace *rec)
> -{
> -	return rec->flags & FTRACE_FL_FROZEN;
> -}
> -#else
> -# define freeze_record(rec)			({ 0; })
> -# define unfreeze_record(rec)			({ 0; })
> -# define record_frozen(rec)			({ 0; })
> -#endif /* CONFIG_KPROBES */
> -
>  static void ftrace_free_rec(struct dyn_ftrace *rec)
>  {
>  	rec->freelist = ftrace_free_records;
> @@ -1091,14 +1060,6 @@ static void ftrace_replace_code(int enable)
>  		    !(rec->flags & FTRACE_FL_CONVERTED))
>  			continue;
>  
> -		/* ignore updates to this record's mcount site */
> -		if (get_kprobe((void *)rec->ip)) {
> -			freeze_record(rec);
> -			continue;
> -		} else {
> -			unfreeze_record(rec);
> -		}
> -
>  		failed = __ftrace_replace_code(rec, enable);
>  		if (failed) {
>  			rec->flags |= FTRACE_FL_FAILED;
> 
> 


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