-
Notifications
You must be signed in to change notification settings - Fork 591
Issue #1761: handle new bin_attribute format for module sections #1773
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
Open
Abyss-W4tcher
wants to merge
22
commits into
volatilityfoundation:develop
Choose a base branch
from
Abyss-W4tcher:issue_1761_module_sect_attr_fix
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 5 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
6e0fb2e
make module_sect_attr and bin_attribute optional
Abyss-W4tcher 5c411a9
determine sect_attrs.attrs subtype dynamically
Abyss-W4tcher 06c9d1f
black formatting
Abyss-W4tcher 267aa2e
sections manual enumeration adjustment
Abyss-W4tcher aa503c9
sections manual enumeration adjustment
Abyss-W4tcher 311914f
get_sections() sanity check
Abyss-W4tcher 7e6b46a
add bin_attribute address virtual member
Abyss-W4tcher 2134d9d
1774: consolidate module helpers
Abyss-W4tcher dcbcb96
handle None in _parse_sections caller
Abyss-W4tcher 635237b
rollback to already patched version
Abyss-W4tcher 0f22478
add ATTRIBUTE_NAME_MAX_SIZE constant
Abyss-W4tcher 23e2471
use ATTRIBUTE_NAME_MAX_SIZE constant
Abyss-W4tcher 6bd2ed6
make binary attributes iteration NULL terminated
Abyss-W4tcher 907acf3
add dynamically_sized_array_of_pointers() helper
Abyss-W4tcher 49761b5
use dynamically_sized_array_of_pointers in _get_sect_count
Abyss-W4tcher 6df8ac2
correct type hinting
Abyss-W4tcher ed8af0a
lru_cache get_modules_memory_boundaries()
Abyss-W4tcher 4009c6b
add section address sanity check
Abyss-W4tcher 13bf505
leverage the existing Array facility
Abyss-W4tcher 3dc5569
adjust to the new NULL-terminated processing
Abyss-W4tcher d519817
slight readability adjustment
Abyss-W4tcher f9fbff4
rollback to 635237b to prevent circular import
Abyss-W4tcher File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm always a little nervous about random hard coded numbers. Is this defined anywhere we could find it, is 50 enough, does that number come from source code or how was 50 decided upon?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have the answer to this question, for now I just duplicated code from modules.py, given the context.
As this is a NULL terminated array of pointers, it would be optimal to iterate over it that way, or even extend current utilities for it like
array_of_pointers(null_terminated=True).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we have a number of string functions that do null terminate, but they should all always have a maximum value (otherwise we could just keep running forever). I'm just trying to find out what the appropriate maximum value should be and why (if anyone knows)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any progress on where this value came from? Ideally we'd avoid this the same was as we avoid the other one (or at least comment where the size of the value comes from).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a change that makes it a NULL-terminated iteration (just as the structure's design). It is safer to make a NULL-terminated array of pointers iteration, as if it encounters a value that cannot be dereferenced the loop will break immediately.