From: Dmitry Vyukov <dvyukov@google.com>
To: Yury Norov <ynorov@caviumnetworks.com>
Cc: "Luruo, Kuthonuzo" <kuthonuzo.luruo@hpe.com>,
"aryabinin@virtuozzo.com" <aryabinin@virtuozzo.com>,
"glider@google.com" <glider@google.com>,
"cl@linux.com" <cl@linux.com>,
"penberg@kernel.org" <penberg@kernel.org>,
"rientjes@google.com" <rientjes@google.com>,
"iamjoonsoo.kim@lge.com" <iamjoonsoo.kim@lge.com>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"kasan-dev@googlegroups.com" <kasan-dev@googlegroups.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"klimov.linux@gmail.com" <klimov.linux@gmail.com>
Subject: Re: [PATCH v2 1/2] mm, kasan: improve double-free detection
Date: Mon, 9 May 2016 07:46:31 +0200 [thread overview]
Message-ID: <CACT4Y+Zdy+cyfZ2dqnbZMn3edVteuQTyTswjL83JquFbhcPpTA@mail.gmail.com> (raw)
In-Reply-To: <20160508085045.GA27394@yury-N73SV>
On Sun, May 8, 2016 at 11:17 AM, Yury Norov <ynorov@caviumnetworks.com> wrote:
> On Sat, May 07, 2016 at 03:15:59PM +0000, Luruo, Kuthonuzo wrote:
>> Thank you for the review!
>>
>> > > + switch (alloc_data.state) {
>> > > + case KASAN_STATE_QUARANTINE:
>> > > + case KASAN_STATE_FREE:
>> > > + kasan_report((unsigned long)object, 0, false,
>> > > + (unsigned long)__builtin_return_address(1));
>> >
>> > __builtin_return_address() is unsafe if argument is non-zero. Use
>> > return_address() instead.
>>
>> hmm, I/cscope can't seem to find an x86 implementation for return_address().
>> Will dig further; thanks.
>>
>
> It seems there's no generic interface to obtain return address. x86
> has working __builtin_return_address() and it's ok with it, others
> use their own return_adderss(), and ok as well.
>
> I think unification is needed here.
We use _RET_IP_ in other places in portable part of kasan.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2016-05-09 5:46 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-06 11:47 Kuthonuzo Luruo
2016-05-07 10:25 ` Yury Norov
2016-05-07 15:15 ` Luruo, Kuthonuzo
2016-05-08 9:17 ` Yury Norov
2016-05-09 5:46 ` Dmitry Vyukov [this message]
2016-05-09 6:04 ` Luruo, Kuthonuzo
2016-05-09 7:07 ` Dmitry Vyukov
2016-05-09 10:26 ` Andrey Ryabinin
2016-05-09 10:31 ` Dmitry Vyukov
2016-05-09 12:43 ` Andrey Ryabinin
2016-05-10 11:55 ` Dmitry Vyukov
2016-05-09 11:35 ` Luruo, Kuthonuzo
2016-05-09 13:01 ` Andrey Ryabinin
2016-05-09 13:20 ` Dmitry Vyukov
2016-05-09 13:34 ` Andrey Ryabinin
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=CACT4Y+Zdy+cyfZ2dqnbZMn3edVteuQTyTswjL83JquFbhcPpTA@mail.gmail.com \
--to=dvyukov@google.com \
--cc=akpm@linux-foundation.org \
--cc=aryabinin@virtuozzo.com \
--cc=cl@linux.com \
--cc=glider@google.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=kasan-dev@googlegroups.com \
--cc=klimov.linux@gmail.com \
--cc=kuthonuzo.luruo@hpe.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=penberg@kernel.org \
--cc=rientjes@google.com \
--cc=ynorov@caviumnetworks.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox