get_addr_ref_16(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

get_addr_ref_16(9) βœ¨πŸ¦‹

okay bestie, welcome to the get_addr_ref_16(9) page from the Kernel API Manual β€” yes, we're getting into 16-bit address lore today, and it's giving niche but iconic. πŸ’…


🌸 NAME 🌸

get_addr_ref_16 β€” Obtain the 16-bit address referred by instruction


✨ SYNOPSIS ✨

void __user * get_addr_ref_16 (struct insn *insn , struct pt_regs *regs );

πŸŽ€ ARGUMENTS πŸŽ€

  • insn β€” Instruction containing ModRM byte and displacement
  • regs β€” Register values as seen when entering kernel mode

πŸ’– DESCRIPTION πŸ’–

This function is to be used with 16-bit address encodings. 🧚

Obtain the memory address referred by the instruction's ModRM and displacement bytes. Also, the segment used as base is determined by either any segment override prefixes in insn or the default segment of the registers involved in the address computation. In protected mode, segment limits are enforced. 🫢

On success, it's the linear address referenced by the instruction operands. On error, it's -1L. 😭


πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./arch/x86/lib/insn-eval.c is the home base for this whole friend group:


sign-off time, bestie: source/version is ./arch/x86/lib, date is October 2026, and the page is get_addr_ref_16(9). periodt. πŸ’œπŸŽ€

πŸ“¦ where this page comes from