• Laura Abbott's avatar
    mm/page_poisoning.c: allow for zero poisoning · 1414c7f4
    Laura Abbott authored
    By default, page poisoning uses a poison value (0xaa) on free.  If this
    is changed to 0, the page is not only sanitized but zeroing on alloc
    with __GFP_ZERO can be skipped as well.  The tradeoff is that detecting
    corruption from the poisoning is harder to detect.  This feature also
    cannot be used with hibernation since pages are not guaranteed to be
    zeroed after hibernation.
    Credit to Grsecurity/PaX team for inspiring this work
    Signed-off-by: 's avatarLaura Abbott <labbott@fedoraproject.org>
    Acked-by: 's avatarRafael J. Wysocki <rjw@rjwysocki.net>
    Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
    Cc: Vlastimil Babka <vbabka@suse.cz>
    Cc: Michal Hocko <mhocko@suse.com>
    Cc: Kees Cook <keescook@chromium.org>
    Cc: Mathias Krause <minipli@googlemail.com>
    Cc: Dave Hansen <dave.hansen@intel.com>
    Cc: Jianyu Zhan <nasa4836@gmail.com>
    Signed-off-by: 's avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: 's avatarLinus Torvalds <torvalds@linux-foundation.org>
poison.h 2.56 KB