13d0407baSopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
23d0407baSopenharmony_ci#undef TRACE_SYSTEM
33d0407baSopenharmony_ci#define TRACE_SYSTEM syscall_check
43d0407baSopenharmony_ci
53d0407baSopenharmony_ci#define TRACE_INCLUDE_PATH trace/hooks
63d0407baSopenharmony_ci#if !defined(_TRACE_HOOK_SYSCALL_CHECK_H) || defined(TRACE_HEADER_MULTI_READ)
73d0407baSopenharmony_ci#define _TRACE_HOOK_SYSCALL_CHECK_H
83d0407baSopenharmony_ci#include <linux/tracepoint.h>
93d0407baSopenharmony_ci#include <trace/hooks/vendor_hooks.h>
103d0407baSopenharmony_ci/*
113d0407baSopenharmony_ci * Following tracepoints are not exported in tracefs and provide a
123d0407baSopenharmony_ci * mechanism for vendor modules to hook and extend functionality
133d0407baSopenharmony_ci */
143d0407baSopenharmony_cistruct file;
153d0407baSopenharmony_ciunion bpf_attr;
163d0407baSopenharmony_ciDECLARE_HOOK(android_vh_check_mmap_file,
173d0407baSopenharmony_ci	TP_PROTO(const struct file *file, unsigned long prot,
183d0407baSopenharmony_ci		unsigned long flag, unsigned long ret),
193d0407baSopenharmony_ci	TP_ARGS(file, prot, flag, ret));
203d0407baSopenharmony_ci
213d0407baSopenharmony_ciDECLARE_HOOK(android_vh_check_file_open,
223d0407baSopenharmony_ci	TP_PROTO(const struct file *file),
233d0407baSopenharmony_ci	TP_ARGS(file));
243d0407baSopenharmony_ci
253d0407baSopenharmony_ciDECLARE_HOOK(android_vh_check_bpf_syscall,
263d0407baSopenharmony_ci	TP_PROTO(int cmd, const union bpf_attr *attr, unsigned int size),
273d0407baSopenharmony_ci	TP_ARGS(cmd, attr, size));
283d0407baSopenharmony_ci
293d0407baSopenharmony_ci#endif /* _TRACE_HOOK_SYSCALL_CHECK_H */
303d0407baSopenharmony_ci/* This part must be outside protection */
313d0407baSopenharmony_ci#include <trace/define_trace.h>
32