Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/litevm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/setup-python@v4
name: Set up Python
with:
python-version: '3.x'
python-version: '3.12'
- name: Install pre-commit
run: pip install pre-commit
- name: Run pre-commit hooks
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
- name: Build and install drgn with CTF support
run: |
cd ..
git clone https://github.com/brenns10/drgn -b ctf_0.0.32
git clone https://github.com/brenns10/drgn -b ctf_0.0.33
cd drgn
../drgn-tools/venv/bin/pip install .
- name: Run tests
Expand Down
10 changes: 8 additions & 2 deletions buildrpm/python-drgn-tools.spec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@


Name: python-drgn-tools
Version: 2.1.1
Version: 2.1.2
Release: 1%{?dist}
Summary: Helper scripts for drgn, containing the corelens utility

Expand Down Expand Up @@ -59,7 +59,7 @@ a running kernel image (via /proc/kcore).}
# The drgn dependency can be fulfilled by drgn with, or without, CTF support.
# However, drgn-tools is tied to specific drgn releases.
%global drgn_min 0.0.25
%global drgn_max 0.0.33
%global drgn_max 0.0.34

%package -n drgn-tools
Summary: %{summary}
Expand Down Expand Up @@ -132,6 +132,12 @@ rm %{buildroot}/usr/bin/DRGN
%endif

%changelog
* Thu Nov 06 2025 Stephen Brennan <[email protected]> - 2.1.2-1
- rds: fish crash on NULL task [Orabug: 38225232]
- drgn-tools litevm tests fail due to missing debuginfo [Orabug: 38625032]
- kernfs_memcg: respect max_pages even when overshot
- Add support for drgn 0.0.33

* Tue Jun 24 2025 Stephen Brennan <[email protected]> - 2.1.1-1
- Mountinfo fails on a (nearly) empty struct mount [Orabug: 37911511]
- Test failure for module_build_id() in Linux 6.14 [Orabug: 37973190]
Expand Down
4 changes: 2 additions & 2 deletions drgn_tools/kernfs_memcg.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,9 @@ def dump_page_cache_pages_pinning_cgroups(
path = dentry_path_any_mount(dentry).decode()
cgroup_state = decode_css_flags(cgrp.self.address_of_())
print(
f"page: 0x{page.value_():x} cgroup: {cgroup_path(cgrp).decode()} state: {cgroup_state} path: {path}\n"
f"page: 0x{page.value_():x} cgroup: {cgroup_path(cgrp).decode()} state: {cgroup_state} path: {path}"
)
if max_pages and found_count == max_pages:
if max_pages and found_count >= max_pages:
break
except FaultError:
fault_count = fault_count + 1
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

long_description = "drgn helper script repository"

RELEASE_VERSION = "2.1.0"
RELEASE_VERSION = "2.1.2"
PACKAGES = ["drgn_tools"]


Expand Down Expand Up @@ -88,7 +88,7 @@ def get_version():
description="drgn helper script repository",
long_description=long_description,
install_requires=[
"drgn>=0.0.25,<0.0.33",
"drgn>=0.0.25,<0.0.34",
],
url="https://github.com/oracle-samples/drgn-tools",
author="Oracle Linux Sustaining Engineering Team",
Expand Down
42 changes: 29 additions & 13 deletions testing/litevm/rpm.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ def __init__(
cache_dir: Optional[Path] = None,
pkgbase: str = "kernel-uek",
yum_fmt: Optional[str] = None,
frozen_release: Optional[str] = None,
) -> None:
self.ol_ver = ol_ver
self.uek_ver = uek_ver
Expand All @@ -131,7 +132,7 @@ def __init__(
self.yum_fmt = yum_fmt
self.pkgbase = pkgbase

self._release: str = ""
self._release: str = frozen_release or ""
self._rpm_urls: List[str] = []
self._dbinfo_url: str = ""

Expand Down Expand Up @@ -188,17 +189,26 @@ def _getlatest(self) -> None:
)
db_path = db_path_dec

# Finally, search for the latest version in the DB. We always search for
# kernel-uek since even if the package is split, that's the
# meta-package.
conn = sqlite3.connect(str(db_path))
rows = conn.execute(
"""
SELECT version, release, location_href FROM packages
WHERE name=? AND arch=?;
""",
(self.pkgbase, self.arch),
).fetchall()
if self._release:
# If a release was specified, we'll search for just that version in
# the sqlite db.
rows = conn.execute(
"""
SELECT version, release, location_href FROM packages
WHERE name=? AND (version || '-' || release || '.' || arch)=?;
""",
(self.pkgbase, self._release),
).fetchall()
else:
# Otherwise, fetch all versions so we can find the latest.
rows = conn.execute(
"""
SELECT version, release, location_href FROM packages
WHERE name=? AND arch=?;
""",
(self.pkgbase, self.arch),
).fetchall()
conn.close()

# Sqlite can't sort versions correctly, so we load them all and sort
Expand All @@ -211,7 +221,10 @@ def key(t):
)
rows.sort(key=key, reverse=True)
versions_tried = []
for ver, rel, href in rows[:2]:
# We will try a maximum of the 5 most recent kernel to see whether
# debuginfo is available. This adds a bit of wiggle room in case of
# situations where debuginfo is not up-to-date online.
for ver, rel, href in rows[:5]:
# Check whether all RPMs are either cached or available via HTTP
rpm_urls: List[str] = []
rpm_url = yumbase + href
Expand Down Expand Up @@ -260,7 +273,7 @@ def key(t):
)

def _get_rpms(self) -> None:
if not self._release:
if not self._rpm_urls:
self._getlatest()

self._rpm_paths = []
Expand Down Expand Up @@ -325,6 +338,9 @@ def get_oot_modules(self) -> List[Path]:
"developer/UEK{uek_ver}/{arch}/"
),
pkgbase="kernel-ueknext",
# For stable/v2.1.x, 6.15 is the last supported kernel. Support for more
# recent kernels should come from the next release of drgn-tools.
frozen_release="6.15.0-1.el9ueknext.x86_64",
),
# UEK8 further distributes modules, so we need to add -modules-core.
TestKernel(
Expand Down
Loading