2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-23 04:34:11 +08:00
linux-next/Documentation/dev-tools
Vlastimil Babka 0fe9a448a0 mm, page_owner: decouple freeing stack trace from debug_pagealloc
Commit 8974558f49 ("mm, page_owner, debug_pagealloc: save and dump
freeing stack trace") enhanced page_owner to also store freeing stack
trace, when debug_pagealloc is also enabled.  KASAN would also like to
do this [1] to improve error reports to debug e.g. UAF issues.

Kirill has suggested that the freeing stack trace saving should be also
possible to be enabled separately from KASAN or debug_pagealloc, i.e.
with an extra boot option.  Qian argued that we have enough options
already, and avoiding the extra overhead is not worth the complications
in the case of a debugging option.  Kirill noted that the extra stack
handle in struct page_owner requires 0.1% of memory.

This patch therefore enables free stack saving whenever page_owner is
enabled, regardless of whether debug_pagealloc or KASAN is also enabled.
KASAN kernels booted with page_owner=on will thus benefit from the
improved error reports.

[1] https://bugzilla.kernel.org/show_bug.cgi?id=203967

[vbabka@suse.cz: v3]
  Link: http://lkml.kernel.org/r/20191007091808.7096-3-vbabka@suse.cz
Link: http://lkml.kernel.org/r/20190930122916.14969-3-vbabka@suse.cz
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Reviewed-by: Qian Cai <cai@lca.pw>
Suggested-by: Dmitry Vyukov <dvyukov@google.com>
Suggested-by: Walter Wu <walter-zh.wu@mediatek.com>
Suggested-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Suggested-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Suggested-by: Qian Cai <cai@lca.pw>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2019-10-14 15:04:00 -07:00
..
coccinelle.rst doc:process: add links where missing 2018-12-06 10:21:19 -07:00
gcov.rst gcov: docs: add a note on GCC vs Clang differences 2019-05-14 19:52:51 -07:00
gdb-kernel-debugging.rst docs: disable KASLR when debugging kernel 2017-07-17 14:49:01 -06:00
index.rst Documentation: dev-tools: Fix typos in index.rst 2018-11-25 12:27:05 -07:00
kasan.rst mm, page_owner: decouple freeing stack trace from debug_pagealloc 2019-10-14 15:04:00 -07:00
kcov.rst Documentation/dev-tools: Use gcc version number instead svn revision number 2019-01-14 17:25:41 -07:00
kgdb.rst docs: disable KASLR when debugging kernel 2017-07-17 14:40:40 -06:00
kmemleak.rst docs: kmemleak: add more documentation details 2019-07-12 11:05:42 -07:00
kselftest.rst kselftest: add capability to skip chosen TARGETS 2019-10-01 13:19:04 -06:00
sparse.rst Remove references to dead website. 2019-07-19 12:22:04 -07:00
ubsan.rst docs: sphinxify ubsan.txt and move it to dev-tools 2016-08-18 17:41:51 -06:00