lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251204163425.370783-3-jremus@linux.ibm.com>
Date: Thu,  4 Dec 2025 17:34:24 +0100
From: Jens Remus <jremus@...ux.ibm.com>
To: linux-kernel@...r.kernel.org, linux-s390@...r.kernel.org,
        Jan Kiszka <jan.kiszka@...mens.com>,
        Kieran Bingham <kbingham@...nel.org>
Cc: Jens Remus <jremus@...ux.ibm.com>, Heiko Carstens <hca@...ux.ibm.com>,
        Vasily Gorbik <gor@...ux.ibm.com>,
        Alexander Gordeev <agordeev@...ux.ibm.com>,
        Ilya Leoshkevich <iii@...ux.ibm.com>
Subject: [PATCH 2/3] scripts/gdb: add lx_lowcore convenience function on s390

lx_lowcore is a convenience function to retrieve the lowcore of the
active context or a specific CPU on s390.

Signed-off-by: Jens Remus <jremus@...ux.ibm.com>
---
 scripts/gdb/linux/cpus.py | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/scripts/gdb/linux/cpus.py b/scripts/gdb/linux/cpus.py
index 12bf37d6a4e5..3e17550cd577 100644
--- a/scripts/gdb/linux/cpus.py
+++ b/scripts/gdb/linux/cpus.py
@@ -258,3 +258,20 @@ def s390_lowcore(cpu):
 
     lowcore_ptr_type = gdb.lookup_type("struct lowcore").pointer()
     return lowcore.cast(lowcore_ptr_type)
+
+
+class LxLowcoreFunc(gdb.Function):
+    """Return current s390 lowcore.
+
+$lx_lowcore([CPU]): Return the s390 lowcore for the given CPU number.
+If CPU is omitted, the CPU of the current context is used."""
+
+    def __init__(self):
+        super(LxLowcoreFunc, self).__init__("lx_lowcore")
+
+    def invoke(self, cpu=-1):
+        return s390_lowcore(cpu)
+
+
+if constants.LX_CONFIG_S390:
+    LxLowcoreFunc()
-- 
2.51.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