forked from osandov/drgn
-
Notifications
You must be signed in to change notification settings - Fork 6
Merge branch 'master' into '6.0/stage' #20
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
Merged
Merged
Conversation
This file contains hidden or 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
pathlib is a bit nicer than os.path for most cases, so try it out starting with vmtest. Signed-off-by: Omar Sandoval <[email protected]>
Linux 5.5 built by GCC 10 doesn't boot due to new optimizations breaking how the kernel sets up the stack canary (https://lkml.org/lkml/2020/3/14/186 has the details). 5.5 has been EOL since April, so the fix was never backported. We could backport it ourselves for vmtest builds or build with GCC 9, but it's not worth the extra effort to test an EOL kernel. Let's just drop it. Signed-off-by: Omar Sandoval <[email protected]>
We currently build with CONFIG_MODULES=n for simplicity. However, this means that we don't test kernel module support at all. Let's enable module support. This requires changing how we distribute kernels. Now, the /lib/modules/$(uname -r) directory (including the vmlinux and vmlinuz) is bundled up as a tarball. We extract it, then mount it with VirtFS, and do some extra setup for device nodes. (We lose the ability to run kernel builds directly, but I've never actually used that functionality.) Signed-off-by: Omar Sandoval <[email protected]>
Now that vmtest supports kernel modules, test that we load them correctly. Closes osandov#74. Signed-off-by: Omar Sandoval <[email protected]>
We get the version of drgn with pkg_resources.get_distribution() in two places: setup.py (when using an sdist) and the CLI. The former causes problems because in some cases, pip doesn't find the drgn distribution that's currently being built. The latter adds significant latency to startup. On my laptop, just importing pkg_resources takes 130 ms. We can solve both of these problems by generating a file containing the version instead. Signed-off-by: Omar Sandoval <[email protected]>
Signed-off-by: Omar Sandoval <[email protected]>
When pointer_type() became a Program method, I forgot to remove the reference to the old pointer_type() method. Signed-off-by: Omar Sandoval <[email protected]>
Signed-off-by: Omar Sandoval <[email protected]>
There are several places where we manually pass around the string name of a tag so it can be used for error messages. Do it programatically instead. Signed-off-by: Omar Sandoval <[email protected]>
Back in commit 9ce9094 ("libdrgn: dwarf_index: don't copy sections into each CU"), I changed the sections to be individual members. The next change will be easier if they're in an array. Signed-off-by: Omar Sandoval <[email protected]>
If the DWARF index encounters any error while parsing, it returns an error saying only "debug information is truncated", which makes it hard to track down parsing errors. The kmod index parser silently swallows errors. For both, replace the mread functions with a higher-level binary_buffer interface that can include more information including the location of the error. For example: /tmp/mybinary: .debug_info+0x4: expected at least 56 bytes, have 55 Signed-off-by: Omar Sandoval <[email protected]>
sdimitro
approved these changes
Nov 19, 2020
prakashsurya
approved these changes
Nov 19, 2020
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.
No description provided.