Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__jump_label_set_jump_code

Proto:static void __jump_label_set_jump_code(struct jump_entry *entry, enum jump_label_type type, union jump_code_union *code, int init)

Type:void

Parameter:

TypeParameterName
struct jump_entry *entry
enum jump_label_typetype
union jump_code_union *code
intinit
43  const unsigned char default_nop[] = {STATIC_KEY_INIT_NOP}
44  ideal_nop = ideal_nops[Entry for the 5-byte atomic NOP ]
48  jump = 0xe9
49  offset = jump_entry_target(entry) - jump_entry_code(entry) + JUMP_LABEL_NOP_SIZE
52  If init Then
53  expect = default_nop
53  line = __LINE__
54  Else if type == JUMP_LABEL_JMP Then
55  expect = ideal_nop
55  line = __LINE__
56  Else
57  expect = code
57  line = __LINE__
60  If memcmp((void * )jump_entry_code(entry), expect, JUMP_LABEL_NOP_SIZE) Then bug_at((void * )jump_entry_code(entry), line)
63  If type == JUMP_LABEL_NOP Then memcpy(code, ideal_nop, JUMP_LABEL_NOP_SIZE)
Caller
NameDescribe
__jump_label_transform
arch_jump_label_transform_queue