Skip to content
  • Vlastimil Babka's avatar
    mm, page_poison: remove CONFIG_PAGE_POISONING_ZERO · f289041e
    Vlastimil Babka authored
    CONFIG_PAGE_POISONING_ZERO uses the zero pattern instead of 0xAA.  It was
    introduced by commit 1414c7f4 ("mm/page_poisoning.c: allow for zero
    poisoning"), noting that using zeroes retains the benefit of sanitizing
    content of freed pages, with the benefit of not having to zero them again
    on alloc, and the downside of making some forms of corruption (stray
    writes of NULLs) harder to detect than with the 0xAA pattern.  Together
    with CONFIG_PAGE_POISONING_NO_SANITY it made possible to sanitize the
    contents on free without checking it back on alloc.
    
    These days we have the init_on_free() option to achieve sanitization with
    zeroes and to save clearing on alloc (and without checking on alloc).
    Arguably if someone does choose to check the poison for corruption on
    alloc, the savings of not clearing the page are secondary, and it makes
    sense to always use the 0xAA poison pattern.  Thus, remove the
    CONFIG_PAGE_POISONING_ZERO option for being redundant.
    
    Link: ht...
    f289041e