diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/perf_event.h | 5 | ||||
-rw-r--r-- | include/linux/uprobes.h | 15 |
2 files changed, 17 insertions, 3 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index c8ba627c1d60..2e069d1288df 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -584,6 +584,10 @@ struct perf_sample_data { | |||
584 | struct perf_regs_user regs_user; | 584 | struct perf_regs_user regs_user; |
585 | u64 stack_user_size; | 585 | u64 stack_user_size; |
586 | u64 weight; | 586 | u64 weight; |
587 | /* | ||
588 | * Transaction flags for abort events: | ||
589 | */ | ||
590 | u64 txn; | ||
587 | }; | 591 | }; |
588 | 592 | ||
589 | static inline void perf_sample_data_init(struct perf_sample_data *data, | 593 | static inline void perf_sample_data_init(struct perf_sample_data *data, |
@@ -599,6 +603,7 @@ static inline void perf_sample_data_init(struct perf_sample_data *data, | |||
599 | data->stack_user_size = 0; | 603 | data->stack_user_size = 0; |
600 | data->weight = 0; | 604 | data->weight = 0; |
601 | data->data_src.val = 0; | 605 | data->data_src.val = 0; |
606 | data->txn = 0; | ||
602 | } | 607 | } |
603 | 608 | ||
604 | extern void perf_output_sample(struct perf_output_handle *handle, | 609 | extern void perf_output_sample(struct perf_output_handle *handle, |
diff --git a/include/linux/uprobes.h b/include/linux/uprobes.h index 06f28beed7c2..319eae70fe84 100644 --- a/include/linux/uprobes.h +++ b/include/linux/uprobes.h | |||
@@ -30,6 +30,7 @@ | |||
30 | struct vm_area_struct; | 30 | struct vm_area_struct; |
31 | struct mm_struct; | 31 | struct mm_struct; |
32 | struct inode; | 32 | struct inode; |
33 | struct notifier_block; | ||
33 | 34 | ||
34 | #ifdef CONFIG_ARCH_SUPPORTS_UPROBES | 35 | #ifdef CONFIG_ARCH_SUPPORTS_UPROBES |
35 | # include <asm/uprobes.h> | 36 | # include <asm/uprobes.h> |
@@ -108,6 +109,7 @@ extern int __weak set_swbp(struct arch_uprobe *aup, struct mm_struct *mm, unsign | |||
108 | extern int __weak set_orig_insn(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr); | 109 | extern int __weak set_orig_insn(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr); |
109 | extern bool __weak is_swbp_insn(uprobe_opcode_t *insn); | 110 | extern bool __weak is_swbp_insn(uprobe_opcode_t *insn); |
110 | extern bool __weak is_trap_insn(uprobe_opcode_t *insn); | 111 | extern bool __weak is_trap_insn(uprobe_opcode_t *insn); |
112 | extern int uprobe_write_opcode(struct mm_struct *mm, unsigned long vaddr, uprobe_opcode_t); | ||
111 | extern int uprobe_register(struct inode *inode, loff_t offset, struct uprobe_consumer *uc); | 113 | extern int uprobe_register(struct inode *inode, loff_t offset, struct uprobe_consumer *uc); |
112 | extern int uprobe_apply(struct inode *inode, loff_t offset, struct uprobe_consumer *uc, bool); | 114 | extern int uprobe_apply(struct inode *inode, loff_t offset, struct uprobe_consumer *uc, bool); |
113 | extern void uprobe_unregister(struct inode *inode, loff_t offset, struct uprobe_consumer *uc); | 115 | extern void uprobe_unregister(struct inode *inode, loff_t offset, struct uprobe_consumer *uc); |
@@ -117,14 +119,21 @@ extern void uprobe_start_dup_mmap(void); | |||
117 | extern void uprobe_end_dup_mmap(void); | 119 | extern void uprobe_end_dup_mmap(void); |
118 | extern void uprobe_dup_mmap(struct mm_struct *oldmm, struct mm_struct *newmm); | 120 | extern void uprobe_dup_mmap(struct mm_struct *oldmm, struct mm_struct *newmm); |
119 | extern void uprobe_free_utask(struct task_struct *t); | 121 | extern void uprobe_free_utask(struct task_struct *t); |
120 | extern void uprobe_copy_process(struct task_struct *t); | 122 | extern void uprobe_copy_process(struct task_struct *t, unsigned long flags); |
121 | extern unsigned long __weak uprobe_get_swbp_addr(struct pt_regs *regs); | 123 | extern unsigned long __weak uprobe_get_swbp_addr(struct pt_regs *regs); |
122 | extern int uprobe_post_sstep_notifier(struct pt_regs *regs); | 124 | extern int uprobe_post_sstep_notifier(struct pt_regs *regs); |
123 | extern int uprobe_pre_sstep_notifier(struct pt_regs *regs); | 125 | extern int uprobe_pre_sstep_notifier(struct pt_regs *regs); |
124 | extern void uprobe_notify_resume(struct pt_regs *regs); | 126 | extern void uprobe_notify_resume(struct pt_regs *regs); |
125 | extern bool uprobe_deny_signal(void); | 127 | extern bool uprobe_deny_signal(void); |
126 | extern bool __weak arch_uprobe_skip_sstep(struct arch_uprobe *aup, struct pt_regs *regs); | 128 | extern bool arch_uprobe_skip_sstep(struct arch_uprobe *aup, struct pt_regs *regs); |
127 | extern void uprobe_clear_state(struct mm_struct *mm); | 129 | extern void uprobe_clear_state(struct mm_struct *mm); |
130 | extern int arch_uprobe_analyze_insn(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long addr); | ||
131 | extern int arch_uprobe_pre_xol(struct arch_uprobe *aup, struct pt_regs *regs); | ||
132 | extern int arch_uprobe_post_xol(struct arch_uprobe *aup, struct pt_regs *regs); | ||
133 | extern bool arch_uprobe_xol_was_trapped(struct task_struct *tsk); | ||
134 | extern int arch_uprobe_exception_notify(struct notifier_block *self, unsigned long val, void *data); | ||
135 | extern void arch_uprobe_abort_xol(struct arch_uprobe *aup, struct pt_regs *regs); | ||
136 | extern unsigned long arch_uretprobe_hijack_return_addr(unsigned long trampoline_vaddr, struct pt_regs *regs); | ||
128 | #else /* !CONFIG_UPROBES */ | 137 | #else /* !CONFIG_UPROBES */ |
129 | struct uprobes_state { | 138 | struct uprobes_state { |
130 | }; | 139 | }; |
@@ -174,7 +183,7 @@ static inline unsigned long uprobe_get_swbp_addr(struct pt_regs *regs) | |||
174 | static inline void uprobe_free_utask(struct task_struct *t) | 183 | static inline void uprobe_free_utask(struct task_struct *t) |
175 | { | 184 | { |
176 | } | 185 | } |
177 | static inline void uprobe_copy_process(struct task_struct *t) | 186 | static inline void uprobe_copy_process(struct task_struct *t, unsigned long flags) |
178 | { | 187 | { |
179 | } | 188 | } |
180 | static inline void uprobe_clear_state(struct mm_struct *mm) | 189 | static inline void uprobe_clear_state(struct mm_struct *mm) |