-
Notifications
You must be signed in to change notification settings - Fork 151
Uprobe prologue ci #10296
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
Draft
olsajiri
wants to merge
14
commits into
kernel-patches:bpf-next_base
Choose a base branch
from
olsajiri:uprobe_prologue_ci
base: bpf-next_base
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.
Draft
Uprobe prologue ci #10296
olsajiri
wants to merge
14
commits into
kernel-patches:bpf-next_base
from
olsajiri:uprobe_prologue_ci
Conversation
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
06fca8c to
82788a4
Compare
4a6b8b7 to
1efb39d
Compare
It's not used, pt_regs_offset returns only offset to struct pt_regs, not the actual register values. Signed-off-by: Jiri Olsa <[email protected]>
It's not used, get_reg_offset returns only offset to struct pt_regs, not the actual register values. Signed-off-by: Jiri Olsa <[email protected]>
It's not used, insn_get_modrm_rm_off returns only offset to struct pt_regs, not the actual register values. Signed-off-by: Jiri Olsa <[email protected]>
It's not used, insn_get_modrm_reg_off returns only offset to struct pt_regs, not the actual register values. Signed-off-by: Jiri Olsa <[email protected]>
It's not used, get_reg_offset_16 returns only offset to struct pt_regs, not the actual register values. Signed-off-by: Jiri Olsa <[email protected]>
Mov xol data into separate arch_uprobe_xol object so we can hold more of them in following changes. Signed-off-by: Jiri Olsa <[email protected]>
Using struct arch_uprobe_xol also in emulate callback which will help in following changes. Signed-off-by: Jiri Olsa <[email protected]>
Adding support to emulate mov reg to reg instructions, because it's often part of the function prologue. Signed-off-by: Jiri Olsa <[email protected]>
Adding support to emulate sub reg, imm instructions, because it's often part of the function prologue. Signed-off-by: Jiri Olsa <[email protected]>
Adding support to optimize uprobe on top of instructions that can
be emulated.
The idea is to store instructions on underlying 5 bytes and emulate
them during the int3 and uprobe syscall execution:
- install 'call trampoline' through standard int3 update
- if int3 is hit before we finish optimizing we emulate
all underlying instructions
- when call is installed the uprobe syscall will emulate
all underlying instructions
Adding opt_xol_ops that emulate instructions that are replaced
by 5 bytes call instruction used to optimize the uprobe.
Signed-off-by: Jiri Olsa <[email protected]>
Adding test code for mov and sub instructions emulation. TODO add test for sub flags value emulation. Signed-off-by: Jiri Olsa <[email protected]>
Adding test that places uprobe on top of supported prologue and checks that the uprobe gets properly optimized. Signed-off-by: Jiri Olsa <[email protected]>
Adding uprobe race test on top of prologue instructions. Signed-off-by: Jiri Olsa <[email protected]>
82788a4 to
e0db578
Compare
bfb0726 to
b0a5b86
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.