insn_fetch_...ser_inatomic(9)
π insn_fetch_from_user_inatomic β Kernel API Manual energy π
okay so bestie, this page is insn_fetch_...ser_inatomic(9) from the Kernel API Manual, but the actual function we're swooning over is insn_fetch_from_user_inatomic. It's giving "copy instruction bytes from user-space memory while in atomic code" and honestly? iconic.
β¨ NAME β¨
insn_fetch_from_user_inatomic β Copy instruction bytes from user-space memory while in atomic code.
πΈ SYNOPSIS πΈ
int insn_fetch_from_user_inatomic (struct pt_regs *regs , unsigned char
buf[MAX_INSN_SIZE] );
π¦ ARGUMENTS π¦
regsβ structure with register values as seen when entering kernel mode.bufβ array to store the fetched instruction.
π DESCRIPTION π
Gets the linear address of the instruction and copies the instruction bytes to the buf. This function must be used in atomic context. No cap, that's the rule.
Then it's giving:
- number of instruction bytes copied.
0if nothing was copied.-EINVALif the linear address of the instruction could not be calculated.
π SEE ALSO π
Kernel file ./arch/x86/lib/insn-eval.c is the main character here, and it's linked up with:
is_string_insn(9)insn_has_rep_prefix(9)get_seg_reg_override_idx(9)check_seg_overrides(9)resolve_default_seg(9)resolve_seg_reg(9)get_segment_selector(9)get_reg_offset_16(9)get_desc(9)insn_get_seg_base(9)get_seg_limit(9)insn_get_code_seg_params(9)insn_get_modrm_rm_off(9)insn_get_modrm_reg_off(9)insn_get_modrm_reg_ptr(9)get_seg_base_limit(9)get_eff_addr_reg(9)get_eff_addr_modrm(9)get_eff_addr_modrm_16(9)get_eff_addr_sib(9)get_addr_ref_16(9)get_addr_ref_32(9)get_addr_ref_64(9)insn_get_addr_ref(9)insn_fetch_from_user(9)insn_decode_from_regs(9)insn_decode_mmio(9)
Okay that's the whole page, bestie. This one's from ./arch/x86/lib, dated October 2026, and the footer label is insn_fetch_...ser_inatomic(9). Mwah πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms