Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef _ASM_GENERIC_KPROBES_H
0003 #define _ASM_GENERIC_KPROBES_H
0004 
0005 #if defined(__KERNEL__) && !defined(__ASSEMBLY__)
0006 #ifdef CONFIG_KPROBES
0007 /*
0008  * Blacklist ganerating macro. Specify functions which is not probed
0009  * by using this macro.
0010  */
0011 # define __NOKPROBE_SYMBOL(fname)               \
0012 static unsigned long __used                 \
0013     __section("_kprobe_blacklist")              \
0014     _kbl_addr_##fname = (unsigned long)fname;
0015 # define NOKPROBE_SYMBOL(fname) __NOKPROBE_SYMBOL(fname)
0016 /* Use this to forbid a kprobes attach on very low level functions */
0017 # define __kprobes  __section(".kprobes.text")
0018 # define nokprobe_inline    __always_inline
0019 #else
0020 # define NOKPROBE_SYMBOL(fname)
0021 # define __kprobes
0022 # define nokprobe_inline    inline
0023 #endif
0024 #endif /* defined(__KERNEL__) && !defined(__ASSEMBLY__) */
0025 
0026 #endif /* _ASM_GENERIC_KPROBES_H */