mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ting-Han Hou <ue081723@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Jan Kiszka <jan.kiszka@siemens.com>,
	Kieran Bingham <kbingham@kernel.org>,
	Kuan-Ying Lee <kuan-ying.lee@canonical.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH v2 0/2] scripts/gdb: fix radix tree lookup and stack depot diagnostic
Date: Sun, 11 Oct 2026 10:30:42 +0800	[thread overview]
Message-ID: <20261011023044.1722-1-ue081723@gmail.com> (raw)
In-Reply-To: <20261010141712.2db4491436e30110ccb5a25e@linux-foundation.org>

Andrew, here are the two scripts/gdb fixes as a series, as requested.

Patch 1 fixes $lx_radix_tree_lookup(), which dereferenced slot contents
as if they were node pointers. v2 also handles the XArray sibling,
retry and zero entries that Sashiko pointed out: they carry the
internal tag but are not node pointers, and the v1 patch raised a GDB
MemoryError on them. Large folios in the page cache make sibling
entries common, so this was worth fixing rather than documenting.

Patch 2 is unchanged from v1 apart from being resent with git
send-email, since the earlier copy was word-wrapped by the mail
client. Sorry about that.

Both patches are tested against standalone GCC-built fixtures that use
the kernel struct layouts (details below the --- line of each patch),
not against a running kernel.

v1:
  https://lore.kernel.org/r/CA+NtrhTyE4J-C2=hSUXYc+NJBsQeYvbwJb+-ROHE1QQP-_gYzg@mail.gmail.com/
  https://lore.kernel.org/r/CA+NtrhTQXdQRWe+pRJHyKxPPgsF7Ob5R41Xm3dAJ54OfT2_z5A@mail.gmail.com/

Ting-Han Hou (2):
  scripts/gdb: Fix radix tree lookup pointer handling
  scripts/gdb: Fix stack depot out-of-bounds diagnostic

 scripts/gdb/linux/radixtree.py  | 66 ++++++++++++++++++++-------------
 scripts/gdb/linux/stackdepot.py |  2 +-
 2 files changed, 41 insertions(+), 27 deletions(-)

-- 
2.53.0


  reply	other threads:[~2026-10-11  2:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-07  9:31 [PATCH] scripts/gdb: Fix radix tree lookup pointer handling Ting-Han Hou
2026-10-09 18:10 ` Ting-Han Hou
2026-10-10 21:17 ` Andrew Morton
2026-10-11  2:30   ` Ting-Han Hou [this message]
2026-10-11  2:30     ` [PATCH v2 1/2] " Ting-Han Hou
2026-10-11  2:30     ` [PATCH v2 2/2] scripts/gdb: Fix stack depot out-of-bounds diagnostic Ting-Han Hou
2026-10-11  3:58     ` [PATCH v2 0/2] scripts/gdb: fix radix tree lookup and stack depot diagnostic Andrew Morton

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=20261011023044.1722-1-ue081723@gmail.com \
    --to=ue081723@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=jan.kiszka@siemens.com \
    --cc=kbingham@kernel.org \
    --cc=kuan-ying.lee@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®