ANDROID: remove inclusions from hook definition headers

To avoid changing the visibiliy of data types when including
hook definition headers remove header file inclusions from
the hook definition header files.

Instead, the hook definition headers should just have forward
declarations that don't require full definition.

To provide full definitions of the types for the KMI, the
headers that define the types should be included by the
source file that instantiates the hooks - normally
vendor_hooks.c.

Since the KMI is frozen, some of the inclusions are still
required to preserve the CRC associated with symbols. Keep
these inclusions under #ifdef __GENKSYMS__.

This patch results in 17 fewer opaque types in the KMI
(80 vs 97). Of the remaining 80 opaque types, 50 are
defined in C files (and therefore are truly opaque and
cannot be used by vendor modules). That leaves 30
types that still need definition in the KMI.

Bug: 233047575
Signed-off-by: Todd Kjos <tkjos@google.com>
Change-Id: Ibc1173eb4b07fcec21c7abd8e0ab1950b3fb5b34
This commit is contained in:
Todd Kjos
2022-08-31 15:59:29 -07:00
parent d6ab8e3ba2
commit 7108d9d0e5
43 changed files with 5268 additions and 1973 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -5,6 +5,28 @@
*
* Copyright 2020 Google LLC
*/
#ifndef __GENKSYMS__
#include <uapi/linux/hdreg.h>
#include <net/addrconf.h>
#include <linux/fsverity.h>
#include <linux/ipc_namespace.h>
#include <linux/key-type.h>
#include <linux/mtd/mtd.h>
#include <linux/pr.h>
#include <linux/time_namespace.h>
#include <net/macsec.h>
#include <net/netfilter/nf_log.h>
#include <net/raw.h>
#include <net/smc.h>
#include <../drivers/net/wireless/intel/ipw2x00/libipw.h>
#include <../fs/mount.h>
#include <../fs/kernfs/kernfs-internal.h>
#include <../kernel/audit.h>
#include <../net/can/af_can.h>
#include <../net/tipc/bearer.h>
#include <../net/xdp/xsk_queue.h>
#include <../security/keys/internal.h>
#endif
#define CREATE_TRACE_POINTS
#include <trace/hooks/vendor_hooks.h>

View File

@@ -10,7 +10,6 @@
* Following tracepoints are not exported in tracefs and provide a
* mechanism for vendor modules to hook and extend functionality
*/
#ifdef __GENKSYMS__
struct binder_alloc;
struct binder_proc;
struct binder_thread;
@@ -18,18 +17,7 @@ struct binder_transaction;
struct task_struct;
struct seq_file;
struct binder_transaction_data;
#else
/* struct binder_alloc */
#include <../drivers/android/binder_alloc.h>
/* struct binder_proc, struct binder_thread, struct binder_transaction */
#include <../drivers/android/binder_internal.h>
/* struct task_struct */
#include <linux/sched.h>
/* struct seq_file */
#include <linux/seq_file.h>
/* struct binder_transaction_data */
#include <uapi/linux/android/binder.h>
#endif /* __GENKSYMS__ */
DECLARE_HOOK(android_vh_binder_transaction_init,
TP_PROTO(struct binder_transaction *t),
TP_ARGS(t));

View File

