syscall_check.h 977 B

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