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

2021-03-30 Thread Andrey Konovalov
On Tue, Mar 30, 2021 at 5:54 PM Vlastimil Babka 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

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

2021-03-30 Thread Vlastimil Babka
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

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

2021-03-30 Thread Andrey Konovalov
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. Fix by restoring the initial order. Also add a warning comment.