29 Commits

Author SHA256 Message Date
Petr Tesarik
8dc389b576 Update to drgn-0.0.31 2025-04-17 14:42:39 +02:00
Petr Tesarik
3799a42f8b _service: recompress sources with xz 2025-04-17 14:12:28 +02:00
Petr Tesarik
bddec88a01 _service: run tar and recompress manually 2025-04-17 14:11:58 +02:00
Petr Tesarik
85f4bd732e _service: Update revision rewrite rules 2025-04-17 08:47:19 +02:00
884cfdf109 Accepting request 1252113 from Kernel:kdump
OBS-URL: https://build.opensuse.org/request/show/1252113
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-drgn?expand=0&rev=12
2025-03-11 19:47:17 +00:00
937a8afd68 Accepting request 1233922 from Kernel:kdump
OBS-URL: https://build.opensuse.org/request/show/1233922
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-drgn?expand=0&rev=11
2025-01-01 22:04:55 +00:00
Petr Tesařík
a2b38e6dfe - Update to drgn-0.0.30:
* Linux 6.13 support
  * Support for symbols without debuginfo
  * Use Python 3.13 enhanced REPL when available
  * Add a 'stat' subcommand to contrib/cgroup.py
  * Many bug fixes
- API compatibility with libkdumpfile-0.5.5:
  * libdrgn-kdump-prepare-for-incompatible-changes-in-li.patch
  * libdrgn-kdump-simplify-getting-the-PRSTATUS-attribut.patch

OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/python-drgn?expand=0&rev=23
2024-12-30 13:16:26 +00:00
35b74ba59e Accepting request 1206458 from Kernel:kdump
OBS-URL: https://build.opensuse.org/request/show/1206458
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-drgn?expand=0&rev=10
2024-10-09 20:13:06 +00:00
Petr Tesařík
de9c0dc1f6 - Update to drgn-0.0.29:
* Fix call_function(), write_memory(), and write_object() for
    kernels with CONFIG_MODVERSIONS=y
- Fix a few rpmlint warnings.

- Update to drgn-0.0.28:
  * Linux 6.11 and 6.12 support
  * Helpers for modifying the running kernel
  * 32-bit Arm address translation
  * AArch64 52-bit virtual addresses with 4k or 16k pages

OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/python-drgn?expand=0&rev=21
2024-10-09 07:16:21 +00:00
67de2232c8 Accepting request 1203947 from Kernel:kdump
- Update RPM's Source: to match tarball proper

OBS-URL: https://build.opensuse.org/request/show/1203947
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-drgn?expand=0&rev=9
2024-09-27 15:10:53 +00:00
80b1b1dbba - Update RPM's Source: to match tarball proper
OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/python-drgn?expand=0&rev=19
2024-09-26 16:46:46 +00:00
afac8feac8 Update RPM Source: to version that matches pure git archive (pythonhosted tarball is not stable or it confuses factory-auto checker)
OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/python-drgn?expand=0&rev=18
2024-09-26 15:40:29 +00:00
9740dffb16 Accepting request 1184765 from Kernel:kdump
OBS-URL: https://build.opensuse.org/request/show/1184765
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-drgn?expand=0&rev=8
2024-07-02 16:18:01 +00:00
Petr Tesařík
c6a9af33c2 Accepting request 1184764 from home:ptesarik:branches:Kernel:kdump
- Update to drgn-0.0.27:
  * Linux 6.9 and 6.10 support
  * New helpers for interpreting memory
  * New scripts in contrib

OBS-URL: https://build.opensuse.org/request/show/1184764
OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/python-drgn?expand=0&rev=16
2024-07-02 04:51:47 +00:00
d94f1afe72 Accepting request 1157312 from Kernel:kdump
OBS-URL: https://build.opensuse.org/request/show/1157312
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-drgn?expand=0&rev=7
2024-03-13 21:18:51 +00:00
Petr Tesařík
a23db336dd Accepting request 1157311 from home:ptesarik:branches:Kernel:kdump
- Update to drgn-0.0.26:
  * Linux 6.8 Support
  * Python 3.13 Support
  * new tool: fsrefs.py
  * new Linux helpers: print_dmesg(), idr_for_each_entry(),
    stack_depot_fetch(), priority-sorted lists
  * support split DWARF package (.dwp) files

