set_orig_insn(9)
πΈ NAME πΈ
hiii bestie π this is set_orig_insn from the Kernel API Manual β section 9, main character energy, no cap. Its whole job is Restore the original instruction. That's it. That's the slay. β¨
π¦ SYNOPSIS π¦
int set_orig_insn (struct arch_uprobe *auprobe , struct vm_area_struct
*vma , unsigned long vaddr );
π ARGUMENTS π
auprobeβ the arch specific probepoint information. yes, architecture-specific, iykyk π§vmaβ the probed virtual memory area. the vma in question, bestie π¦vaddrβ the virtual address to insert the opcode. that's where the opcode goes π
π₯ DESCRIPTION π₯
So for mm mm, restore the original opcode (opcode) at vaddr. (Yes, the page says mm mm β we are keeping every detail, periodt.) Return 0 (success) or a negative errno. That's the vibe check: success is 0, bad news is a negative errno. π
π SEE ALSO π
Kernel file ./kernel/events/uprobes.c and its besties:
is_swbp_insn(9)is_trap_insn(9)set_swbp(9)uprobe_unregister_nosync(9)uprobe_register(9)uprobe_apply(9)uprobe_get_swbp_addr(9)
okay that's the whole lore, bestie π«Ά signed off from ./kernel/events, dated October 2026, and still living in set_orig_insn(9) land. πβ¨
π¦ 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