get_reg_offset_16(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

get_reg_offset_16(9) from the Kernel API Manual is literally here to help you Obtain offset of register indicated by instruction πŸ’…


πŸ’… SYNOPSIS πŸ’…

int get_reg_offset_16 (struct insn *insn , struct pt_regs *regs , int
       *offs1 , int *offs2 );

πŸŽ€ ARGUMENTS πŸŽ€

  • insn β€” Instruction containing ModRM byte. yes bestie, the instruction itself is the main character here 🫢
  • regs β€” Register values as seen when entering kernel mode ✨
  • offs1 β€” Offset of the first operand register 🌸
  • offs2 β€” Offset of the second operand register, if applicable πŸ’–

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so this one is giving β€œfind the register offsets” energy πŸ”₯ It obtains the offset, in pt_regs, of the registers indicated by the ModRM byte in insn. This function is to be used with 16-bit address encodings ✨

The offs1 and offs2 will be written with the offset of the two registers indicated by the instruction. In cases where any of the registers is not referenced by the instruction, the value will be set to -EDOM β€” no cap, that’s the rule πŸ’…

And the result situation is literally: 0 on success, -EINVAL on error. periodt πŸ’–


πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./arch/x86/lib/insn-eval.c, plus these besties in the same orbit:


cute little sign-off bestie: this one’s sourced from ./arch/x86/lib, dated October 2026, and it’s the get_reg_offset_16(9) page β€” slay πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from