All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv2 0/2] Sanitization of buddy pages
@ 2016-01-29  2:38 ` Laura Abbott
  0 siblings, 0 replies; 28+ messages in thread
From: Laura Abbott @ 2016-01-29  2:38 UTC (permalink / raw)
  To: Andrew Morton, Kirill A. Shutemov, Vlastimil Babka, Michal Hocko
  Cc: Laura Abbott, linux-mm, linux-kernel, kernel-hardening, Kees Cook

Hi,

This is v2 of the series to add sanitization to the buddy allocator.
The standard sanitization blurb:

For those who aren't familiar with this, the goal of sanitization is to reduce
the severity of use after free and uninitialized data bugs. Memory is cleared
on free so any sensitive data is no longer available. Discussion of
sanitization was brough up in a thread about CVEs
(lkml.kernel.org/g/<20160119112812.GA10818@mwanda>)

Changes since v1:
- Squashed the refactor and adding the poisoning together. Having them separate
  didn't seem to give much extra benefit and lead to some churn as well.
- Corrected the order of poison vs. kernel_map in the alloc path
- zeroing can now be enabled with hibernation (enabling zero poisoning turns
  off hibernation)
- Added additional checks for skipping __GFP_ZERO. On SPARSEMEM systems the
  extended page flags are not initialized until after memory is freed to the
  buddy list which prevents the pages from being zeroed on first free via
  poisoning. This does also mean that any residual data that may be left in
  the pages from boot up will not be cleared which is a risk. I'm open to
  suggestions for fixing or it can be future work.
- A few spelling/checkpatch fixes.
- Addressed comments from Dave Hansen and Jianyu Zhan
- This series now depends on the change to allow debug_pagealloc_enabled
  to be used without !CONFIG_DEBUG_PAGEALLOC
  (http://article.gmane.org/gmane.linux.kernel.mm/145208)

Thanks,
Laura

Laura Abbott (2):
  mm/page_poison.c: Enable PAGE_POISONING as a separate option
  mm/page_poisoning.c: Allow for zero poisoning

 Documentation/kernel-parameters.txt |   5 +
 include/linux/mm.h                  |  15 +++
 include/linux/poison.h              |   4 +
 kernel/power/hibernate.c            |  17 ++++
 mm/Kconfig.debug                    |  36 ++++++-
 mm/Makefile                         |   2 +-
 mm/debug-pagealloc.c                | 137 ---------------------------
 mm/page_alloc.c                     |  13 ++-
 mm/page_ext.c                       |  10 +-
 mm/page_poison.c                    | 184 ++++++++++++++++++++++++++++++++++++
 10 files changed, 281 insertions(+), 142 deletions(-)
 delete mode 100644 mm/debug-pagealloc.c
 create mode 100644 mm/page_poison.c

-- 
2.5.0

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2016-01-30 15:30 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-29  2:38 [PATCHv2 0/2] Sanitization of buddy pages Laura Abbott
2016-01-29  2:38 ` [kernel-hardening] " Laura Abbott
2016-01-29  2:38 ` Laura Abbott
2016-01-29  2:38 ` [PATCHv2 1/2] mm/page_poison.c: Enable PAGE_POISONING as a separate option Laura Abbott
2016-01-29  2:38   ` [kernel-hardening] " Laura Abbott
2016-01-29  2:38   ` Laura Abbott
2016-01-29  2:38 ` [PATCHv2 2/2] mm/page_poisoning.c: Allow for zero poisoning Laura Abbott
2016-01-29  2:38   ` [kernel-hardening] " Laura Abbott
2016-01-29  2:38   ` Laura Abbott
2016-01-29  3:55   ` Rafael J. Wysocki
2016-01-29  3:55     ` [kernel-hardening] " Rafael J. Wysocki
2016-01-29  3:55     ` Rafael J. Wysocki
2016-01-29  4:46   ` Kees Cook
2016-01-29  4:46     ` [kernel-hardening] " Kees Cook
2016-01-29  4:46     ` Kees Cook
2016-01-29 21:32     ` Laura Abbott
2016-01-29 21:32       ` [kernel-hardening] " Laura Abbott
2016-01-29 21:32       ` Laura Abbott
2016-01-29 21:32       ` Laura Abbott
2016-01-29 10:45   ` Pavel Machek
2016-01-29 10:45     ` [kernel-hardening] " Pavel Machek
2016-01-29 10:45     ` Pavel Machek
2016-01-29 21:36     ` Laura Abbott
2016-01-29 21:36       ` [kernel-hardening] " Laura Abbott
2016-01-29 21:36       ` Laura Abbott
2016-01-30 15:30       ` Pavel Machek
2016-01-30 15:30         ` [kernel-hardening] " Pavel Machek
2016-01-30 15:30         ` Pavel Machek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.