|
@@ -6,6 +6,7 @@
|
|
|
#include <linux/page_ext.h>
|
|
#include <linux/page_ext.h>
|
|
|
#include <linux/poison.h>
|
|
#include <linux/poison.h>
|
|
|
#include <linux/ratelimit.h>
|
|
#include <linux/ratelimit.h>
|
|
|
|
|
+#include <linux/kasan.h>
|
|
|
|
|
|
|
|
static bool want_page_poisoning __read_mostly;
|
|
static bool want_page_poisoning __read_mostly;
|
|
|
|
|
|
|
@@ -34,7 +35,10 @@ static void poison_page(struct page *page)
|
|
|
{
|
|
{
|
|
|
void *addr = kmap_atomic(page);
|
|
void *addr = kmap_atomic(page);
|
|
|
|
|
|
|
|
|
|
+ /* KASAN still think the page is in-use, so skip it. */
|
|
|
|
|
+ kasan_disable_current();
|
|
|
memset(addr, PAGE_POISON, PAGE_SIZE);
|
|
memset(addr, PAGE_POISON, PAGE_SIZE);
|
|
|
|
|
+ kasan_enable_current();
|
|
|
kunmap_atomic(addr);
|
|
kunmap_atomic(addr);
|
|
|
}
|
|
}
|
|
|
|
|
|