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] [day] [month] [year] [list]
Date:	Fri, 12 Feb 2016 11:46:37 -0800
From:	"Shi, Yang" <yang.shi@...aro.org>
To:	Steven Rostedt <rostedt@...dmis.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 2/12/2016 11:35 AM, Steven Rostedt wrote:
> 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.
> 	 */

Sure, will add in v2.

Thanks,
Yang

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