Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1396600
| From | Dmitry Vyukov <dvyukov@google.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 1/2] mm, kasan: improve double-free detection |
| Date | 2016-05-09 07:50 +0200 |
| Message-ID | <rwMeS-6hQ-3@gated-at.bofh.it> (permalink) |
| References | <rvMqC-4be-9@gated-at.bofh.it> <rw7EJ-8ea-1@gated-at.bofh.it> <rwcbo-3Lb-9@gated-at.bofh.it> <rwMeS-6hQ-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 1/2] mm, kasan: improve double-free detection Kuthonuzo Luruo <kuthonuzo.luruo@hpe.com> - 2016-05-06 13:50 +0200
Re: [PATCH v2 1/2] mm, kasan: improve double-free detection Yury Norov <ynorov@caviumnetworks.com> - 2016-05-07 12:30 +0200
RE: [PATCH v2 1/2] mm, kasan: improve double-free detection "Luruo, Kuthonuzo" <kuthonuzo.luruo@hpe.com> - 2016-05-07 17:20 +0200
Re: [PATCH v2 1/2] mm, kasan: improve double-free detection Dmitry Vyukov <dvyukov@google.com> - 2016-05-09 07:50 +0200
RE: [PATCH v2 1/2] mm, kasan: improve double-free detection "Luruo, Kuthonuzo" <kuthonuzo.luruo@hpe.com> - 2016-05-09 08:10 +0200
Re: [PATCH v2 1/2] mm, kasan: improve double-free detection Dmitry Vyukov <dvyukov@google.com> - 2016-05-09 09:10 +0200
Re: [PATCH v2 1/2] mm, kasan: improve double-free detection Andrey Ryabinin <aryabinin@virtuozzo.com> - 2016-05-09 12:30 +0200
Re: [PATCH v2 1/2] mm, kasan: improve double-free detection Dmitry Vyukov <dvyukov@google.com> - 2016-05-09 12:40 +0200
Re: [PATCH v2 1/2] mm, kasan: improve double-free detection Dmitry Vyukov <dvyukov@google.com> - 2016-05-10 14:00 +0200
RE: [PATCH v2 1/2] mm, kasan: improve double-free detection "Luruo, Kuthonuzo" <kuthonuzo.luruo@hpe.com> - 2016-05-09 13:40 +0200
Re: [PATCH v2 1/2] mm, kasan: improve double-free detection Dmitry Vyukov <dvyukov@google.com> - 2016-05-09 15:30 +0200
csiph-web