linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] mm/debug: introduce and use VM_WARN_ON_VMG()
@ 2025-01-03 19:35 Lorenzo Stoakes
  2025-01-03 19:35 ` [PATCH 1/2] mm/debug: introduce VM_WARN_ON_VMG() to dump VMA merge state Lorenzo Stoakes
  2025-01-03 19:35 ` [PATCH 2/2] mm/debug: prefer VM_WARN_ON_VMG() to report VMG debug warnings Lorenzo Stoakes
  0 siblings, 2 replies; 3+ messages in thread
From: Lorenzo Stoakes @ 2025-01-03 19:35 UTC (permalink / raw)
  To: Andrew Morton, Liam R . Howlett
  Cc: Vlastimil Babka, Jann Horn, David Hildenbrand, Matthew Wilcox,
	linux-kernel, linux-mm

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-01-03 19:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-03 19:35 [PATCH 0/2] mm/debug: introduce and use VM_WARN_ON_VMG() Lorenzo Stoakes
2025-01-03 19:35 ` [PATCH 1/2] mm/debug: introduce VM_WARN_ON_VMG() to dump VMA merge state Lorenzo Stoakes
2025-01-03 19:35 ` [PATCH 2/2] mm/debug: prefer VM_WARN_ON_VMG() to report VMG debug warnings Lorenzo Stoakes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox