insn_get_modrm_reg_off(9)
insn_get_modrm_reg_off(9) π
okay so bestie, welcome to this Kernel API Manual page β itβs literally all about insn_get_modrm_reg_off, and itβs shorter than ur attention span on a good day. letβs get into it β¨
πΈ NAME πΈ
insn_get_modrm_reg_off β obtain the register in the reg part of the ModRM byte. periodt π
π SYNOPSIS π
int insn_get_modrm_reg_off (struct insn *insn , struct pt_regs *regs );
that signature? iconic. no cap.
π¦ ARGUMENTS π¦
insnβ the instruction containing the ModRM byte. yes bestie, that one.regsβ the register values as seen when entering kernel mode. exactly like the manual says, donβt @ me.
π DESCRIPTION π
so the function gets you the register indicated by the reg part of the ModRM byte. that register is obtained as an offset from the base of pt_regs. thatβs the vibe check: reg part in, offset out, slay π
π SEE ALSO π
kernel file ./arch/x86/lib/insn-eval.c is where the friend group lives β hereβs the whole crew, fr fr:
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_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_fetch_from_user_inatomic(9)insn_decode_from_regs(9)insn_decode_mmio(9)
mwah π β this has been your Kernel API Manual moment, source/version ./arch/x86/lib, dated October 2026. catch u in the kernel, bestie π«Άβ¨
π¦ 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