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:	Fri, 14 Nov 2008 20:48:40 -0500 (EST)
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Frederic Weisbecker <fweisbec@...il.com>
cc:	Ingo Molnar <mingo@...e.hu>,
	Linux Kernel <linux-kernel@...r.kernel.org>,
	Andi Kleen <andi@...stfloor.org>
Subject: Re: [PATCH] tracing/function-return-tracer: Add a barrier to ensure
 return stack index is incremented in memory


On Sat, 15 Nov 2008, Frederic Weisbecker wrote:

> Impact: Fix possible race condition in ftrace function return tracer
> 
> This fixes a possible race condition if index incrementation
> is not immediately flushed in memory.
> 
> Thanks for Andi Kleen and Steven Rostedt for pointing out this issue
> and give me this solution.
> 
> Signed-off-by: Frederic Weisbecker <fweisbec@...il.com>
> Cc: Steven Rostedt <rostedt@...dmis.org>

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

-- Steve

> Cc: Andi Kleen <andi@...stfloor.org>
> ---
>  arch/x86/kernel/ftrace.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c
> index fe83273..db25236 100644
> --- a/arch/x86/kernel/ftrace.c
> +++ b/arch/x86/kernel/ftrace.c
> @@ -56,6 +56,7 @@ static int push_return_trace(unsigned long ret, unsigned long long time,
>  		return -EBUSY;
>  
>  	index = ++ti->curr_ret_stack;
> +	barrier();
>  	ti->ret_stack[index].ret = ret;
>  	ti->ret_stack[index].func = func;
>  	ti->ret_stack[index].calltime = time;

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