Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A slabinfo fix, and the v1 (1.1.0) release #103

Merged
merged 2 commits into from
Aug 28, 2024

Conversation

brenns10
Copy link
Member

The slabinfo fix was more involved than I wanted, but it works well, is compatible with drgn 0.0.25 - 0.0.27, and it actually makes the slabinfo module modestly faster.

Freelist corruption results in the "slabinfo" module crashing. Since
this is a common symptom of use-after-free bugs, we'd rather give useful
information about this case. So don't crash the module. Catch the error
and report corruption issues at the end.

This also helps in certain cases where we are running against a live
kernel, and the freelist is not corrupt, but it changed by the time we
decoded the pointer. As a result, we print different messages at
different times: for live systems, we say this may be transient, but for
core dumps, we say it indicates a potential use-after-free bug.

To do this, we have to implement a rather sketchy workaround to use the
_SlabCacheHelperSlub from drgn. This is manually verified to work on
0.0.25 through 0.0.27, which are the only supported drgn versions. But,
we need to work on upstream tweaks to improve the slab helpers, so we
don't need to rely on the hack.

Signed-off-by: Stephen Brennan <[email protected]>
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Aug 27, 2024
@brenns10 brenns10 requested a review from biger410 August 27, 2024 23:08
@@ -1,7 +1,7 @@
# Copyright (c) 2024, Oracle and/or its affiliates.
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
Name: python-drgn-tools
Version: 0.9.1
Version: 1.0.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is the main branch, so it is still 1.0.0? You will create a new branch for v1 and set version to 1.1.0 there and also change the version here to 2.0.0, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I totally missed that. This should go to 1.1.0, I'll create the stable/v1 branch, and then on the main branch I'll bump to 2.0.0.

Signed-off-by: Stephen Brennan <[email protected]>
@@ -61,6 +61,9 @@ rm %{buildroot}/usr/bin/DRGN
%{_mandir}/man1/corelens.1.gz

%changelog
* Tue Aug 27 2024 Stephen Brennan <[email protected]> - 1.1.0-1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be 1.1.0 instead of 1.1.0-1?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, most RPMs have a release version appended with the hyphen, it starts at 1. If we update the packaging alone, we'll update that number.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It comes from line 5 above.

Copy link
Member

@biger410 biger410 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@brenns10 brenns10 merged commit 3afc561 into oracle-samples:main Aug 28, 2024
5 checks passed
@brenns10 brenns10 deleted the v1-release-changes branch August 28, 2024 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants