ARM kprobes: prevent some functions involved with kprobes from being probed
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / include / asm-arm / traps.h
index d4f34dc83eb0a20c12c29b7da063f7eb127cd763..f1541afcf85c200c457fb48fc93d5c88d250902d 100644 (file)
@@ -15,4 +15,13 @@ struct undef_hook {
 void register_undef_hook(struct undef_hook *hook);
 void unregister_undef_hook(struct undef_hook *hook);
 
+static inline int in_exception_text(unsigned long ptr)
+{
+       extern char __exception_text_start[];
+       extern char __exception_text_end[];
+
+       return ptr >= (unsigned long)&__exception_text_start &&
+              ptr < (unsigned long)&__exception_text_end;
+}
+
 #endif