Re: [PATCH mm] mm, kasan: fix for "integrate page_alloc init with HW_TAGS"

From: Andrey Konovalov
Date: Tue Mar 30 2021 - 12:38:33 EST


On Tue, Mar 30, 2021 at 5:54 PM Vlastimil Babka <vbabka@xxxxxxx> wrote:
>
> On 3/30/21 5:31 PM, Andrey Konovalov wrote:
> > My commit "integrate page_alloc init with HW_TAGS" changed the order of
> > kernel_unpoison_pages() and kernel_init_free_pages() calls. This leads
> > to __GFP_ZERO allocations being incorrectly poisoned when page poisoning
> > is enabled.
>
> Correction: This leads to check_poison_mem() complain about memory corruption
> because the poison pattern has already been overwritten by zeroes.

Ah, indeed. Will send v2. Thanks!