函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\kprobes\opt.c Create Date:2022-07-27 09:38:28
Last Modify:2022-05-22 07:44:06 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:copy_optimized_instructions

函数原型:static int copy_optimized_instructions(u8 *dest, u8 *src, u8 *real)

返回类型:int

参数:

类型参数名称
u8 *dest
u8 *src
u8 *real
180  len等于0
182 len小于RELATIVEJUMP_SIZE循环
183  ret等于Copy an instruction with recovering modified instruction by kprobes* and adjust the displacement if the instruction uses the %rip-relative* addressing mode. Note that since @real will be the final place of copied
184  如果非ret或非Returns non-zero if INSN is boostable.* RIP relative instructions are adjusted at copying time in 64 bits mode则返回:负EINVAL
186  len加等于ret
189  如果ftrace_text_reserved(src, src + len - 1)或alternatives_text_reserved(src, src + len - 1)或jump_label_text_reserved(src, src + len - 1)则返回:负EBUSY
194  返回:len
调用者
名称描述
arch_prepare_optimized_kprobeCopy replacing target instructions* Target instructions MUST be relocatable (checked inside)* This is called when new aggr(opt)probe is allocated or reused.