From: Illia Ostapyshyn <illia@yshyn.com>
To: linux-kernel@vger.kernel.org
Cc: Hao Li <hao.li@linux.dev>, Harry Yoo <harry@kernel.org>,
"Vlastimil Babka (SUSE)" <vbabka@kernel.org>,
Illia Ostapyshyn <illia@yshyn.com>,
Andrew Morton <akpm@linux-foundation.org>,
Seongjun Hong <hsj0512@snu.ac.kr>,
Kieran Bingham <kbingham@kernel.org>,
Jan Kiszka <jan.kiszka@siemens.com>,
Florian Fainelli <florian.fainelli@broadcom.com>
Subject: [PATCH 1/2] scripts/gdb: mm: Cast untyped symbols in x86_page_ops
Date: Mon, 27 Apr 2026 16:24:47 +0200 [thread overview]
Message-ID: <20260427142448.666117-2-illia@yshyn.com> (raw)
In-Reply-To: <20260427142448.666117-1-illia@yshyn.com>
The symbols phys_base, _text, and _end, used in x86_page_ops are either
defined in assembly or implicitly by the linker. Thus, they lack type
information and cause a conversion error after gdb.parse_and_eval.
Explicitly cast these expressions to unsigned long.
Fixes: 55f8b4518d14 ("scripts/gdb: implement x86_page_ops in mm.py")
Signed-off-by: Illia Ostapyshyn <illia@yshyn.com>
---
scripts/gdb/linux/mm.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/scripts/gdb/linux/mm.py b/scripts/gdb/linux/mm.py
index d78908f6664d..dffadccbb01d 100644
--- a/scripts/gdb/linux/mm.py
+++ b/scripts/gdb/linux/mm.py
@@ -40,11 +40,11 @@ class x86_page_ops():
self.PAGE_OFFSET = int(gdb.parse_and_eval("page_offset_base"))
self.VMEMMAP_START = int(gdb.parse_and_eval("vmemmap_base"))
- self.PHYS_BASE = int(gdb.parse_and_eval("phys_base"))
+ self.PHYS_BASE = int(gdb.parse_and_eval("(unsigned long) phys_base"))
self.START_KERNEL_map = 0xffffffff80000000
- self.KERNEL_START = gdb.parse_and_eval("_text")
- self.KERNEL_END = gdb.parse_and_eval("_end")
+ self.KERNEL_START = gdb.parse_and_eval("(unsigned long) &_text")
+ self.KERNEL_END = gdb.parse_and_eval("(unsigned long) &_end")
self.VMALLOC_START = int(gdb.parse_and_eval("vmalloc_base"))
if self.VMALLOC_START == 0xffffc90000000000:
--
2.51.2
next prev parent reply other threads:[~2026-04-27 14:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-27 14:24 [PATCH 0/2] Fixes related to lx-slabinfo, lx-slabtrace Illia Ostapyshyn
2026-04-27 14:24 ` Illia Ostapyshyn [this message]
2026-04-27 14:24 ` [PATCH 2/2] scripts/gdb: slab: Update field names of struct kmem_cache Illia Ostapyshyn
2026-04-28 6:04 ` Harry Yoo (Oracle)
2026-04-28 8:20 ` Vlastimil Babka (SUSE)
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=20260427142448.666117-2-illia@yshyn.com \
--to=illia@yshyn.com \
--cc=akpm@linux-foundation.org \
--cc=florian.fainelli@broadcom.com \
--cc=hao.li@linux.dev \
--cc=harry@kernel.org \
--cc=hsj0512@snu.ac.kr \
--cc=jan.kiszka@siemens.com \
--cc=kbingham@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vbabka@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.