File tree 2 files changed +21
-0
lines changed
2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -237,6 +237,26 @@ static void hook_restore(struct hook_item *item)
237
237
}
238
238
239
239
240
+ int inl_within_trampoline (unsigned long address )
241
+ {
242
+ long bytes ;
243
+ struct hook_item * item ;
244
+ unsigned long start , end ;
245
+
246
+ list_for_each_entry (item , & hook_list , list ) {
247
+ bytes = item -> stolen + HOOK_MAX_CODE_BYTES ;
248
+ start = (unsigned long )item -> trampoline ;
249
+ end = (unsigned long )item -> trampoline + bytes ;
250
+
251
+ if (address >= start && address < end ) {
252
+ return - EBUSY ;
253
+ }
254
+ }
255
+
256
+ return 0 ;
257
+ }
258
+
259
+
240
260
int inl_sethook (void * * orig , void * hook )
241
261
{
242
262
u32 instr_len ;
Original file line number Diff line number Diff line change 3
3
4
4
int inl_sethook (void * * orig , void * hook );
5
5
int inl_unhook (void * hook );
6
+ int inl_within_trampoline (unsigned long address );
6
7
7
8
#endif
8
9
You can’t perform that action at this time.
0 commit comments