Revert "mm: add support for verifying page sanitization"
This reverts commit 7617e31b3c
.
This commit is contained in:
parent
e1a9aa973c
commit
297fe16eaf
3 changed files with 0 additions and 20 deletions
|
@ -282,13 +282,6 @@ static inline void tag_clear_highpage(struct page *page)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static inline void verify_zero_highpage(struct page *page)
|
|
||||||
{
|
|
||||||
void *kaddr = kmap_atomic(page);
|
|
||||||
BUG_ON(memchr_inv(kaddr, 0, PAGE_SIZE));
|
|
||||||
kunmap_atomic(kaddr);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void zero_user_segments(struct page *page,
|
static inline void zero_user_segments(struct page *page,
|
||||||
unsigned start1, unsigned end1,
|
unsigned start1, unsigned end1,
|
||||||
unsigned start2, unsigned end2)
|
unsigned start2, unsigned end2)
|
||||||
|
|
|
@ -2391,12 +2391,6 @@ static void prep_new_page(struct page *page, unsigned int order, gfp_t gfp_flags
|
||||||
{
|
{
|
||||||
post_alloc_hook(page, order, gfp_flags);
|
post_alloc_hook(page, order, gfp_flags);
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_PAGE_SANITIZE_VERIFY) && want_init_on_free()) {
|
|
||||||
int i;
|
|
||||||
for (i = 0; i < (1 << order); i++)
|
|
||||||
verify_zero_highpage(page + i);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (order && (gfp_flags & __GFP_COMP))
|
if (order && (gfp_flags & __GFP_COMP))
|
||||||
prep_compound_page(page, order);
|
prep_compound_page(page, order);
|
||||||
|
|
||||||
|
|
|
@ -238,13 +238,6 @@ config INIT_ON_FREE_DEFAULT_ON
|
||||||
touching "cold" memory areas. Most cases see 3-5% impact. Some
|
touching "cold" memory areas. Most cases see 3-5% impact. Some
|
||||||
synthetic workloads have measured as high as 8%.
|
synthetic workloads have measured as high as 8%.
|
||||||
|
|
||||||
config PAGE_SANITIZE_VERIFY
|
|
||||||
bool "Verify sanitized pages"
|
|
||||||
default y
|
|
||||||
help
|
|
||||||
When init_on_free is enabled, verify that newly allocated pages
|
|
||||||
are zeroed to detect write-after-free bugs.
|
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|
Loading…
Reference in a new issue