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: <20160212143547.703d9e9f@gandalf.local.home>
Date:	Fri, 12 Feb 2016 14:35:47 -0500
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Yang Shi <yang.shi@...aro.org>
Cc:	aryabinin@...tuozzo.com, mingo@...hat.com,
	linux-kernel@...r.kernel.org, linaro-kernel@...ts.linaro.org
Subject: Re: [PATCH] trace, kasan: silence Kasan warning in check_stack

On Mon,  8 Feb 2016 10:39:42 -0800
Yang Shi <yang.shi@...aro.org> wrote:

> 
> Signed-off-by: Yang Shi <yang.shi@...aro.org>
> ---
>  kernel/trace/trace_stack.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/trace/trace_stack.c b/kernel/trace/trace_stack.c
> index 202df6c..61e5e1e 100644
> --- a/kernel/trace/trace_stack.c
> +++ b/kernel/trace/trace_stack.c
> @@ -156,7 +156,7 @@ check_stack(unsigned long ip, unsigned long *stack)
>  		for (; p < top && i < stack_trace_max.nr_entries; p++) {
>  			if (stack_dump_trace[i] == ULONG_MAX)
>  				break;
> -			if (*p == stack_dump_trace[i]) {

Can you add a comment explaining this. Something like:

	/*
	 * The READ_ONCE_NOCHECK() is used to let KASAN know that
	 * this is not an stack-out-of-bounds error.
	 */

Thanks,

-- Steve

> +			if ((READ_ONCE_NOCHECK(*p)) == stack_dump_trace[i]) {
>  				stack_dump_trace[x] = stack_dump_trace[i++];
>  				this_size = stack_trace_index[x++] =
>  					(top - p) * sizeof(unsigned long);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