[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <cover.1735932169.git.lorenzo.stoakes@oracle.com>
Date: Fri, 3 Jan 2025 19:35:34 +0000
From: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
To: Andrew Morton <akpm@...ux-foundation.org>,
"Liam R . Howlett" <Liam.Howlett@...cle.com>
Cc: Vlastimil Babka <vbabka@...e.cz>, Jann Horn <jannh@...gle.com>,
David Hildenbrand <david@...hat.com>,
Matthew Wilcox <willy@...radead.org>, linux-kernel@...r.kernel.org,
linux-mm@...ck.org
Subject: [PATCH 0/2] mm/debug: introduce and use VM_WARN_ON_VMG()
We use a number of asserts, enabled only when CONFIG_DEBUG_VM is set,
during VMA merge operations to ensure state is as expected.
However, when syzkaller or the like encounters these asserts, often the
information provided by the report is insufficient to narrow down what the
problem is.
We noticed this recently in [0], where a non-repro issue resisted debugging
due to simply not having sufficient information to go on.
This series improves the situation by providing VM_WARN_ON_VMG() which acts
like VM_WARN_ON() (i.e. only actually being invoked if CONFIG_DEBUG_VM is
set), while dumping significant information about the VMA merge state, the
mm_struct describing the virtual address space, all associated VMAs and, if
CONFIG_DEBUG_VM_MAPLE_TREE is set, the associated maple tree.
[0]:https://lore.kernel.org/all/6774c98f.050a0220.25abdd.0991.GAE@google.com/
Lorenzo Stoakes (2):
mm/debug: introduce VM_WARN_ON_VMG() to dump VMA merge state
mm/debug: prefer VM_WARN_ON_VMG() to report VMG debug warnings
include/linux/mmdebug.h | 14 +++++++-
mm/debug.c | 71 +++++++++++++++++++++++++++++++++++++++++
mm/vma.c | 33 +++++++++----------
3 files changed, 101 insertions(+), 17 deletions(-)
--
2.47.1
Powered by blists - more mailing lists