get_addr_ref_16(9)
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 displacementregsβ 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:
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_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_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)
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
- 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