Re: [PATCH] powerpc/kasan: Fix early region not updated correctly

From: Michael Ellerman
Date: Tue Feb 15 2022 - 00:30:15 EST


On Wed, 29 Dec 2021 11:52:26 +0800, Chen Jingwen wrote:
> The shadow's page table is not updated when PTE_RPN_SHIFT is 24
> and PAGE_SHIFT is 12. It not only causes false positives but
> also false negative as shown the following text.
>
> Fix it by bringing the logic of kasan_early_shadow_page_entry here.
>
> 1. False Positive:
> ==================================================================
> BUG: KASAN: vmalloc-out-of-bounds in pcpu_alloc+0x508/0xa50
> Write of size 16 at addr f57f3be0 by task swapper/0/1
>
> [...]

Applied to powerpc/next.

[1/1] powerpc/kasan: Fix early region not updated correctly
https://git.kernel.org/powerpc/c/dd75080aa8409ce10d50fb58981c6b59bf8707d3

cheers