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: <20171214043434.GO7829@linux.vnet.ibm.com>
Date:   Wed, 13 Dec 2017 20:34:34 -0800
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>
Subject: Re: [for-next][PATCH 7/7] tracing: Have stack trace not record if
 RCU is not watching

On Wed, Dec 13, 2017 at 03:47:03PM -0500, Steven Rostedt wrote:
> From: "Steven Rostedt (VMware)" <rostedt@...dmis.org>
> 
> The stack tracer records a stack dump whenever it sees a stack usage that is
> more than what it ever saw before. This can happen at any function that is
> being traced. If it happens when the CPU is going idle (or other strange
> locations), RCU may not be watching, and in this case, the recording of the
> stack trace will trigger a warning. There's been lots of efforts to make
> hacks to allow stack tracing to proceed even if RCU is not watching, but
> this only causes more issues to appear. Simply do not trace a stack if RCU
> is not watching. It probably isn't a bad stack anyway.
> 
> Cc: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
> Signed-off-by: Steven Rostedt (VMware) <rostedt@...dmis.org>

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

> ---
>  kernel/trace/trace_stack.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/kernel/trace/trace_stack.c b/kernel/trace/trace_stack.c
> index 734accc02418..3c7bfc4bf5e9 100644
> --- a/kernel/trace/trace_stack.c
> +++ b/kernel/trace/trace_stack.c
> @@ -209,6 +209,10 @@ stack_trace_call(unsigned long ip, unsigned long parent_ip,
>  	if (__this_cpu_read(disable_stack_tracer) != 1)
>  		goto out;
> 
> +	/* If rcu is not watching, then save stack trace can fail */
> +	if (!rcu_is_watching())
> +		goto out;
> +
>  	ip += MCOUNT_INSN_SIZE;
> 
>  	check_stack(ip, &stack);
> -- 
> 2.13.2
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