]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
kasan: report only the first error by default
authorMark Rutland <mark.rutland@arm.com>
Fri, 31 Mar 2017 22:12:04 +0000 (15:12 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 1 Apr 2017 00:13:30 +0000 (17:13 -0700)
commitb0845ce58379d11dcad4cdb6824a6410de260216
treef74773a6b97f15de8734c1190f3395375089bf34
parent4742a35d9de745e867405b4311e1aac412f0ace1
kasan: report only the first error by default

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 usually only do harm, it makes sense to
disable kasan after the first one.  If user wants to see all the
reports, the boot-time parameter kasan_multi_shot must be used.

[aryabinin@virtuozzo.com: wrote changelog and doc, added missing include]
Link: http://lkml.kernel.org/r/20170323154416.30257-1-aryabinin@virtuozzo.com
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Andrey Konovalov <andreyknvl@google.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Documentation/admin-guide/kernel-parameters.txt
include/linux/kasan.h
lib/test_kasan.c
mm/kasan/kasan.h
mm/kasan/report.c