Documented in 2 files:
Defined in 2 files as a prototype:
- arch/x86/include/asm/insn.h, line 170 (as a prototype)
- tools/arch/x86/include/asm/insn.h, line 170 (as a prototype)
Defined in 2 files as a function:
Referenced in 13 files:
- arch/x86/boot/compressed/sev-handle-vc.c, line 50
- arch/x86/coco/sev/vc-handle.c, line 176
- arch/x86/coco/tdx/tdx.c, line 594
- arch/x86/include/asm/insn.h, line 172
- arch/x86/kernel/uprobes.c, line 1633
- arch/x86/mm/extable.c, line 71
- arch/x86/tools/insn_decoder_test.c, line 152
- arch/x86/tools/insn_sanity.c, line 240
- tools/arch/x86/include/asm/insn.h, line 172
- tools/objtool/arch/x86/decode.c
- tools/perf/arch/x86/tests/insn-x86.c, line 106
- tools/perf/util/intel-pt-decoder/intel-pt-insn-decoder.c
- tools/perf/util/sample.c, line 129
Smatch caller information:
arch/x86/kernel/cpu/mce/severity.c is_copy_from_user() -> insn_decode()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | insn | 3280860769348898816 |
| PARAM_VALUE | 1 | kaddr | 7735347884987183104 |
| PARAM_VALUE | 2 | buf_len | 15 |
| PARAM_VALUE | 3 | m | 2 |
| BUF_SIZE | 1 | kaddr | 15 |
| PREEMPT_ADD | |||
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| HALF_LOCKED2 | flags |
arch/x86/kernel/callthunks.c call_get_dest() -> insn_decode()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | insn | 6696947693100576768 |
| PARAM_VALUE | 1 | kaddr | 0-18446744073709551614 |
| PARAM_VALUE | 2 | buf_len | 15 |
| PARAM_VALUE | 3 | m | 2 |
| CAPPED_DATA | 1 | kaddr | 1 |
| DATA_SOURCE | 1 | kaddr | $0 |
| UNITS | 1 | kaddr | unit_byte |
| LOCK2 | global &text_mutex |
arch/x86/kernel/kprobes/core.c __copy_instruction() -> insn_decode()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | insn | 1875746886108372992,5071505957062545408 |
| PARAM_VALUE | 2 | buf_len | 15 |
| PARAM_VALUE | 3 | m | 2 |
| BUF_SIZE | 1 | kaddr | (-1),15 |
| BUF_SIZE | 1 | kaddr | (-1),15 |
| DATA_SOURCE | 0 | insn | $3 |
| DATA_SOURCE | 1 | kaddr | $0 |
| LOCK2 | _T->lock | ||
| HALF_LOCKED2 | global &fei_lock | ||
| HALF_LOCKED2 | global &jump_label_mutex |
arch/x86/kernel/kprobes/core.c can_probe() -> insn_decode()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | insn | 3100962314558001152 |
| PARAM_VALUE | 1 | kaddr | 1-18446744073709547519 |
| PARAM_VALUE | 2 | buf_len | 15 |
| PARAM_VALUE | 3 | m | 2 |
| BUF_SIZE | 1 | kaddr | (-1),15 |
| BUF_SIZE | 1 | kaddr | (-1),15 |
| DATA_SOURCE | 1 | kaddr | r recover_probed_instruction |
| LOCK2 | _T->lock | ||
| HALF_LOCKED2 | global &fei_lock | ||
| HALF_LOCKED2 | global &jump_label_mutex |
arch/x86/kernel/kprobes/core.c can_probe() -> insn_decode()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | insn | 3100962314558001152 |
| PARAM_VALUE | 1 | kaddr | 1-3556549974045937663,5196641187005349888,6432617772963328000-ptr_max |
| PARAM_VALUE | 2 | buf_len | 15 |
| PARAM_VALUE | 3 | m | 2 |
| BUF_SIZE | 1 | kaddr | (-1),15 |
| BUF_SIZE | 1 | kaddr | (-1),15 |
| DATA_SOURCE | 1 | kaddr | r recover_probed_instruction |
| LOCK2 | _T->lock | ||
| HALF_LOCKED2 | global &fei_lock | ||
| HALF_LOCKED2 | global &jump_label_mutex |
arch/x86/kernel/alternative.c __apply_relocation() -> insn_decode()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | insn | 3904299021120065536 |
| PARAM_VALUE | 1 | kaddr | 4096-ptr_max |
| PARAM_VALUE | 1 | *kaddr | 0-255 |
| PARAM_VALUE | 2 | buf_len | 15 |
| PARAM_VALUE | 3 | m | 2 |
| RX_PATH | |||
| TASK_NOT_RUNNING |
arch/x86/kernel/alternative.c __smp_text_poke_batch_add() -> insn_decode()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | insn | 5553773361958207488 |
| PARAM_VALUE | 2 | buf_len | 15 |
| PARAM_VALUE | 3 | m | 2 |
| BUF_SIZE | 1 | kaddr | (-1)-0,5-6 |
| BUF_SIZE | 1 | kaddr | (-1)-0,5-6 |
| DATA_SOURCE | 1 | kaddr | $3 [m] |
| PREEMPT_ADD | |||
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| HALF_LOCKED2 | global &text_mutex |
arch/x86/kernel/alternative.c apply_retpolines() -> insn_decode()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | insn | 6235535381035495424 |
| PARAM_VALUE | 2 | buf_len | 15 |
| PARAM_VALUE | 3 | m | 2 |
| UNITS | 1 | kaddr | unit_byte |
arch/x86/kernel/alternative.c apply_returns() -> insn_decode()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | insn | 4796588327659122688 |
| PARAM_VALUE | 2 | buf_len | 15 |
| PARAM_VALUE | 3 | m | 2 |
| UNITS | 1 | kaddr | unit_byte |
arch/x86/kernel/alternative.c optimize_nops() -> insn_decode()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | insn | 1223174852264902656 |
| PARAM_VALUE | 1 | kaddr | 4096-ptr_max |
| PARAM_VALUE | 1 | *kaddr | 0-255 |
| PARAM_VALUE | 2 | buf_len | 15 |
| PARAM_VALUE | 3 | m | 2 |
| RX_PATH | |||
| TASK_NOT_RUNNING |
arch/x86/kernel/alternative.c skip_nops() -> insn_decode()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | insn | 8616785879065260032 |
| PARAM_VALUE | 1 | kaddr | 4096-ptr_max |
| PARAM_VALUE | 1 | *kaddr | 0-255 |
| PARAM_VALUE | 2 | buf_len | 15 |
| PARAM_VALUE | 3 | m | 2 |
| RX_PATH | |||
| TASK_NOT_RUNNING |
arch/x86/kernel/traps.c get_kernel_gp_address() -> insn_decode()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | insn | 4671128583144820736 |
| PARAM_VALUE | 1 | kaddr | 3855593192085209088 |
| PARAM_VALUE | 2 | buf_len | 15 |
| PARAM_VALUE | 3 | m | 2 |
| BUF_SIZE | 1 | kaddr | 15 |
| PREEMPT_ADD |
arch/x86/coco/sev/vc-handle.c __vc_decode_kern_insn() -> insn_decode()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | insn | 3929561995604525064,6747283956112052232 |
| PARAM_VALUE | 1 | kaddr | 3848120782719176704 |
| PARAM_VALUE | 2 | buf_len | 15 |
| PARAM_VALUE | 3 | m | 1 |
| BUF_SIZE | 1 | kaddr | 15 |
| MEM_ZERO | 0 | insn | |
| PREEMPT_ADD |
arch/x86/kernel/uprobes.c arch_uprobe_analyze_insn() -> insn_decode()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | insn | 2693768499051995136 |
| PARAM_VALUE | 2 | buf_len | 16 |
| PARAM_VALUE | 3 | m | 0-1 |
| BUF_SIZE | 1 | kaddr | 16 |
| FUZZY_MAX | 3 | m | 1 |
| HARD_MAX | 3 | m | 1 |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| UNITS | 2 | buf_len | unit_byte |
| LOCK2 | &uprobe->consumer_rwsem | ||
| HALF_LOCKED2 | &mm->mmap_lock | ||
| HALF_LOCKED2 | &uprobe->register_rwsem | ||
| TYPE_LOCK | (struct uprobe)->consumer_rwsem |
arch/x86/coco/tdx/tdx.c handle_mmio() -> insn_decode()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | insn | 8874595658658983936 |
| PARAM_VALUE | 0 | insn->addr_bytes | 0 |
| PARAM_VALUE | 0 | insn->attr | 0 |
| PARAM_VALUE | 0 | insn->displacement.got | 0 |
| PARAM_VALUE | 0 | insn->displacement.nbytes | 0 |
| PARAM_VALUE | 0 | insn->displacement.value | 0 |
| PARAM_VALUE | 0 | insn->emulate_prefix_size | 0 |
| PARAM_VALUE | 0 | insn->end_kaddr | 0 |
| PARAM_VALUE | 0 | insn->immediate.got | 0 |
| PARAM_VALUE | 0 | insn->immediate.nbytes | 0 |
| PARAM_VALUE | 0 | insn->immediate.value | 0 |
| PARAM_VALUE | 0 | insn->immediate1.got | 0 |
| PARAM_VALUE | 0 | insn->immediate1.nbytes | 0 |
| PARAM_VALUE | 0 | insn->immediate1.value | 0 |
| PARAM_VALUE | 0 | insn->immediate2.got | 0 |
| PARAM_VALUE | 0 | insn->immediate2.nbytes | 0 |
| PARAM_VALUE | 0 | insn->immediate2.value | 0 |
| PARAM_VALUE | 0 | insn->kaddr | 0 |
| PARAM_VALUE | 0 | insn->length | 0 |
| PARAM_VALUE | 0 | insn->modrm.got | 0 |
| PARAM_VALUE | 0 | insn->modrm.nbytes | 0 |
| PARAM_VALUE | 0 | insn->modrm.value | 0 |
| PARAM_VALUE | 0 | insn->moffset1.got | 0 |
| PARAM_VALUE | 0 | insn->moffset1.nbytes | 0 |
| PARAM_VALUE | 0 | insn->moffset1.value | 0 |
| PARAM_VALUE | 0 | insn->moffset2.got | 0 |
| PARAM_VALUE | 0 | insn->moffset2.nbytes | 0 |
| PARAM_VALUE | 0 | insn->moffset2.value | 0 |
| PARAM_VALUE | 0 | insn->next_byte | 0 |
| PARAM_VALUE | 0 | insn->opcode.got | 0 |
| PARAM_VALUE | 0 | insn->opcode.nbytes | 0 |
| PARAM_VALUE | 0 | insn->opcode.value | 0 |
| PARAM_VALUE | 0 | insn->opnd_bytes | 0 |
| PARAM_VALUE | 0 | insn->prefixes.got | 0 |
| PARAM_VALUE | 0 | insn->prefixes.nbytes | 0 |
| PARAM_VALUE | 0 | insn->prefixes.value | 0 |
| PARAM_VALUE | 0 | insn->rex_prefix.got | 0 |
| PARAM_VALUE | 0 | insn->rex_prefix.nbytes | 0 |
| PARAM_VALUE | 0 | insn->rex_prefix.value | 0 |
| PARAM_VALUE | 0 | insn->sib.got | 0 |
| PARAM_VALUE | 0 | insn->sib.nbytes | 0 |
| PARAM_VALUE | 0 | insn->sib.value | 0 |
| PARAM_VALUE | 0 | insn->vex_prefix.got | 0 |
| PARAM_VALUE | 0 | insn->vex_prefix.nbytes | 0 |
| PARAM_VALUE | 0 | insn->vex_prefix.value | 0 |
| PARAM_VALUE | 0 | insn->x86_64 | 0 |
| PARAM_VALUE | 0 | insn->xop_prefix.got | 0 |
| PARAM_VALUE | 0 | insn->xop_prefix.nbytes | 0 |
| PARAM_VALUE | 0 | insn->xop_prefix.value | 0 |
| PARAM_VALUE | 1 | kaddr | 4831557632270970880 |
| PARAM_VALUE | 2 | buf_len | 15 |
| PARAM_VALUE | 3 | m | 1 |
| BUF_SIZE | 1 | kaddr | 15 |
arch/x86/kernel/kprobes/opt.c can_optimize() -> insn_decode()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | insn | 8407228258105602048 |
| PARAM_VALUE | 1 | kaddr | 1-u64max |
| PARAM_VALUE | 2 | buf_len | 15 |
| PARAM_VALUE | 3 | m | 2 |
| BUF_SIZE | 1 | kaddr | (-1),15 |
| BUF_SIZE | 1 | kaddr | (-1),15 |
| DATA_SOURCE | 1 | kaddr | r recover_probed_instruction |
| LOCK2 | _T->lock | ||
| LOCK2 | global &jump_label_mutex | ||
| HALF_LOCKED2 | global &fei_lock |
arch/x86/kernel/jump_label.c arch_jump_entry_size() -> insn_decode()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | insn | 6454406737449373696 |
| PARAM_VALUE | 0 | insn->addr_bytes | 0 |
| PARAM_VALUE | 0 | insn->attr | 0 |
| PARAM_VALUE | 0 | insn->displacement.got | 0 |
| PARAM_VALUE | 0 | insn->displacement.nbytes | 0 |
| PARAM_VALUE | 0 | insn->displacement.value | 0 |
| PARAM_VALUE | 0 | insn->emulate_prefix_size | 0 |
| PARAM_VALUE | 0 | insn->end_kaddr | 0 |
| PARAM_VALUE | 0 | insn->immediate.got | 0 |
| PARAM_VALUE | 0 | insn->immediate.nbytes | 0 |
| PARAM_VALUE | 0 | insn->immediate.value | 0 |
| PARAM_VALUE | 0 | insn->immediate1.got | 0 |
| PARAM_VALUE | 0 | insn->immediate1.nbytes | 0 |
| PARAM_VALUE | 0 | insn->immediate1.value | 0 |
| PARAM_VALUE | 0 | insn->immediate2.got | 0 |
| PARAM_VALUE | 0 | insn->immediate2.nbytes | 0 |
| PARAM_VALUE | 0 | insn->immediate2.value | 0 |
| PARAM_VALUE | 0 | insn->kaddr | 0 |
| PARAM_VALUE | 0 | insn->length | 0 |
| PARAM_VALUE | 0 | insn->modrm.got | 0 |
| PARAM_VALUE | 0 | insn->modrm.nbytes | 0 |
| PARAM_VALUE | 0 | insn->modrm.value | 0 |
| PARAM_VALUE | 0 | insn->moffset1.got | 0 |
| PARAM_VALUE | 0 | insn->moffset1.nbytes | 0 |
| PARAM_VALUE | 0 | insn->moffset1.value | 0 |
| PARAM_VALUE | 0 | insn->moffset2.got | 0 |
| PARAM_VALUE | 0 | insn->moffset2.nbytes | 0 |
| PARAM_VALUE | 0 | insn->moffset2.value | 0 |
| PARAM_VALUE | 0 | insn->next_byte | 0 |
| PARAM_VALUE | 0 | insn->opcode.got | 0 |
| PARAM_VALUE | 0 | insn->opcode.nbytes | 0 |
| PARAM_VALUE | 0 | insn->opcode.value | 0 |
| PARAM_VALUE | 0 | insn->opnd_bytes | 0 |
| PARAM_VALUE | 0 | insn->prefixes.got | 0 |
| PARAM_VALUE | 0 | insn->prefixes.nbytes | 0 |
| PARAM_VALUE | 0 | insn->prefixes.value | 0 |
| PARAM_VALUE | 0 | insn->rex_prefix.got | 0 |
| PARAM_VALUE | 0 | insn->rex_prefix.nbytes | 0 |
| PARAM_VALUE | 0 | insn->rex_prefix.value | 0 |
| PARAM_VALUE | 0 | insn->sib.got | 0 |
| PARAM_VALUE | 0 | insn->sib.nbytes | 0 |
| PARAM_VALUE | 0 | insn->sib.value | 0 |
| PARAM_VALUE | 0 | insn->vex_prefix.got | 0 |
| PARAM_VALUE | 0 | insn->vex_prefix.nbytes | 0 |
| PARAM_VALUE | 0 | insn->vex_prefix.value | 0 |
| PARAM_VALUE | 0 | insn->x86_64 | 0 |
| PARAM_VALUE | 0 | insn->xop_prefix.got | 0 |
| PARAM_VALUE | 0 | insn->xop_prefix.nbytes | 0 |
| PARAM_VALUE | 0 | insn->xop_prefix.value | 0 |
| PARAM_VALUE | 2 | buf_len | 15 |
| PARAM_VALUE | 3 | m | 2 |
| PREEMPT_ADD | |||
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| NOCHECK_CALL | |||
| HALF_LOCKED2 | global &jump_label_mutex | ||
| HALF_LOCKED2 | global &text_mutex |
arch/x86/mm/extable.c ex_handler_zeropad() -> insn_decode()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | insn | 6127367958537531392 |
| PARAM_VALUE | 2 | buf_len | 0-15 |
| PARAM_VALUE | 3 | m | 2 |
| PREEMPT_ADD | |||
| RX_PATH | |||
| TASK_NOT_RUNNING |