page-debug-flags.h 967 B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef LINUX_PAGE_DEBUG_FLAGS_H
  2. #define LINUX_PAGE_DEBUG_FLAGS_H
  3. /*
  4. * page->debug_flags bits:
  5. *
  6. * PAGE_DEBUG_FLAG_POISON is set for poisoned pages. This is used to
  7. * implement generic debug pagealloc feature. The pages are filled with
  8. * poison patterns and set this flag after free_pages(). The poisoned
  9. * pages are verified whether the patterns are not corrupted and clear
  10. * the flag before alloc_pages().
  11. */
  12. enum page_debug_flags {
  13. PAGE_DEBUG_FLAG_POISON, /* Page is poisoned */
  14. PAGE_DEBUG_FLAG_GUARD,
  15. };
  16. /*
  17. * Ensure that CONFIG_WANT_PAGE_DEBUG_FLAGS reliably
  18. * gets turned off when no debug features are enabling it!
  19. */
  20. #ifdef CONFIG_WANT_PAGE_DEBUG_FLAGS
  21. #if !defined(CONFIG_PAGE_POISONING) && \
  22. !defined(CONFIG_PAGE_GUARD) \
  23. /* && !defined(CONFIG_PAGE_DEBUG_SOMETHING_ELSE) && ... */
  24. #error WANT_PAGE_DEBUG_FLAGS is turned on with no debug features!
  25. #endif
  26. #endif /* CONFIG_WANT_PAGE_DEBUG_FLAGS */
  27. #endif /* LINUX_PAGE_DEBUG_FLAGS_H */