Re: [PATCH] mm: page_alloc: fix page_poison=1 / INIT_ON_ALLOC_DEFAULT_ON interaction

From: Kees Cook
Date: Wed Jul 14 2021 - 17:14:08 EST


On Wed, Jul 14, 2021 at 11:11:18AM +0000, bowsingbetee wrote:
> B & C variants show this message and A does not, which is what I would expect to happen.
>
> Tested variants:
>
> A. "page_poison=1 init_on_free=0 init_on_alloc=0 slub_debug=P"
> B. "page_poison=1 init_on_free=0 init_on_alloc=0 slub_debug=P init_on_free=1"
> C. "page_poison=1 slub_debug=P"
>
> in common:
> CONFIG_INIT_ON_ALLOC_DEFAULT_ON=y
> CONFIG_INIT_ON_FREE_DEFAULT_ON=y
> CONFIG_PAGE_POISONING=y
> CONFIG_SLUB_DEBUG=y
> CONFIG_SLUB=y
>
> (the slub parts don't matter, ignore them)
>
> [...]
>
> While both patches(Sergei's, and yours) work for me, I'll be using this one for now.
>
> Thank you for your work!
> Cheers!

Awesome; thanks for testing it!

-Kees

--
Kees Cook