hc
2024-05-16 8d2a02b24d66aa359e83eebc1ed3c0f85367a1cb
kernel/include/linux/uprobes.h
....@@ -1,21 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 #ifndef _LINUX_UPROBES_H
23 #define _LINUX_UPROBES_H
34 /*
45 * User-space Probes (UProbes)
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License as published by
8
- * the Free Software Foundation; either version 2 of the License, or
9
- * (at your option) any later version.
10
- *
11
- * This program is distributed in the hope that it will be useful,
12
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- * GNU General Public License for more details.
15
- *
16
- * You should have received a copy of the GNU General Public License
17
- * along with this program; if not, write to the Free Software
18
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
196 *
207 * Copyright (C) IBM Corporation, 2008-2012
218 * Authors:
....@@ -115,6 +102,7 @@
115102 struct xol_area *xol_area;
116103 };
117104
105
+extern void __init uprobes_init(void);
118106 extern int set_swbp(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr);
119107 extern int set_orig_insn(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr);
120108 extern bool is_swbp_insn(uprobe_opcode_t *insn);
....@@ -123,6 +111,7 @@
123111 extern unsigned long uprobe_get_trap_addr(struct pt_regs *regs);
124112 extern int uprobe_write_opcode(struct arch_uprobe *auprobe, struct mm_struct *mm, unsigned long vaddr, uprobe_opcode_t);
125113 extern int uprobe_register(struct inode *inode, loff_t offset, struct uprobe_consumer *uc);
114
+extern int uprobe_register_refctr(struct inode *inode, loff_t offset, loff_t ref_ctr_offset, struct uprobe_consumer *uc);
126115 extern int uprobe_apply(struct inode *inode, loff_t offset, struct uprobe_consumer *uc, bool);
127116 extern void uprobe_unregister(struct inode *inode, loff_t offset, struct uprobe_consumer *uc);
128117 extern int uprobe_mmap(struct vm_area_struct *vma);
....@@ -153,6 +142,10 @@
153142 struct uprobes_state {
154143 };
155144
145
+static inline void uprobes_init(void)
146
+{
147
+}
148
+
156149 #define uprobe_get_trap_addr(regs) instruction_pointer(regs)
157150
158151 static inline int
....@@ -160,6 +153,10 @@
160153 {
161154 return -ENOSYS;
162155 }
156
+static inline int uprobe_register_refctr(struct inode *inode, loff_t offset, loff_t ref_ctr_offset, struct uprobe_consumer *uc)
157
+{
158
+ return -ENOSYS;
159
+}
163160 static inline int
164161 uprobe_apply(struct inode *inode, loff_t offset, struct uprobe_consumer *uc, bool add)
165162 {