The patch titled Subject: mm/vmalloc.c: fix kasan shadow poisoning size has been removed from the -mm tree. Its filename was mm-vmalloc-fix-kasan-shadow-poisoning-size.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ From: Vincenzo Frascino <vincenzo.frascino@xxxxxxx> Subject: mm/vmalloc.c: fix kasan shadow poisoning size The size of vm area can be affected by the presence or not of the guard page. In particular when VM_NO_GUARD is present, the actual accessible size has to be considered like the real size minus the guard page. Currently kasan does not keep into account this information during the poison operation and in particular tries to poison the guard page as well. This approach, even if incorrect, does not cause an issue because the tags for the guard page are written in the shadow memory. With the future introduction of the Tag-Based KASAN, being the guard page inaccessible by nature, the write tag operation on this page triggers a fault. Fix kasan shadow poisoning size invoking get_vm_area_size() instead of accessing directly the field in the data structure to detect the correct value. Link: https://lkml.kernel.org/r/20201027160213.32904-1-vincenzo.frascino@xxxxxxx Fixes: d98c9e83b5e7c ("kasan: fix crashes on access to memory mapped by vm_map_ram()") Signed-off-by: Vincenzo Frascino <vincenzo.frascino@xxxxxxx> Cc: Andrey Konovalov <andreyknvl@xxxxxxxxxx> Cc: Dmitry Vyukov <dvyukov@xxxxxxxxxx> Cc: Andrey Ryabinin <aryabinin@xxxxxxxxxxxxx> Cc: Alexander Potapenko <glider@xxxxxxxxxx> Cc: Marco Elver <elver@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/vmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/mm/vmalloc.c~mm-vmalloc-fix-kasan-shadow-poisoning-size +++ a/mm/vmalloc.c @@ -2272,7 +2272,7 @@ static void __vunmap(const void *addr, i debug_check_no_locks_freed(area->addr, get_vm_area_size(area)); debug_check_no_obj_freed(area->addr, get_vm_area_size(area)); - kasan_poison_vmalloc(area->addr, area->size); + kasan_poison_vmalloc(area->addr, get_vm_area_size(area)); vm_remove_mappings(area, deallocate_pages); _ Patches currently in -mm which might be from vincenzo.frascino@xxxxxxx are arm64-enable-armv85-a-asm-arch-option.patch arm64-mte-add-in-kernel-mte-helpers.patch arm64-mte-reset-the-page-tag-in-page-flags.patch arm64-mte-add-in-kernel-tag-fault-handler.patch arm64-kasan-allow-enabling-in-kernel-mte.patch arm64-mte-convert-gcr_user-into-an-exclude-mask.patch arm64-mte-switch-gcr_el1-in-kernel-entry-and-exit.patch kasan-mm-untag-page-address-in-free_reserved_area.patch kselftest-arm64-check-gcr_el1-after-context-switch.patch