OBS-URL: https://build.opensuse.org/request/show/1157311
OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/python-drgn?expand=0&rev=14
2024-03-12 18:22:07 +00:00
3e61530278 Accepting request 1134318 from Kernel:kdump
OBS-URL: https://build.opensuse.org/request/show/1134318
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-drgn?expand=0&rev=6
2023-12-21 22:38:18 +00:00
Petr Tesařík
9899117ee5 Accepting request 1134291 from home:mkoutny:branches:home:ptesarik:branches:Kernel:kdump
Respin of rq 1130510

OBS-URL: https://build.opensuse.org/request/show/1134291
OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/python-drgn?expand=0&rev=12
2023-12-20 20:09:35 +00:00
efef6f9ff1 Accepting request 1109773 from Kernel:kdump
OBS-URL: https://build.opensuse.org/request/show/1109773
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-drgn?expand=0&rev=5
2023-09-10 11:10:09 +00:00
Petr Tesařík
6ed472b3b7 Accepting request 1109772 from home:ptesarik:branches:Kernel:kdump
- Update to drgn-0.0.24:
  * Linked list length helper
  * Networking helpers
  * C++ lookups
  * Split DWARF
  * Performance improvements

OBS-URL: https://build.opensuse.org/request/show/1109772
OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/python-drgn?expand=0&rev=10
2023-09-08 19:30:17 +00:00
f5a0983b30 Accepting request 1095952 from Kernel:kdump
- Update to drgn-0.0.23:
  * Support Linux 6.3 and 6.4
  * Full s390x support
  * Extend idr helpers for pre-4.11 Linux
  * Support GNU-style compressed .zdebug_* sections
  * New scripts in contrib

OBS-URL: https://build.opensuse.org/request/show/1095952
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-drgn?expand=0&rev=4
2023-06-29 15:29:21 +00:00
Petr Tesařík
35e7165ba5 - Update to drgn-0.0.23:
* Support Linux 6.3 and 6.4
  * Full s390x support
  * Extend idr helpers for pre-4.11 Linux
  * Support GNU-style compressed .zdebug_* sections
  * New scripts in contrib

OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/python-drgn?expand=0&rev=8
2023-06-29 10:29:24 +00:00
fcdb11a68e Accepting request 1057008 from Kernel:kdump
- Update to drgn-0.0.22:
  * License changed to LGPLv2.1+.
  * Linux kernel support was tested up to Linux 6.2-rc2.
  * Oldest kernel version officially supported is now 4.9.
  * The StackFrame.locals() method was added.
  * The StackFrame.sp attribute was added.
  * Helpers for XArrays were added.
  * The drgn.helpers.linux.slab.get_slab_aliases() helper was added.
  * The drgn.helpers.linux.slab.slab_object_info() helper was added.
  * The drgn.helpers.common.memory.identify_address() helper now
    provide the offset from the beginning of the slab object and
    whether it is allocated or free.
  * The drgn.helpers.common.stack.print_annotated_stack() helper was
    added.
  * Support for Linux kernel modules and stack unwinding on s390x.
  * Partial support for looking up types with C++ template
    arguments.
  * Parsing debug info for C++ template parameter packs.

