Skip to content

Merge branch 'master' into '6.0/stage' #19

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 16 commits into from
Oct 16, 2020
Merged

Merge branch 'master' into '6.0/stage' #19

merged 16 commits into from
Oct 16, 2020

Conversation

github-actions[bot]
Copy link

@github-actions github-actions bot commented Oct 9, 2020

No description provided.

osandov and others added 16 commits September 29, 2020 23:04
doxygen warns about a few obsolete Doxyfile options. Update it with
doxygen -u.

Signed-off-by: Omar Sandoval <[email protected]>
The Doxygen documentation for libdrgn has bit-rotted over time. Bring
back the Internal module, clean up a few renamed members and parameters,
and fix broken parsing caused by the generic definition macros.

Signed-off-by: Omar Sandoval <[email protected]>
drgn_type_members_eq() skips comparing the types of anonymous members.
Fix that and add a test for it.

Signed-off-by: Omar Sandoval <[email protected]>
These will be used in upcoming changes.

Signed-off-by: Omar Sandoval <[email protected]>
And improve their documentation.

Signed-off-by: Omar Sandoval <[email protected]>
min() and max() from the Linux kernel go through the trouble of
resulting in a constant expression if the arguments are constant
expressions, but they can't be used outside of a function due to their
use of ({ }). This means that they can't be used for, e.g., enumerators
or global arrays. Let's simplify min() and max() and instead add
explicit min_iconst() and max_iconst() macros that can be used
everywhere that an integer constant expression is required. We can then
use it in hash_table.h. While we're here, let's split these into their
own header file and document them better.

Signed-off-by: Omar Sandoval <[email protected]>
Use *_hash_pair() for hash functions that do the full double hashing and
return a struct hash_pair and hash_*() for other hashing utility
functions. Also change some of the equality function names to be more
symmetric and improve the documentation.

Signed-off-by: Omar Sandoval <[email protected]>
These were added in commit e5874ad ("libdrgn: use libdwfl"), but
they have never been used. Remove them.

Signed-off-by: Omar Sandoval <[email protected]>
The next commit will allow using the offline path for the live kernel,
so the offline naming won't make much sense. Fold the offline path into
the top-level functions, and make the live path an escape hatch. Also
add some comments and improve naming for the file and directory handles
and update the coding style.

Signed-off-by: Omar Sandoval <[email protected]>
…and /sys/module

We use /proc/modules and /sys/module to find loaded kernel modules for
the running kernel instead of walking the module list in the core dump
as an optimization. To make it easier to test the core dump path, add an
environment variable to disable the optimization.

Signed-off-by: Omar Sandoval <[email protected]>
We're freeing path and then using it to report an error.

This has some weird knock-on effects. Since we freed the path, the error
message contains garbage. So, PyErr_SetString() can't decode it as a
UTF-8 string. The end result is a MissingDebugInfoError with no message.

Fix it by creating the error before freeing the path.

Signed-off-by: Omar Sandoval <[email protected]>
If cache_kernel_module_sections() in report_loaded_kernel_module()
fails, we continue to the next iteration without advancing to the next
kernel module. Then, we fail on that same kernel module and repeat. Make
sure that we go to the next kernel module.

Fixes: 423d2cd ("libdrgn: dwarf_index: rework file reporting")
Reported-by: Serapheim Dimitropoulos <[email protected]>
Signed-off-by: Omar Sandoval <[email protected]>
Linux v5.8 changed the module section structure, so we need to get the
section name differently.

Closes osandov#73.

Reported-by: Serapheim Dimitropoulos <[email protected]>
Signed-off-by: Omar Sandoval <[email protected]>
@sdimitro sdimitro requested a review from prakashsurya October 16, 2020 15:09
@prakashsurya prakashsurya merged commit 347ff46 into 6.0/stage Oct 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants