• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #undef TRACE_SYSTEM
3 #define TRACE_SYSTEM syscall_check
4 
5 #define TRACE_INCLUDE_PATH trace/hooks
6 #if !defined(_TRACE_HOOK_SYSCALL_CHECK_H) || defined(TRACE_HEADER_MULTI_READ)
7 #define _TRACE_HOOK_SYSCALL_CHECK_H
8 #include <trace/hooks/vendor_hooks.h>
9 /*
10  * Following tracepoints are not exported in tracefs and provide a
11  * mechanism for vendor modules to hook and extend functionality
12  */
13 struct file;
14 union bpf_attr;
15 struct timespec64;
16 
17 DECLARE_HOOK(android_vh_check_mmap_file,
18 	TP_PROTO(const struct file *file, unsigned long prot,
19 		unsigned long flag, unsigned long ret),
20 	TP_ARGS(file, prot, flag, ret));
21 
22 DECLARE_HOOK(android_vh_check_file_open,
23 	TP_PROTO(const struct file *file),
24 	TP_ARGS(file));
25 
26 DECLARE_HOOK(android_vh_check_bpf_syscall,
27 	TP_PROTO(int cmd, const union bpf_attr *attr, unsigned int size),
28 	TP_ARGS(cmd, attr, size));
29 
30 DECLARE_HOOK(android_vh_check_nanosleep_syscall,
31     TP_PROTO(struct timespec64 *tu),
32     TP_ARGS(tu));
33 
34 #endif /* _TRACE_HOOK_SYSCALL_CHECK_H */
35 /* This part must be outside protection */
36 #include <trace/define_trace.h>
37