-
Notifications
You must be signed in to change notification settings - Fork 139
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
fix issues: https://github.com/iovisor/ubpf/issues/609 #613
base: main
Are you sure you want to change the base?
Conversation
…NE/TARGET_PC_EXTERNAL_DISPATCHER/TARGET_LOAD_HELPER_TABLE) may conflict with normal target_pc
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.
@zhaozhongshu Thank you so much for submitting this PR! You raise an incredibly great point. Here's what I am wondering, though:
I really like how you are using the high bits to make sure that we have less opportunity to conflict with a real value. It seems that no matter what special value we use, we always run a risk for an overlap.
I have been thinking about this problem and I was wondering what you thought about a solution like this:
- Make a target type that is essentially a tagged union where one type is a "special value" and the other is a real target. The special values could take on one of these special values.
- When we use the value to patch up, we would check the tag in the union to see whether it is a special value or an actual target.
- Then, depending on that tag value, we can do "the right thing".
If you think that this would be something that would be a good solution, I would be more than happy to code it. I don't want to make more work for you!
That said, I also know what it's like to submit a PR and not get to land it yourself -- so I absolutely do not want to take this work from you!
Again, I would love your feedback. And, to reiterate, thank you for the work!
Will
very complete solution |
FYI: @zhaozhongshu , I have a WIP that is close to being ready to publish for your review! I just need to do some cleanup! Thank you for pointing out the problem! Will |
Hello! I am sorry for the delay. I am still working on a solution to this problem and I will (hopefully) have a draft posted tonight! Sorry, again, for the delay! |
special targets(TARGET_PC_EXIT/TARGET_PC_ENTER/TARGET_PC_RETPOLINE/TARGET_PC_EXTERNAL_DISPATCHER/TARGET_LOAD_HELPER_TABLE) may conflict with normal target_pc