From: Walter Wu <walter-zh.wu@mediatek.com>
To: Andrey Ryabinin <aryabinin@virtuozzo.com>,
Alexander Potapenko <glider@google.com>,
Dmitry Vyukov <dvyukov@google.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Will Deacon <will@kernel.org>,
Andrey Konovalov <andreyknvl@google.com>,
Arnd Bergmann <arnd@arndb.de>,
Thomas Gleixner <tglx@linutronix.de>,
Michal Hocko <mhocko@kernel.org>, Qian Cai <cai@lca.pw>
Cc: <linux-kernel@vger.kernel.org>, <kasan-dev@googlegroups.com>,
<linux-mm@kvack.org>, <linux-arm-kernel@lists.infradead.org>,
<linux-mediatek@lists.infradead.org>, <wsd_upstream@mediatek.com>,
Walter Wu <walter-zh.wu@mediatek.com>
Subject: [PATCH v2 1/2] mm/page_ext: support to record the last stack of page
Date: Mon, 9 Sep 2019 16:53:39 +0800 [thread overview]
Message-ID: <20190909085339.25350-1-walter-zh.wu@mediatek.com> (raw)
KASAN will record last stack of page in order to help programmer
to see memory corruption caused by page.
What is difference between page_owner and our patch?
page_owner records alloc stack of page, but our patch is to record
last stack(it may be alloc or free stack of page).
Signed-off-by: Walter Wu <walter-zh.wu@mediatek.com>
---
mm/page_ext.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/mm/page_ext.c b/mm/page_ext.c
index 5f5769c7db3b..7ca33dcd9ffa 100644
--- a/mm/page_ext.c
+++ b/mm/page_ext.c
@@ -65,6 +65,9 @@ static struct page_ext_operations *page_ext_ops[] = {
#if defined(CONFIG_IDLE_PAGE_TRACKING) && !defined(CONFIG_64BIT)
&page_idle_ops,
#endif
+#ifdef CONFIG_KASAN
+ &page_stack_ops,
+#endif
};
static unsigned long total_usage;
--
2.18.0
next reply other threads:[~2019-09-09 8:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-09 8:53 Walter Wu [this message]
2019-09-09 10:57 ` [PATCH v2 1/2] mm/page_ext: support to record the last stack of page David Hildenbrand
2019-09-10 1:07 ` Walter Wu
2019-09-10 9:31 ` Kirill A. Shutemov
2019-09-10 9:43 ` Walter Wu
2019-09-09 12:59 ` Vlastimil Babka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190909085339.25350-1-walter-zh.wu@mediatek.com \
--to=walter-zh.wu@mediatek.com \
--cc=akpm@linux-foundation.org \
--cc=andreyknvl@google.com \
--cc=arnd@arndb.de \
--cc=aryabinin@virtuozzo.com \
--cc=cai@lca.pw \
--cc=dvyukov@google.com \
--cc=glider@google.com \
--cc=kasan-dev@googlegroups.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-mm@kvack.org \
--cc=matthias.bgg@gmail.com \
--cc=mhocko@kernel.org \
--cc=schwidefsky@de.ibm.com \
--cc=tglx@linutronix.de \
--cc=will@kernel.org \
--cc=wsd_upstream@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).