arch/powerpc/include/asm/kprobes.h
Source file repositories/reference/linux-study-clean/arch/powerpc/include/asm/kprobes.h
File Facts
- System
- Linux kernel
- Corpus path
arch/powerpc/include/asm/kprobes.h- Extension
.h- Size
- 2704 bytes
- Lines
- 96
- Domain
- Architecture Layer
- Bucket
- arch/powerpc
- Inferred role
- Architecture Layer: implementation source
- Status
- source implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
asm-generic/kprobes.hlinux/types.hlinux/ptrace.hlinux/percpu.hlinux/module.hasm/probes.hasm/text-patching.h
Detected Declarations
struct pt_regsstruct kprobestruct arch_specific_insnstruct prev_kprobestruct kprobe_ctlblkstruct arch_optimized_insnfunction kprobe_handlerfunction kprobe_post_handler
Annotated Snippet
struct arch_specific_insn {
/* copy of original instruction */
kprobe_opcode_t *insn;
/*
* Set in kprobes code, initially to 0. If the instruction can be
* eumulated, this is set to 1, if not, to -1.
*/
int boostable;
};
struct prev_kprobe {
struct kprobe *kp;
unsigned long status;
unsigned long saved_msr;
};
/* per-cpu kprobe control block */
struct kprobe_ctlblk {
unsigned long kprobe_status;
unsigned long kprobe_saved_msr;
struct prev_kprobe prev_kprobe;
};
struct arch_optimized_insn {
kprobe_opcode_t copied_insn[1];
/* detour buffer */
kprobe_opcode_t *insn;
};
extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
extern int kprobe_handler(struct pt_regs *regs);
extern int kprobe_post_handler(struct pt_regs *regs);
#else
static inline int kprobe_handler(struct pt_regs *regs) { return 0; }
static inline int kprobe_post_handler(struct pt_regs *regs) { return 0; }
#endif /* CONFIG_KPROBES */
#endif /* __KERNEL__ */
#endif /* _ASM_POWERPC_KPROBES_H */
Annotation
- Immediate include surface: `asm-generic/kprobes.h`, `linux/types.h`, `linux/ptrace.h`, `linux/percpu.h`, `linux/module.h`, `asm/probes.h`, `asm/text-patching.h`.
- Detected declarations: `struct pt_regs`, `struct kprobe`, `struct arch_specific_insn`, `struct prev_kprobe`, `struct kprobe_ctlblk`, `struct arch_optimized_insn`, `function kprobe_handler`, `function kprobe_post_handler`.
- Atlas domain: Architecture Layer / arch/powerpc.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.