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:	Sat, 31 Aug 2013 13:02:29 -0700
From:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Jiri Olsa <jolsa@...hat.com>, "H. Peter Anvin" <hpa@...or.com>,
	"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>
Subject: Re: [RFC][PATCH 17/18 v2] ftrace/cpuidle/x86: Mark functions that
 are RCU unsafe

On Sat, Aug 31, 2013 at 01:11:34AM -0400, Steven Rostedt wrote:
> From: "Steven Rostedt (Red Hat)" <rostedt@...dmis.org>
> 
> Some callbacks of the function tracer use rcu_read_lock(). This means that
> there's places that can not be traced because RCU is not tracking the CPU
> for various reasons (like NO_HZ_FULL and coming back from userspace).
> 
> Thes functions need to be marked so that callbacks that use RCU do not
> trace them.
> 
> Cc: H. Peter Anvin <hpa@...or.com>
> Cc: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> Signed-off-by: Steven Rostedt <rostedt@...dmis.org>

Acked-by: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>

> ---
>  arch/x86/kernel/process.c |    2 ++
>  drivers/cpuidle/cpuidle.c |    2 ++
>  kernel/cpu/idle.c         |    2 ++
>  3 files changed, 6 insertions(+)
> 
> diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
> index 83369e5..18739cd 100644
> --- a/arch/x86/kernel/process.c
> +++ b/arch/x86/kernel/process.c
> @@ -17,6 +17,7 @@
>  #include <linux/stackprotector.h>
>  #include <linux/tick.h>
>  #include <linux/cpuidle.h>
> +#include <linux/ftrace.h>
>  #include <trace/events/power.h>
>  #include <linux/hw_breakpoint.h>
>  #include <asm/cpu.h>
> @@ -316,6 +317,7 @@ void default_idle(void)
>  #ifdef CONFIG_APM_MODULE
>  EXPORT_SYMBOL(default_idle);
>  #endif
> +FTRACE_UNSAFE_RCU(default_idle);
> 
>  #ifdef CONFIG_XEN
>  bool xen_set_default_idle(void)
> diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
> index fdc432f..9515457 100644
> --- a/drivers/cpuidle/cpuidle.c
> +++ b/drivers/cpuidle/cpuidle.c
> @@ -19,6 +19,7 @@
>  #include <linux/ktime.h>
>  #include <linux/hrtimer.h>
>  #include <linux/module.h>
> +#include <linux/ftrace.h>
>  #include <trace/events/power.h>
> 
>  #include "cpuidle.h"
> @@ -168,6 +169,7 @@ int cpuidle_idle_call(void)
> 
>  	return 0;
>  }
> +FTRACE_UNSAFE_RCU(cpuidle_idle_call);
> 
>  /**
>   * cpuidle_install_idle_handler - installs the cpuidle idle loop handler
> diff --git a/kernel/cpu/idle.c b/kernel/cpu/idle.c
> index e695c0a..d9d290f 100644
> --- a/kernel/cpu/idle.c
> +++ b/kernel/cpu/idle.c
> @@ -5,6 +5,7 @@
>  #include <linux/cpu.h>
>  #include <linux/tick.h>
>  #include <linux/mm.h>
> +#include <linux/ftrace.h>
>  #include <linux/stackprotector.h>
> 
>  #include <asm/tlb.h>
> @@ -61,6 +62,7 @@ void __weak arch_cpu_idle(void)
>  	cpu_idle_force_poll = 1;
>  	local_irq_enable();
>  }
> +FTRACE_UNSAFE_RCU(arch_cpu_idle);
> 
>  /*
>   * Generic idle loop implementation
> -- 
> 1.7.10.4
> 
> 

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