All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Shi, Yang" <yang.shi@linaro.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: aryabinin@virtuozzo.com, mingo@redhat.com,
	linux-kernel@vger.kernel.org, linaro-kernel@lists.linaro.org
Subject: Re: [PATCH] trace, kasan: silence Kasan warning in check_stack
Date: Fri, 12 Feb 2016 11:46:37 -0800	[thread overview]
Message-ID: <56BE369D.6090007@linaro.org> (raw)
In-Reply-To: <20160212143547.703d9e9f@gandalf.local.home>

On 2/12/2016 11:35 AM, Steven Rostedt wrote:
> On Mon,  8 Feb 2016 10:39:42 -0800
> Yang Shi <yang.shi@linaro.org> wrote:
>
>>
>> Signed-off-by: Yang Shi <yang.shi@linaro.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);
>

      reply	other threads:[~2016-02-12 19:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-08 18:39 [PATCH] trace, kasan: silence Kasan warning in check_stack Yang Shi
2016-02-09 13:40 ` Andrey Ryabinin
2016-02-12 18:50   ` Shi, Yang
2016-02-12 19:35 ` Steven Rostedt
2016-02-12 19:46   ` Shi, Yang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56BE369D.6090007@linaro.org \
    --to=yang.shi@linaro.org \
    --cc=aryabinin@virtuozzo.com \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.