函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\alternative.c Create Date:2022-07-27 08:45:05
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:text_poke_loc_init

函数原型:void text_poke_loc_init(struct text_poke_loc *tp, void *addr, const void *opcode, size_t len, const void *emulate)

返回类型:void

参数:

类型参数名称
struct text_poke_loc *tp
void *addr
const void *opcode
size_tlen
const void *emulate
1122  如果非opcodeopcode等于text
1124  否则memcpy((void * )text, opcode, len)
1127  如果非emulateemulate等于opcode
1130  Init insn for kernel text
1131  sn_get_length() - Get the length of instruction*@insn: &struct insn containing instruction* If necessary, first collects the instruction up to and including the* immediates bytes.
1133  BUG_ON(!Ensure this instruction is decoded completely )
1134  BUG_ON(len != length)
1136  addr等于addr
1137  len等于len
1138  opcode等于bytes[0]
1141  :opcode恒等于INT3_INSN_OPCODE
1142  退出
1144  :opcode恒等于CALL_INSN_OPCODE
1145  :opcode恒等于JMP32_INSN_OPCODE
1146  :opcode恒等于JMP8_INSN_OPCODE
1147  rel32等于value
1148  退出
1150  默认
1152  :len恒等于2
1154  opcode等于JMP8_INSN_OPCODE
1155  rel32等于0
1156  退出
1158  :len恒等于5
1161  rel32等于0
1162  退出
1164  默认
1165  BUG()
1167  退出
调用者
名称描述
text_poke_bpxt_poke_bp() -- update instructions on live kernel on SMP*@addr: address to patch*@opcode: opcode of new instruction*@len: length to copy*@handler: address to jump to when the temporary breakpoint is hit* Update a single instruction with the vector in the
arch_jump_label_transform_queue