Re: [PATCH v2 0/2] scripts/gdb: fix radix tree lookup and stack depot diagnostic

From: Andrew Morton

Date: Sat Oct 10 2026 - 23:59:09 EST


On Sun, 11 Oct 2026 10:30:42 +0800 Ting-Han Hou <ue081723@xxxxxxxxx> wrote:

> 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.

Thanks, I'll queue these for testing while awaiting maintainer review.