-
Notifications
You must be signed in to change notification settings - Fork 304
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
create-diff-object: fixup new function handling #270
Conversation
The original logic in the inclusion tree code worked under the assumption that it was the only code path marking symbols for inclusion. Therefore, if the symbol had been marked as included, it could be safely assumed that we also already called kpatch_include_symbol() on it. With the special section handling marking symbols as included, however, this assumption is not valid. We should call kpatch_include_symbol() regardless of whether or not the symbol has already been marked as included or not in order to possible include the symbol's entire bundle. Signed-off-by: Seth Jennings <sjenning@redhat.com>
list_for_each_entry(rela, &sec->rela->relas, list) { | ||
if (rela->sym->include) | ||
continue; | ||
list_for_each_entry(rela, &sec->rela->relas, list) | ||
kpatch_include_symbol(rela->sym, recurselevel+1); |
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.
If I understand this right, does this mean we can remove the "rela->sym->include = 1" lines in kpatch_regenerate_special_section and kpatch_process_special_sections?
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.
My brain is about done for today. I don't think that is right since there could be some symbols in the rela group that are not reachable from a changed function, but are still need for the rela group to resolve.
Just for kicks I did remove the include line from kpatch_regenerate_special_section() and it fail integration. Don't know why. Logs didn't say.
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.
Ok, I think that makes sense.
Getting an integration test failure due to a create-diff-object seg fault. Looks like infinite recursion:
|
I knew I had that check in there for some reason!
|
The original logic in the inclusion tree code worked under the
assumption that it was the only code path marking symbols for inclusion.
Therefore, if the symbol had been marked as included, it could be safely
assumed that we also already called kpatch_include_symbol() on it. With
the special section handling marking symbols as included, however, this
assumption is not valid.
We should call kpatch_include_symbol() regardless of whether or not the
symbol has already been marked as included or not in order to possible
include the symbol's entire bundle.
Signed-off-by: Seth Jennings sjenning@redhat.com