Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\alternative.c Create Date:2022-07-28 07:45:13
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:text_poke_loc_init

Proto:void text_poke_loc_init(struct text_poke_loc *tp, void *addr, const void *opcode, size_t len, const void *emulate)

Type:void

Parameter:

TypeParameterName
struct text_poke_loc *tp
void *addr
const void *opcode
size_tlen
const void *emulate
1122  If Not opcode Then opcode = text
1124  Else memcpy((void * )text, opcode, len)
1127  If Not emulate Then emulate = 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  Case opcode == INT3_INSN_OPCODE
1142  Break
1144  Case opcode == CALL_INSN_OPCODE
1145  Case opcode == JMP32_INSN_OPCODE
1146  Case opcode == JMP8_INSN_OPCODE
1147  rel32 = value
1148  Break
1150  Default
1152  Case len == 2
1155  rel32 = 0
1156  Break
1158  Case len == 5
1161  rel32 = 0
1162  Break
1164  Default
1165  BUG()
1167  Break
Caller
NameDescribe
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