diff --git a/drgn-0.0.30.obscpio b/drgn-0.0.30.obscpio deleted file mode 100644 index 26f9f9c..0000000 --- a/drgn-0.0.30.obscpio +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c1cbd99a479d3036f446243bfc1630d0393dd334ece9e32b13a61f42b88a3984 -size 4076044 diff --git a/drgn-0.0.31.tar.xz b/drgn-0.0.31.tar.xz new file mode 100644 index 0000000..79b28f9 --- /dev/null +++ b/drgn-0.0.31.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:457e34a2cda9d3339f7a157c42c58353a3b10537f8c694bc9bdd9836b88b1a6e +size 833736 diff --git a/drgn.obsinfo b/drgn.obsinfo index e558353..ef95b76 100644 --- a/drgn.obsinfo +++ b/drgn.obsinfo @@ -1,4 +1,4 @@ name: drgn -version: 0.0.30 -mtime: 1734560126 -commit: 92023c5b5d5a1c7e1556e945b098148f0b46e608 +version: 0.0.31 +mtime: 1744828823 +commit: 8209a147fb61deed38ca376d063bbff0343ca234 diff --git a/libdrgn-kdump-prepare-for-incompatible-changes-in-li.patch b/libdrgn-kdump-prepare-for-incompatible-changes-in-li.patch deleted file mode 100644 index 2c2a8dc..0000000 --- a/libdrgn-kdump-prepare-for-incompatible-changes-in-li.patch +++ /dev/null @@ -1,37 +0,0 @@ -From: Petr Tesarik -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 ---- - 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 - diff --git a/libdrgn-kdump-simplify-getting-the-PRSTATUS-attribut.patch b/libdrgn-kdump-simplify-getting-the-PRSTATUS-attribut.patch deleted file mode 100644 index 79ad927..0000000 --- a/libdrgn-kdump-simplify-getting-the-PRSTATUS-attribut.patch +++ /dev/null @@ -1,86 +0,0 @@ -From: Petr Tesarik -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 ---- - 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 - diff --git a/python-drgn.changes b/python-drgn.changes index 50ba702..7b95b8b 100644 --- a/python-drgn.changes +++ b/python-drgn.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Thu Apr 17 06:47:43 UTC 2025 - Petr Tesařík + +- 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ý diff --git a/python-drgn.spec b/python-drgn.spec index 2721af4..83e4c6b 100644 --- a/python-drgn.spec +++ b/python-drgn.spec @@ -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.xz -Patch1: libdrgn-kdump-simplify-getting-the-PRSTATUS-attribut.patch -Patch2: libdrgn-kdump-prepare-for-incompatible-changes-in-li.patch 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}"