regs_get_register(9)
π regs_get_register(9) β Kernel API Manual, bestie edition β¨
Okay so real talk, this is regs_get_register(9) from the Kernel API Manual, and it's literally the girlie that fetches a register value for you based on its offset. No cap, she's useful π«Ά
πΈ NAME πΈ
regs_get_register β get register value from its offset π
β¨ SYNOPSIS β¨
unsigned long regs_get_register (struct pt_regs *regs , unsigned int
offset );
π ARGUMENTS π
regsβ thept_regsfrom which the register value is gotten. Like, that's the source, bestie πoffsetβ the offset number of the register. It's giving "where exactly is this register at" energy π₯
π¦ DESCRIPTION π¦
So regs_get_register returns the value of a register. Periodt β¨
The offset is the offset of the register in struct pt_regs address, which is specified by regs. Iykyk π
If offset is bigger than MAX_REG_OFFSET, this returns 0. That's the rule, fr fr π«Ά
π SEE ALSO π
Kernel file ./arch/x86/include/asm/ptrace.h, plus these iconic functions:
regs_within_kernel_stack(9)regs_get_kernel_stack_nth_addr(9)regs_get_kernel_stack_nth(9)regs_get_kernel_argument(9)
Go off, bestie. Check those registers, stay in your MAX_REG_OFFSET lane, and slay π
π
Cute little sign-off: this one's sourced from ./arch/x86/include/asm, dated October 2026, and it's still giving regs_get_register(9) main character energy πβπ¦
π¦ 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