insn_get_modrm_reg_off(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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:


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