Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1606764

Re: [PATCH] kasan: report only the first error

From Andrey Konovalov <andreyknvl@google.com>
Newsgroups linux.kernel
Subject Re: [PATCH] kasan: report only the first error
Date 2017-03-22 18:10 +0100
Message-ID <tnRVM-5RD-15@gated-at.bofh.it> (permalink)
References <tnRsJ-5on-19@gated-at.bofh.it> <tnRsJ-5on-17@gated-at.bofh.it> <tnRVM-5RD-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Mar 22, 2017 at 5:54 PM, Andrey Ryabinin
<aryabinin@virtuozzo.com> wrote:
> On 03/22/2017 07:34 PM, Andrey Konovalov wrote:
>> On Wed, Mar 22, 2017 at 5:06 PM, Andrey Ryabinin
>> <aryabinin@virtuozzo.com> wrote:
>>> Disable kasan after the first report. There are several reasons for this:
>>>  * Single bug quite often has multiple invalid memory accesses causing
>>>     storm in the dmesg.
>>>  * Write OOB access might corrupt metadata so the next report will print
>>>     bogus alloc/free stacktraces.
>>>  * Reports after the first easily could be not bugs by itself but just side
>>>     effects of the first one.
>>>
>>> Given that multiple reports only do harm, it makes sense to disable
>>> kasan after the first one. Except for the tests in lib/test_kasan.c
>>> as we obviously want to see all reports from test.
>>
>> Hi Andrey,
>>
>> Could you make it configurable via CONFIG_KASAN_SOMETHING (which can
>> default to showing only the first report)?
>
> I'd rather make this boot time configurable, but wouldn't want to without
> a good reason.

That would work for me.

>
>
>> I sometimes use KASAN to see what bad accesses a particular bug
>> causes, and seeing all of them (even knowing that they may be
>> corrupt/induced) helps a lot.
>
> I'm wondering why you need to see all reports?

To get a better picture of what are the consequences of a bug. For
example whether it leads to some bad or controllable memory
corruption. Sometimes it's easier to let KASAN track the memory
accesses then do that manually.

>
>>
>> Thanks!
>>

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH] kasan: report only the first error Andrey Konovalov <andreyknvl@google.com> - 2017-03-22 17:40 +0100
  Re: [PATCH] kasan: report only the first error Andrey Konovalov <andreyknvl@google.com> - 2017-03-22 18:10 +0100
    Re: [PATCH] kasan: report only the first error Alexander Potapenko <glider@google.com> - 2017-03-22 18:40 +0100
      Re: [PATCH] kasan: report only the first error Dmitry Vyukov <dvyukov@google.com> - 2017-03-22 18:50 +0100

csiph-web