-
Notifications
You must be signed in to change notification settings - Fork 640
Fix get_name API, fix malfind #1596
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1056,7 +1056,7 @@ def get_page_offset(self) -> int: | |
| parent_layer = self._context.layers[self.vol.layer_name] | ||
| return self.vm_pgoff << parent_layer.page_shift | ||
|
|
||
| def get_name(self, context, task): | ||
| def _do_get_name(self, context, task) -> str: | ||
| if self.vm_file != 0: | ||
| fname = linux.LinuxUtilities.path_for_file(context, task, self.vm_file) | ||
| elif self.vm_start <= task.mm.start_brk and self.vm_end >= task.mm.brk: | ||
|
|
@@ -1072,6 +1072,12 @@ def get_name(self, context, task): | |
| fname = "Anonymous Mapping" | ||
| return fname | ||
|
|
||
| def get_name(self, context, task) -> Optional[str]: | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, there wasn't a return type defined, so theoretically you could make a case for it being ok, but I'd at least bump the PATCH number, so we know that changes were made and be able to differentiate if strange things start being reported please. Hopefully this is in line to be moved to its own separate module in the same style as the ftrace stuff at some point...
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok where do I bump the PATCH number for this for now? |
||
| try: | ||
| return self._do_get_name(context, task) | ||
| except exceptions.InvalidAddressException: | ||
| return None | ||
|
|
||
| # used by malfind | ||
| def is_suspicious(self, proclayer=None): | ||
| ret = False | ||
|
|
||
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.
It's an internal/non-exposed function, so this change is fine, but could we get a return type in the function signature please?
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.
Added