Function report |
Source Code:arch\x86\kernel\kprobes\opt.c |
Create Date:2022-07-28 08:39:21 |
Last Modify:2022-05-22 07:44:06 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Copy replacing target instructions* Target instructions MUST be relocatable (checked inside)* This is called when new aggr(opt)probe is allocated or reused.
Proto:int arch_prepare_optimized_kprobe(struct optimized_kprobe *op, struct kprobe *__unused)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct optimized_kprobe * | op | |
struct kprobe * | __unused |
360 | If Not Decode whole function to ensure any instructions don't jump into target Then Return -EILSEQ |
363 | buf = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc). |
367 | detour code buffer = slot = get_optinsn_slot() |
368 | If Not slot Then |
377 | rel = slot - location of the probe point + RELATIVEJUMP_SIZE |
387 | ret = copy_optimized_instructions(buf + TMPL_END_IDX, location of the probe point , slot + TMPL_END_IDX) |
404 | len += RELATIVEJUMP_SIZE |
408 | ret = 0 |
409 | out : |
411 | Return ret |
413 | err : |
415 | Go to out |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |