linux/mm/kasan
Andrey Ryabinin d98c9e83b5 kasan: fix crashes on access to memory mapped by vm_map_ram()
With CONFIG_KASAN_VMALLOC=y any use of memory obtained via vm_map_ram()
will crash because there is no shadow backing that memory.

Instead of sprinkling additional kasan_populate_vmalloc() calls all over
the vmalloc code, move it into alloc_vmap_area(). This will fix
vm_map_ram() and simplify the code a bit.

[aryabinin@virtuozzo.com: v2]
  Link: http://lkml.kernel.org/r/20191205095942.1761-1-aryabinin@virtuozzo.comLink: http://lkml.kernel.org/r/20191204204534.32202-1-aryabinin@virtuozzo.com
Fixes: 3c5c3cfb9e ("kasan: support backing vmalloc space with real shadow memory")
Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Reviewed-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Cc: Daniel Axtens <dja@axtens.net>
Cc: Alexander Potapenko <glider@google.com>
Cc: Daniel Axtens <dja@axtens.net>
Cc: Qian Cai <cai@lca.pw>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2019-12-17 20:59:59 -08:00
..
common.c kasan: fix crashes on access to memory mapped by vm_map_ram() 2019-12-17 20:59:59 -08:00
generic_report.c kasan: support backing vmalloc space with real shadow memory 2019-12-01 12:59:05 -08:00
generic.c mm/kasan: change kasan_check_{read,write} to return boolean 2019-07-12 11:05:42 -07:00
init.c treewide: add checks for the return value of memblock_alloc*() 2019-03-12 10:04:02 -07:00
kasan.h kasan: support backing vmalloc space with real shadow memory 2019-12-01 12:59:05 -08:00
Makefile arm64 updates for 5.2 2019-05-06 17:54:22 -07:00
quarantine.c mm: convert totalram_pages and totalhigh_pages variables to atomic 2018-12-28 12:11:47 -08:00
report.c kasan: add memory corruption identification for software tag-based mode 2019-09-24 15:54:07 -07:00
tags_report.c kasan: add memory corruption identification for software tag-based mode 2019-09-24 15:54:07 -07:00
tags.c mm/kasan: change kasan_check_{read,write} to return boolean 2019-07-12 11:05:42 -07:00