-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
libkvm: Fix kvm_getloadavg() on modern kernel vmcores #570
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fix kvm_getloadavg() to work correctly on vmcores for modern kernel versions. The kernels no longer include the `_fscale` symbol causing the kvm_nlist() invocation to fail. The code seemed to already assume that `_fscale` could be missing but the early kvm_nlist() result check has caused the function to fail if any symbol were missing. Modify it to only treat `_averunnable` as obligatory, and handle missing `_fscale` gracefully. Sponsored by: The FreeBSD Foundation
Merged as 8099a35. |
Unsubscribe
On Tue, Dec 7, 2021 at 15:22 Michał Górny ***@***.***> wrote:
Fix kvm_getloadavg() to work correctly on vmcores for modern kernel
versions. The kernels no longer include the _fscale symbol causing
the kvm_nlist() invocation to fail. The code seemed to already assume
that _fscale could be missing but the early kvm_nlist() result check
has caused the function to fail if any symbol were missing. Modify
it to only treat _averunnable as obligatory, and handle missing
_fscale gracefully.
Sponsored by: The FreeBSD Foundation
------------------------------
You can view, comment on, or merge this pull request online at:
#570
Commit Summary
- 7bcf80c
<7bcf80c>
libkvm: Fix kvm_getloadavg() on modern kernel vmcores
File Changes
(1 file <https://github.com/freebsd/freebsd-src/pull/570/files>)
- *M* lib/libkvm/kvm_getloadavg.c
<https://github.com/freebsd/freebsd-src/pull/570/files#diff-d41ed4d93297052e7e279ea3192b7553b69acf23bbfa6367ac86a1d0d0b93182>
(9)
Patch Links:
- https://github.com/freebsd/freebsd-src/pull/570.patch
- https://github.com/freebsd/freebsd-src/pull/570.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#570>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABZRUS7GE5WQPBOYR37ELR3UPZUJLANCNFSM5JSD7UMQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
--
Steven
KW4HQ
|
freebsd-git
pushed a commit
that referenced
this pull request
Feb 23, 2022
Reviewed by: imp Pull Request: #570
bsdimp
pushed a commit
to bsdimp/dtc
that referenced
this pull request
Feb 24, 2022
Reviewed by: imp Pull Request: freebsd/freebsd-src#570 FreeBSD Hash: 62d16ad37df7d9efb6e329c9e7ca1fc3975a1966
bsdjhb
pushed a commit
to bsdjhb/cheribsd
that referenced
this pull request
Mar 4, 2022
Reviewed by: imp Pull Request: freebsd/freebsd-src#570
zxombie
pushed a commit
to CTSRD-CHERI/freebsd-morello
that referenced
this pull request
Mar 11, 2022
Reviewed by: imp Pull Request: freebsd#570
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix kvm_getloadavg() to work correctly on vmcores for modern kernel
versions. The kernels no longer include the
_fscale
symbol causingthe kvm_nlist() invocation to fail. The code seemed to already assume
that
_fscale
could be missing but the early kvm_nlist() result checkhas caused the function to fail if any symbol were missing. Modify
it to only treat
_averunnable
as obligatory, and handle missing_fscale
gracefully.Sponsored by: The FreeBSD Foundation