OBS-URL: https://build.opensuse.org/request/show/1057008
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-drgn?expand=0&rev=3
2023-01-09 16:23:29 +00:00
Petr Tesařík
53e69ed21c Fix build requirements.
OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/python-drgn?expand=0&rev=6
2023-01-07 20:54:44 +00:00
Petr Tesařík
53dc251463 - Update to drgn-0.0.22:
* License changed to LGPLv2.1+.
  * Linux kernel support was tested up to Linux 6.2-rc2.
  * Oldest kernel version officially supported is now 4.9.
  * The StackFrame.locals() method was added.
  * The StackFrame.sp attribute was added.
  * Helpers for XArrays were added.
  * The drgn.helpers.linux.slab.get_slab_aliases() helper was added.
  * The drgn.helpers.linux.slab.slab_object_info() helper was added.
  * The drgn.helpers.common.memory.identify_address() helper now
    provide the offset from the beginning of the slab object and
    whether it is allocated or free.
  * The drgn.helpers.common.stack.print_annotated_stack() helper was
    added.
  * Support for Linux kernel modules and stack unwinding on s390x.
  * Partial support for looking up types with C++ template
    arguments.
  * Parsing debug info for C++ template parameter packs.

OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/python-drgn?expand=0&rev=5
2023-01-07 20:48:01 +00:00
9330817768 Accepting request 1010977 from Kernel:kdump
OBS-URL: https://build.opensuse.org/request/show/1010977
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-drgn?expand=0&rev=2
2022-10-15 14:37:41 +00:00
Petr Tesařík
9455b3cf8e Accepting request 1010976 from home:ptesarik:branches:Kernel:kdump
- Update to drgn-0.0.21:
  * Linux kernel support up to Linux 6.0.
  * Helpers for lockless linked lists in the Linux kernel.
  * A helper to find the slab cache that a virtual address came.
  * A drgn.helpers.common package for helpers that can be used with
    any program (which may have program-specific additional
    behavior).
  * A helper to identify an arbitrary address (e.g., as a symbol or
    slab object).
  * PageFoo() helpers to check various struct page flags.
  * Helpers for working with compound pages.
  * A helper to get the CPU that a task last ran on.
  * Automatic pretty-printing in IPython/Jupyter.
  * drgn.StackTrace.prog was added as a way to get the program that a stack trace came from.
  * Bug fixes, documentation, minor API changes.

OBS-URL: https://build.opensuse.org/request/show/1010976
OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/python-drgn?expand=0&rev=3
2022-10-14 16:19:14 +00:00
d1152e021d Accepting request 995072 from Kernel:kdump
Initial submission of drgn.

OBS-URL: https://build.opensuse.org/request/show/995072
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-drgn?expand=0&rev=1
2022-08-15 17:58:19 +00:00
Petr Tesařík
43711c1d56 - Initial packaging for openSUSE.
OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/python-drgn?expand=0&rev=1
2022-08-14 21:01:32 +00:00
10 changed files with 30 additions and 149 deletions

View File

@@ -2,17 +2,15 @@
<service name="obs_scm" mode="manual">
<param name="scm">git</param>
<param name="url">https://github.com/osandov/drgn.git</param>
<param name="revision">refs/tags/v0.0.30</param>
<!--<param name="versionformat">@PARENT_TAG@+git@TAG_OFFSET@.%h</param>-->
<param name="versionformat">@PARENT_TAG@</param>
<param name="versionrewrite-pattern">v(.*)</param>
<param name="versionrewrite-replacement">\1</param>
<param name="revision">main</param>
<param name="versionformat">@PARENT_TAG@+git@TAG_OFFSET@.g%h</param>
<param name="versionrewrite-pattern">v([^+]*\+git[1-9].*)|v([^+]*)\+git0.*</param>
<param name="versionrewrite-replacement">\1\2</param>
</service>
<service name="set_version" mode="manual"/>
<service mode="buildtime" name="tar">
</service>
<service mode="buildtime" name="recompress">
<service name="tar" mode="manual"/>
<service name="recompress" mode="manual">
<param name="file">*.tar</param>
<param name="compression">gz</param>
<param name="compression">xz</param>
</service>
</services>

BIN
drgn-0.0.29.tar.gz (Stored with Git LFS)

Binary file not shown.

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c1cbd99a479d3036f446243bfc1630d0393dd334ece9e32b13a61f42b88a3984
size 4076044

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:828cb0a3ea424654314548d0f39765cad36c6c285ca0d9f53d0bd29f8f419a52
size 853847

BIN
drgn-0.0.31.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -1,4 +1,4 @@
name: drgn
version: 0.0.30
mtime: 1734560126
commit: 92023c5b5d5a1c7e1556e945b098148f0b46e608
version: 0.0.31
mtime: 1744828823
commit: 8209a147fb61deed38ca376d063bbff0343ca234

View File

@@ -1,37 +0,0 @@
From: Petr Tesarik <ptesarik@suse.com>
Date: Tue, 3 Dec 2024 13:54:40 +0100
Subject: libdrgn: kdump: prepare for incompatible changes in
libkdumpfile-0.5.5
Upstream: merged
Git-commit: 4e06cfdff158935eee725e726a63a5d9c9e57dab
The kdump_get_typed_attr() function prototype changed in libkdumpfile
commit e182aeaf4d72 ("Make kdump_get_typed_attr() easier to use").
Signed-off-by: Petr Tesarik <ptesarik@suse.com>
---
libdrgn/kdump.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libdrgn/kdump.c b/libdrgn/kdump.c
index 0bb594d1..4e5eea92 100644
--- a/libdrgn/kdump.c
+++ b/libdrgn/kdump.c
@@ -318,9 +318,14 @@ struct drgn_error *drgn_program_cache_kdump_threads(struct drgn_program *prog)
+ 1];
snprintf(attr_name, sizeof(attr_name), FORMAT, i);
#undef FORMAT
+#if KDUMPFILE_VERSION >= KDUMPFILE_MKVER(0, 5, 5)
+ ks = kdump_get_typed_attr(prog->kdump_ctx, attr_name,
+ KDUMP_BLOB, &prstatus_attr.val);
+#else
prstatus_attr.type = KDUMP_BLOB;
ks = kdump_get_typed_attr(prog->kdump_ctx, attr_name,
&prstatus_attr);
+#endif
if (ks != KDUMP_OK) {
return drgn_error_format(DRGN_ERROR_OTHER,
"kdump_get_typed_attr(%s): %s",
--
2.47.1

View File

@@ -1,86 +0,0 @@
From: Petr Tesarik <ptesarik@suse.com>
Date: Mon, 2 Dec 2024 17:38:24 +0100
Subject: libdrgn: kdump: simplify getting the PRSTATUS attributes
Upstream: merged
Git-commit: 885a3209f3603593fb89327c1072f94e5862ffbb
Since libkdumpfile commit 5b044292abe9 ("Clarify and fix attribute data
lifetime") changes the lifetime of attribute values retrieved with
kdump_attr_ref_get(), the extra reference would keep the PRSTATUS blob
around even after kdump_free().
However, the attribute hierarchy cannot change while iterating over the
PRSTATUS attributes, so it is not necessary to take an attribute reference
and we can use kdump_get_typed_attr().
The attribute blob itself should not change either, but it is a good idea
to keep its data pinned, because a raw pointer to it is stored in the
drgn_thread_set hash table. If some code tries to modify the PRSTATUS
attribute data, the attempt will fail with KDUMP_ERR_BUSY rather than leave
a dangling pointer in the hash table and possibly cause a UAF bug later.
The blob pin does not prevent freeing the blob when the blob reference
count reaches zero.
Signed-off-by: Petr Tesarik <ptesarik@suse.com>
---
libdrgn/kdump.c | 28 ++++++++++------------------
1 file changed, 10 insertions(+), 18 deletions(-)
diff --git a/libdrgn/kdump.c b/libdrgn/kdump.c
index 09efd965..0bb594d1 100644
--- a/libdrgn/kdump.c
+++ b/libdrgn/kdump.c
@@ -299,39 +299,31 @@ struct drgn_error *drgn_program_cache_kdump_threads(struct drgn_program *prog)
}
/*
- * Note that in the following loop we never call kdump_attr_unref() on
- * prstatus_ref, nor kdump_blob_unpin() on the prstatus blob that we get
- * from libkdumpfile. Since drgn is completely read-only as a consumer
- * of that library, we "leak" both the attribute reference and blob pin
- * until kdump_free() is called which will clean up everything for us.
+ * Note that in the following loop we never call kdump_blob_unpin() on
+ * the prstatus blob that we get from libkdumpfile. Since drgn never
+ * modifies the PRSTATUS attributes (neither directly nor indirectly),
+ * we "leak" the blob pin until kdump_free() is called, which will
+ * clean up everything for us.
*/
for (i = 0; i < ncpus; i++) {
- /* Enough for the longest possible PRSTATUS attribute name. */
- kdump_attr_ref_t prstatus_ref;
kdump_attr_t prstatus_attr;
void *prstatus_data;
size_t prstatus_size;
#define FORMAT "cpu.%" PRIuFAST64 ".PRSTATUS"
+ /* Enough for the longest possible PRSTATUS attribute name. */
char attr_name[sizeof(FORMAT)
- sizeof("%" PRIuFAST64)
+ max_decimal_length(uint_fast64_t)
+ 1];
snprintf(attr_name, sizeof(attr_name), FORMAT, i);
#undef FORMAT
- ks = kdump_attr_ref(prog->kdump_ctx, attr_name, &prstatus_ref);
- if (ks != KDUMP_OK) {
- return drgn_error_format(DRGN_ERROR_OTHER,
- "kdump_attr_ref(%s): %s",
- attr_name,
- kdump_get_err(prog->kdump_ctx));
- }
-
- ks = kdump_attr_ref_get(prog->kdump_ctx, &prstatus_ref,
- &prstatus_attr);
+ prstatus_attr.type = KDUMP_BLOB;
+ ks = kdump_get_typed_attr(prog->kdump_ctx, attr_name,
+ &prstatus_attr);
if (ks != KDUMP_OK) {
return drgn_error_format(DRGN_ERROR_OTHER,
- "kdump_attr_ref_get(%s): %s",
+ "kdump_get_typed_attr(%s): %s",
attr_name,
kdump_get_err(prog->kdump_ctx));
}
--
2.47.1

View File

@@ -1,3 +1,17 @@
-------------------------------------------------------------------
Thu Apr 17 06:47:43 UTC 2025 - Petr Tesařík <ptesarik@suse.com>
- Update to drgn-0.0.31:
* New command line options and APIs for controlling how debugging
information is found
* Improved debuginfod integration
* Stack tracing through unknown kernel modules with ORC
* New helpers
* Bug fixes
- Drop upstreamed patches:
* libdrgn-kdump-prepare-for-incompatible-changes-in-li.patch
* libdrgn-kdump-simplify-getting-the-PRSTATUS-attribut.patch
-------------------------------------------------------------------
Thu Mar 6 13:35:39 UTC 2025 - Michal Koutný <mkoutny@suse.com>

View File

@@ -17,16 +17,15 @@
Name: python-drgn
Version: 0.0.30
Version: 0.0.31
Release: 0
Summary: Scriptable debugger library
License: LGPL-2.1-or-later
Group: Development/Tools/Debuggers
URL: https://github.com/osandov/drgn
Source: drgn-%{version}.tar.gz
Patch1: libdrgn-kdump-simplify-getting-the-PRSTATUS-attribut.patch
Patch2: libdrgn-kdump-prepare-for-incompatible-changes-in-li.patch
Source: drgn-%{version}.tar.xz
BuildRequires: %{python_module devel}
BuildRequires: %{python_module readline}
BuildRequires: %{python_module setuptools}
BuildRequires: autoconf
BuildRequires: automake
@@ -48,7 +47,6 @@ for easy, expressive scripting in Python.
%prep
%setup -q -n drgn-%{version}
%autopatch -p1
%build
export CFLAGS="%{optflags}"