@@ -9,18 +9,9 @@
#include <trace/hooks/vendor_hooks.h>
#ifdef __GENKSYMS__
struct blk_mq_tags;
struct blk_mq_alloc_data;
struct blk_mq_tag_set;
#else
/* struct blk_mq_tags */
#include <../block/blk-mq-tag.h>
/* struct blk_mq_alloc_data */
#include <../block/blk-mq.h>
/* struct blk_mq_tag_set */
#include <linux/blk-mq.h>
#endif /* __GENKSYMS__ */
DECLARE_HOOK(android_vh_blk_alloc_rqs,
TP_PROTO(size_t *rq_size, struct blk_mq_tag_set *set,

View File

@@ -7,18 +7,10 @@
#define _TRACE_HOOK_CGROUP_H
#include <trace/hooks/vendor_hooks.h>
#ifdef __GENKSYMS__
struct cgroup_taskset;
struct cgroup_subsys;
struct task_struct;
#else
/* Including ../kernel/cgroup/cgroup-internal.h breaks builds. */
struct cgroup_taskset;
/* struct cgroup_subsys */
#include <linux/cgroup-defs.h>
/* struct task_struct */
#include <linux/sched.h>
#endif /* __GENKSYMS__ */
DECLARE_HOOK(android_vh_cgroup_set_task,
TP_PROTO(int ret, struct task_struct *task),
TP_ARGS(ret, task));

View File

@@ -6,10 +6,15 @@
#if !defined(_TRACE_HOOK_CPUFREQ_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_HOOK_CPUFREQ_H
#include <linux/cpufreq.h>
#include <trace/hooks/vendor_hooks.h>
#ifdef __GENKSYMS__
#include <linux/cpufreq.h>
#endif
struct cpufreq_policy;
struct task_struct;
DECLARE_HOOK(android_vh_show_max_freq,
TP_PROTO(struct cpufreq_policy *policy, unsigned int *max_freq),
TP_ARGS(policy, max_freq));

View File

@@ -9,12 +9,7 @@
#include <trace/hooks/vendor_hooks.h>
#ifdef __GENKSYMS__
struct cpuidle_device;
#else
/* struct cpuidle_device */
#include <linux/cpuidle.h>
#endif /* __GENKSYMS__ */
DECLARE_HOOK(android_vh_cpu_idle_enter,
TP_PROTO(int *state, struct cpuidle_device *dev),

View File

@@ -10,12 +10,8 @@
* mechanism for vendor modules to hook and extend functionality
*/
#ifdef __GENKSYMS__
struct cpuidle_device;
#else
/* struct cpuidle_device */
#include <linux/cpuidle.h>
#endif /* __GENKSYMS__ */
DECLARE_HOOK(android_vh_cpuidle_psci_enter,
TP_PROTO(struct cpuidle_device *dev, bool s2idle),
TP_ARGS(dev, s2idle));

View File

@@ -10,15 +10,9 @@
* Following tracepoints are not exported in tracefs and provide a
* mechanism for vendor modules to hook and extend functionality
*/
#ifdef __GENKSYMS__
struct cred;
struct task_struct;
#else
/* struct cred */
#include <linux/cred.h>
/* struct task_struct */
#include <linux/sched.h>
#endif /* __GENKSYMS__ */
DECLARE_HOOK(android_vh_commit_creds,
TP_PROTO(const struct task_struct *task, const struct cred *new),
TP_ARGS(task, new));

View File

@@ -9,12 +9,7 @@
#include <trace/hooks/vendor_hooks.h>
#ifdef __GENKSYMS__
struct pt_regs;
#else
/* struct pt_regs */
#include <asm/ptrace.h>
#endif /* __GENKSYMS__ */
DECLARE_HOOK(android_vh_ipi_stop,
TP_PROTO(struct pt_regs *regs),

View File

@@ -10,21 +10,11 @@
* Following tracepoints are not exported in tracefs and provide a
* mechanism for vendor modules to hook and extend functionality
*/
#ifdef __GENKSYMS__
struct mutex;
struct rt_mutex;
struct rw_semaphore;
struct task_struct;
#else
/* struct mutex */
#include <linux/mutex.h>
/* struct rt_mutex */
#include <linux/rtmutex.h>
/* struct rw_semaphore */
#include <linux/rwsem.h>
/* struct task_struct */
#include <linux/sched.h>
#endif /* __GENKSYMS__ */
DECLARE_HOOK(android_vh_mutex_wait_start,
TP_PROTO(struct mutex *lock),
TP_ARGS(lock));

View File

@@ -10,12 +10,8 @@
* Following tracepoints are not exported in tracefs and provide a
* mechanism for vendor modules to hook and extend functionality
*/
#ifdef __GENKSYMS__
struct pt_regs;
#else
/* struct pt_regs */
#include <asm/ptrace.h>
#endif /* __GENKSYMS__ */
DECLARE_RESTRICTED_HOOK(android_rvh_die_kernel_fault,
TP_PROTO(struct pt_regs *regs, unsigned int esr, unsigned long addr, const char *msg),
TP_ARGS(regs, esr, addr, msg), 1);

View File

@@ -7,12 +7,7 @@
#define _TRACE_HOOK_FIPS140_H
#include <trace/hooks/vendor_hooks.h>
#ifdef __GENKSYMS__
struct crypto_aes_ctx;
#else
/* struct crypto_aes_ctx */
#include <crypto/aes.h>
#endif /* __GENKSYMS__ */
/*
* These hooks exist only for the benefit of the FIPS140 crypto module, which

View File

@@ -6,11 +6,14 @@
#if !defined(_TRACE_HOOK_FTRACE_DUMP_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_HOOK_FTRACE_DUMP_H
#include <trace/hooks/vendor_hooks.h>
#ifdef __GENKSYMS__
#include <linux/trace_seq.h>
#include <linux/trace_events.h>
#endif
#include <trace/hooks/vendor_hooks.h>
struct trace_seq;
DECLARE_HOOK(android_vh_ftrace_oops_enter,
TP_PROTO(bool *ftrace_check),

View File

@@ -9,15 +9,9 @@
* Following tracepoints are not exported in tracefs and provide a
* mechanism for vendor modules to hook and extend functionality
*/
#ifdef __GENKSYMS__
struct cpumask;
struct irq_data;
#else
/* struct cpumask */
#include <linux/cpumask.h>
/* struct irq_data */
#include <linux/irq.h>
#endif /* __GENKSYMS__ */
DECLARE_HOOK(android_vh_gic_v3_affinity_init,
TP_PROTO(int irq, u32 offset, u64 *affinity),
TP_ARGS(irq, offset, affinity));

View File

@@ -8,7 +8,12 @@
#define _TRACE_HOOK_GPIOLIB_H
#include <trace/hooks/vendor_hooks.h>
#ifdef __GENKSYMS__
#include "../drivers/gpio/gpiolib.h"
#endif
struct gpio_device;
DECLARE_HOOK(android_vh_gpio_block_read,
TP_PROTO(struct gpio_device *gdev, bool *block_gpio_read),

View File

@@ -7,12 +7,7 @@
#define _TRACE_HOOK_GUP_H
#include <trace/hooks/vendor_hooks.h>
#ifdef __GENKSYMS__
struct page;
#else
/* struct page */
#include <linux/mm_types.h>
#endif /* __GENKSYMS__ */
DECLARE_HOOK(android_vh_try_grab_compound_head,
TP_PROTO(struct page *page, int refs, unsigned int flags, bool *ret),

View File

@@ -9,13 +9,8 @@
#include <trace/hooks/vendor_hooks.h>
#ifdef __GENKSYMS__
struct printk_record;
struct printk_ringbuffer;
#else
/* struct printk_record, struct printk_ringbuffer */
#include <../kernel/printk/printk_ringbuffer.h>
#endif /* __GENKSYMS__ */
DECLARE_HOOK(android_vh_logbuf,
TP_PROTO(struct printk_ringbuffer *rb, struct printk_record *r),

View File

@@ -8,30 +8,20 @@
#define _TRACE_HOOK_MM_H
#include <linux/types.h>
#include <linux/mm.h>
#include <linux/oom.h>
#include <trace/hooks/vendor_hooks.h>
#ifdef __GENKSYMS__
#include <linux/mm.h>
#include <linux/oom.h>
#endif
struct oom_control;
struct cma;
struct acr_info;
struct compact_control;
struct slabinfo;
struct cgroup_subsys_state;
struct mem_cgroup;
#else
/* struct compact_control */
#include <../mm/internal.h>
/* struct slabinfo */
#include <../mm/slab.h>
/* struct cgroup_subsys_state */
#include <linux/cgroup-defs.h>
/* struct acr_info */
#include <linux/gfp.h>
/* struct mem_cgroup */
#include <linux/memcontrol.h>
#endif /* __GENKSYMS__ */
struct cma;
struct acr_info;

View File

@@ -9,18 +9,9 @@
#include <trace/hooks/vendor_hooks.h>
#ifdef __GENKSYMS__
struct sdhci_host;
struct mmc_card;
struct mmc_host;
#else
/* struct sdhci_host */
#include <../drivers/mmc/host/sdhci.h>
/* struct mmc_card */
#include <linux/mmc/card.h>
/* struct mmc_host */
#include <linux/mmc/host.h>
#endif /* __GENKSYMS__ */
DECLARE_HOOK(android_vh_mmc_blk_reset,
TP_PROTO(struct mmc_host *host, int err, bool *allow),

View File

@@ -10,12 +10,8 @@
* Following tracepoints are not exported in tracefs and provide a
* mechanism for vendor modules to hook and extend functionality
*/
#ifdef __GENKSYMS__
struct task_struct;
#else
/* struct task_struct */
#include <linux/sched.h>
#endif /* __GENKSYMS__ */
DECLARE_HOOK(android_vh_mpam_set,
TP_PROTO(struct task_struct *prev, struct task_struct *next),
TP_ARGS(prev, next));

View File

@@ -8,24 +8,12 @@
#define _TRACE_HOOK_NET_VH_H
#include <trace/hooks/vendor_hooks.h>
#ifdef __GENKSYMS__
struct packet_type;
struct sk_buff;
struct list_head;
struct nf_conn;
struct sock;
#else
/* struct packet_type */
#include <linux/netdevice.h>
/* struct sk_buff */
#include <linux/skbuff.h>
/* struct list_head */
#include <linux/types.h>
/* struct nf_conn */
#include <net/netfilter/nf_conntrack.h>
/* struct sock */
#include <net/sock.h>
#endif /* __GENKSYMS__ */
DECLARE_HOOK(android_vh_ptype_head,
TP_PROTO(const struct packet_type *pt, struct list_head *vendor_pt),
TP_ARGS(pt, vendor_pt));

View File

@@ -6,6 +6,9 @@
#if !defined(_TRACE_HOOK_PCI_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_HOOK_PCI_H
#include <trace/hooks/vendor_hooks.h>
struct pci_dev;
/*
* Following tracepoints are not exported in tracefs and provide a
* mechanism for vendor modules to hook and extend functionality

View File

@@ -10,12 +10,8 @@
#include <trace/hooks/vendor_hooks.h>
#ifdef __GENKSYMS__
struct generic_pm_domain;
#else
/* struct generic_pm_domain */
#include <linux/pm_domain.h>
#endif /* __GENKSYMS__ */
DECLARE_HOOK(android_vh_allow_domain_state,
TP_PROTO(struct generic_pm_domain *genpd, uint32_t idx, bool *allow),
TP_ARGS(genpd, idx, allow))

View File

@@ -10,17 +10,14 @@
* Following tracepoints are not exported in tracefs and provide a
* mechanism for vendor modules to hook and extend functionality
*/
#ifdef __GENKSYMS__
enum freq_qos_req_type;
/* needed for enum freq_qos_req_types */
#include <linux/pm_qos.h>
struct freq_constraints;
struct freq_qos_request;
struct task_struct;
#else
/* enum freq_qos_req_type, struct freq_constraints, struct freq_qos_request */
#include <linux/pm_qos.h>
/* struct task_struct */
#include <linux/sched.h>
#endif /* __GENKSYMS__ */
DECLARE_HOOK(android_vh_try_to_freeze_todo,
TP_PROTO(unsigned int todo, unsigned int elapsed_msecs, bool wq_busy),
TP_ARGS(todo, elapsed_msecs, wq_busy));

View File

@@ -9,13 +9,9 @@
#include <trace/hooks/vendor_hooks.h>
#ifdef __GENKSYMS__
struct psi_group;
struct psi_trigger;
#else
/* struct psi_group, struct psi_trigger */
#include <linux/psi_types.h>
#endif /* __GENKSYMS__ */
DECLARE_HOOK(android_vh_psi_event,
TP_PROTO(struct psi_trigger *t),
TP_ARGS(t));

View File

@@ -9,12 +9,7 @@
#include <trace/hooks/vendor_hooks.h>
#ifdef __GENKSYMS__
struct rproc;
#else
/* struct rproc */
#include <linux/remoteproc.h>
#endif /* __GENKSYMS__ */
DECLARE_HOOK(android_vh_rproc_recovery,
TP_PROTO(struct rproc *rproc),

View File

@@ -9,13 +9,9 @@
* Following tracepoints are not exported in tracefs and provide a
* mechanism for vendor modules to hook and extend functionality
*/
#ifdef __GENKSYMS__
struct rw_semaphore;
struct rwsem_waiter;
#else
/* struct rw_semaphore, struct rwsem_waiter */
#include <linux/rwsem.h>
#endif /* __GENKSYMS__ */
DECLARE_HOOK(android_vh_rwsem_init,
TP_PROTO(struct rw_semaphore *sem),
TP_ARGS(sem));

View File

@@ -9,7 +9,6 @@
* Following tracepoints are not exported in tracefs and provide a
* mechanism for vendor modules to hook and extend functionality
*/
#ifdef __GENKSYMS__
struct cgroup_taskset;
struct cgroup_subsys_state;
struct cpufreq_policy;
@@ -18,20 +17,7 @@ enum uclamp_id;
struct sched_entity;
struct task_struct;
struct uclamp_se;
#else
/* Including ../kernel/cgroup/cgroup-internal.h breaks builds. */
struct cgroup_taskset;
/* struct cgroup_subsys_state */
#include <linux/cgroup-defs.h>
/* struct cpufreq_policy */
#include <linux/cpufreq.h>
/* struct em_perf_domain */
#include <linux/energy_model.h>
/* enum uclamp_id, struct sched_entity, struct task_struct, struct uclamp_se */
#include <linux/sched.h>
/* Only defined with CONFIG_UCLAMP_TASK, so declare unconditionally. */
struct uclamp_se;
#endif /* __GENKSYMS__ */
DECLARE_RESTRICTED_HOOK(android_rvh_select_task_rq_fair,
TP_PROTO(struct task_struct *p, int prev_cpu, int sd_flag, int wake_flags, int *new_cpu),
TP_ARGS(p, prev_cpu, sd_flag, wake_flags, new_cpu), 1);

View File

@@ -7,12 +7,8 @@
#define _TRACE_HOOK_SHMEM_FS_H
#include <trace/hooks/vendor_hooks.h>
#ifdef __GENKSYMS__
struct page;
#else
/* struct page */
#include <linux/mm_types.h>
#endif /* __GENKSYMS__ */
DECLARE_HOOK(android_vh_shmem_alloc_page,
TP_PROTO(struct page **page),
TP_ARGS(page));

View File

@@ -7,12 +7,8 @@
#define _TRACE_HOOK_SIGNAL_H
#include <trace/hooks/vendor_hooks.h>
#ifdef __GENKSYMS__
struct task_struct;
#else
/* struct task_struct */
#include <linux/sched.h>
#endif /* __GENKSYMS__ */
DECLARE_HOOK(android_vh_do_send_sig_info,
TP_PROTO(int sig, struct task_struct *killer, struct task_struct *dst),
TP_ARGS(sig, killer, dst));

View File

@@ -10,12 +10,8 @@
* Following tracepoints are not exported in tracefs and provide a
* mechanism for vendor modules to hook and extend functionality
*/
#ifdef __GENKSYMS__
struct pt_regs;
#else
/* struct pt_regs */
#include <asm/ptrace.h>
#endif /* __GENKSYMS__ */
DECLARE_HOOK(android_vh_watchdog_timer_softlockup,
TP_PROTO(int duration, struct pt_regs *regs, bool is_panic),
TP_ARGS(duration, regs, is_panic));

View File

@@ -7,12 +7,8 @@
#define _TRACE_HOOK_SYS_H
#include <trace/hooks/vendor_hooks.h>
#ifdef __GENKSYMS__
struct task_struct;
#else
/* struct task_struct */
#include <linux/sched.h>
#endif /* __GENKSYMS__ */
DECLARE_HOOK(android_vh_syscall_prctl_finished,
TP_PROTO(int option, struct task_struct *task),
TP_ARGS(option, task));

View File

@@ -10,15 +10,9 @@
* Following tracepoints are not exported in tracefs and provide a
* mechanism for vendor modules to hook and extend functionality
*/
#ifdef __GENKSYMS__
struct file;
union bpf_attr;
#else
/* struct file */
#include <linux/fs.h>
/* union bpf_attr */
#include <uapi/linux/bpf.h>
#endif /* __GENKSYMS__ */
DECLARE_HOOK(android_vh_check_mmap_file,
TP_PROTO(const struct file *file, unsigned long prot,
unsigned long flag, unsigned long ret),

View File

@@ -10,12 +10,8 @@
#include <trace/hooks/vendor_hooks.h>
#include <linux/cpufreq.h>
#ifdef __GENKSYMS__
struct thermal_zone_device;
#else
/* struct thermal_zone_device */
#include <linux/thermal.h>
#endif /* __GENKSYMS__ */
DECLARE_HOOK(android_vh_enable_thermal_genl_check,
TP_PROTO(int event, int tz_id, int *enable_thermal_genl),
TP_ARGS(event, tz_id, enable_thermal_genl));

View File

@@ -8,7 +8,12 @@
#define _TRACE_HOOK_TOPOLOGY_H
#include <trace/hooks/vendor_hooks.h>
#ifdef __GENKSYMS__
#include <linux/cpumask.h>
#endif
struct cpumask;
DECLARE_HOOK(android_vh_arch_set_freq_scale,
TP_PROTO(const struct cpumask *cpus, unsigned long freq,

View File

@@ -10,12 +10,8 @@
* Following tracepoints are not exported in tracefs and provide a
* mechanism for vendor modules to hook and extend functionality
*/
#ifdef __GENKSYMS__
struct pt_regs;
#else
/* struct pt_regs */
#include <asm/ptrace.h>
#endif /* __GENKSYMS__ */
DECLARE_RESTRICTED_HOOK(android_rvh_do_undefinstr,
TP_PROTO(struct pt_regs *regs, bool user),
TP_ARGS(regs, user),

View File

@@ -9,20 +9,11 @@
* Following tracepoints are not exported in tracefs and provide a
* mechanism for vendor modules to hook and extend functionality
*/
#ifdef __GENKSYMS__
struct ufs_hba;
struct ufshcd_lrb;
struct uic_command;
struct request;
struct scsi_device;
#else
/* struct ufs_hba, struct ufshcd_lrb, struct uic_command */
#include <../drivers/scsi/ufs/ufshcd.h>
/* struct request */
#include <linux/blkdev.h>
/* struct scsi_device */
#include <scsi/scsi_device.h>
#endif /* __GENKSYMS__ */
DECLARE_HOOK(android_vh_ufs_fill_prdt,
TP_PROTO(struct ufs_hba *hba, struct ufshcd_lrb *lrbp,

View File

@@ -5,8 +5,14 @@
#define TRACE_INCLUDE_PATH trace/hooks
#if !defined(_TRACE_HOOK_USB_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_HOOK_USB_H
#include <linux/usb.h>
#include <trace/hooks/vendor_hooks.h>
#ifdef __GENKSYMS__
#include <linux/usb.h>
#endif
struct usb_device;
/*
* Following tracepoints are not exported in tracefs and provide a
* mechanism for vendor modules to hook and extend functionality

View File

@@ -7,12 +7,8 @@
#define _TRACE_HOOK_USER_H
#include <trace/hooks/vendor_hooks.h>
#ifdef __GENKSYMS__
struct user_struct;
#else
/* struct user_struct */
#include <linux/sched/user.h>
#endif /* __GENKSYMS__ */
DECLARE_HOOK(android_vh_alloc_uid,
TP_PROTO(struct user_struct *user),
TP_ARGS(user));

View File

@@ -9,7 +9,6 @@
#include <trace/hooks/vendor_hooks.h>
#ifdef __GENKSYMS__
struct v4l2_subdev;
struct v4l2_subdev_pad_config;
struct v4l2_subdev_format;
@@ -17,14 +16,7 @@ struct v4l2_subdev_frame_interval;
struct v4l2_subdev_selection;
struct v4l2_fmtdesc;
struct v4l2_format;
#else
/* struct v4l2_subdev, struct v4l2_subdev_pad_config */
#include <media/v4l2-subdev.h>
/* struct v4l2_subdev_format, struct v4l2_subdev_frame_interval, struct v4l2_subdev_selection */
#include <uapi/linux/v4l2-subdev.h>
/* struct v4l2_fmtdesc, struct v4l2_format */
#include <uapi/linux/videodev2.h>
#endif /* __GENKSYMS__ */
DECLARE_HOOK(android_vh_clear_reserved_fmt_fields,
TP_PROTO(struct v4l2_format *fmt, int *ret),
TP_ARGS(fmt, ret));

View File

@@ -9,15 +9,9 @@
#include <trace/hooks/vendor_hooks.h>
#ifdef __GENKSYMS__
struct media_link;
struct media_link_desc;
#else
/* struct media_link */
#include <media/media-entity.h>
/* struct media_link_desc */
#include <uapi/linux/media.h>
#endif /* __GENKSYMS__ */
DECLARE_HOOK(android_vh_media_device_setup_link,
TP_PROTO(struct media_link *link, struct media_link_desc *linkd, int *ret),
TP_ARGS(link, linkd, ret));

View File

@@ -10,12 +10,8 @@
* Following tracepoints are not exported in tracefs and provide a
* mechanism for vendor modules to hook and extend functionality
*/
#ifdef __GENKSYMS__
struct worker;
#else
/* struct worker */
#include <../kernel/workqueue_internal.h>
#endif /* __GENKSYMS__ */
DECLARE_HOOK(android_vh_create_worker,
TP_PROTO(struct worker *worker, struct workqueue_attrs *attrs),
TP_ARGS(worker, attrs));