|
8 | 8 | * Gerald Schaefer ([email protected])
|
9 | 9 | */
|
10 | 10 |
|
| 11 | +#include <linux/kprobes.h> |
11 | 12 | #include <linux/uaccess.h>
|
12 | 13 | #include <linux/export.h>
|
13 | 14 | #include <linux/mm.h>
|
@@ -149,8 +150,8 @@ EXPORT_SYMBOL(_copy_to_user_key);
|
149 | 150 |
|
150 | 151 | #define CMPXCHG_USER_KEY_MAX_LOOPS 128
|
151 | 152 |
|
152 |
| -int __cmpxchg_user_key1(unsigned long address, unsigned char *uval, |
153 |
| - unsigned char old, unsigned char new, unsigned long key) |
| 153 | +int __kprobes __cmpxchg_user_key1(unsigned long address, unsigned char *uval, |
| 154 | + unsigned char old, unsigned char new, unsigned long key) |
154 | 155 | {
|
155 | 156 | unsigned int prev, shift, mask, _old, _new;
|
156 | 157 | unsigned long count;
|
@@ -208,8 +209,8 @@ int __cmpxchg_user_key1(unsigned long address, unsigned char *uval,
|
208 | 209 | }
|
209 | 210 | EXPORT_SYMBOL(__cmpxchg_user_key1);
|
210 | 211 |
|
211 |
| -int __cmpxchg_user_key2(unsigned long address, unsigned short *uval, |
212 |
| - unsigned short old, unsigned short new, unsigned long key) |
| 212 | +int __kprobes __cmpxchg_user_key2(unsigned long address, unsigned short *uval, |
| 213 | + unsigned short old, unsigned short new, unsigned long key) |
213 | 214 | {
|
214 | 215 | unsigned int prev, shift, mask, _old, _new;
|
215 | 216 | unsigned long count;
|
@@ -267,8 +268,8 @@ int __cmpxchg_user_key2(unsigned long address, unsigned short *uval,
|
267 | 268 | }
|
268 | 269 | EXPORT_SYMBOL(__cmpxchg_user_key2);
|
269 | 270 |
|
270 |
| -int __cmpxchg_user_key4(unsigned long address, unsigned int *uval, |
271 |
| - unsigned int old, unsigned int new, unsigned long key) |
| 271 | +int __kprobes __cmpxchg_user_key4(unsigned long address, unsigned int *uval, |
| 272 | + unsigned int old, unsigned int new, unsigned long key) |
272 | 273 | {
|
273 | 274 | unsigned int prev = old;
|
274 | 275 | bool sacf_flag;
|
@@ -299,8 +300,8 @@ int __cmpxchg_user_key4(unsigned long address, unsigned int *uval,
|
299 | 300 | }
|
300 | 301 | EXPORT_SYMBOL(__cmpxchg_user_key4);
|
301 | 302 |
|
302 |
| -int __cmpxchg_user_key8(unsigned long address, unsigned long *uval, |
303 |
| - unsigned long old, unsigned long new, unsigned long key) |
| 303 | +int __kprobes __cmpxchg_user_key8(unsigned long address, unsigned long *uval, |
| 304 | + unsigned long old, unsigned long new, unsigned long key) |
304 | 305 | {
|
305 | 306 | unsigned long prev = old;
|
306 | 307 | bool sacf_flag;
|
@@ -331,8 +332,8 @@ int __cmpxchg_user_key8(unsigned long address, unsigned long *uval,
|
331 | 332 | }
|
332 | 333 | EXPORT_SYMBOL(__cmpxchg_user_key8);
|
333 | 334 |
|
334 |
| -int __cmpxchg_user_key16(unsigned long address, __uint128_t *uval, |
335 |
| - __uint128_t old, __uint128_t new, unsigned long key) |
| 335 | +int __kprobes __cmpxchg_user_key16(unsigned long address, __uint128_t *uval, |
| 336 | + __uint128_t old, __uint128_t new, unsigned long key) |
336 | 337 | {
|
337 | 338 | __uint128_t prev = old;
|
338 | 339 | bool sacf_flag;
|
|
0 commit comments