insn_get_modrm_rm_off(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… insn_get_modrm_rm_off(9) πŸ’…

okay bestie, welcome to the Kernel API Manual page for insn_get_modrm_rm_off β€” yes, the name is a whole mouthful, but we’re gonna slay it together. 🫢


✨ NAME ✨

insn_get_modrm_rm_off β€” obtain register in r/m part of the ModRM byte.

πŸ’– SYNOPSIS πŸ’–

int insn_get_modrm_rm_off (struct insn *insn , struct pt_regs *regs );

πŸŽ€ ARGUMENTS πŸŽ€

  • insn β€” instruction containing the ModRM byte. It’s the main character we’re inspecting. πŸ’…
  • regs β€” register values as seen when entering kernel mode. Basically the receipts from kernel entry. ✨

πŸ¦‹ DESCRIPTION πŸ¦‹

The register indicated by the r/m part of the ModRM byte. The register is obtained as an offset from the base of pt_regs. In specific cases, the returned value can be -EDOM to indicate that the particular value of ModRM does not refer to a register and shall be ignored.

lowkey important: when that -EDOM shows up, it means β€œthis ModRM value does not refer to a register, ignore it, bestie.” 😭

🌈 SEE ALSO 🌈

the whole linked-page squad, no skips: πŸ’–


mwah πŸ’‹ β€” source/version ./arch/x86/lib, dated October 2026, for insn_get_modrm_rm_off(9). bestie, you’re gonna do amazing. 🫢✨

πŸ“¦ where this page comes from