ANDROID: GKI: use internal type definitions in vendor hooks

This change is intended to reduce the chance of a missed ABI break
involving vendor hooks.

The following types are now fully defined in ABI XML.

* `struct binder_transaction`
* `struct binder_thread`
* `struct binder_proc`
* `struct printk_ringbuffer`
* `struct printk_record`

symbol '__alloc_pages' changed
  CRC changed from 0x6497cbd to 0x230fd8e5

symbol '__find_vma' changed
  CRC changed from 0xf11b619f to 0xb0069a61

symbol '__free_pages' changed
  CRC changed from 0xba5eeb68 to 0xdc394265

... 195 omitted; 198 symbols have only CRC changes

Bug: 233047575
Change-Id: I807227f6161f0a44ec3657dc8cdb8a3fdffc40b3
Signed-off-by: Giuliano Procida <gprocida@google.com>
This commit is contained in:
Giuliano Procida
2022-06-13 13:05:56 +01:00
committed by Carlos Llamas
parent 45d3ead9a8
commit 76ed7e5d56
13 changed files with 28 additions and 19 deletions

View File

@@ -9,9 +9,10 @@
#include <trace/hooks/vendor_hooks.h> #include <trace/hooks/vendor_hooks.h>
/* struct snd_usb_audio */
#include <../sound/usb/usbaudio.h>
/* struct usb_interface */ /* struct usb_interface */
#include <linux/usb.h> #include <linux/usb.h>
struct snd_usb_audio;
DECLARE_HOOK(android_vh_audio_usb_offload_vendor_set, DECLARE_HOOK(android_vh_audio_usb_offload_vendor_set,
TP_PROTO(void *arg), TP_PROTO(void *arg),

View File

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

View File

@@ -10,10 +10,12 @@
#include <linux/tracepoint.h> #include <linux/tracepoint.h>
#include <trace/hooks/vendor_hooks.h> #include <trace/hooks/vendor_hooks.h>
/* 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 */ /* struct blk_mq_tag_set */
#include <linux/blk-mq.h> #include <linux/blk-mq.h>
struct blk_mq_tags;
struct blk_mq_alloc_data;
DECLARE_HOOK(android_vh_blk_alloc_rqs, DECLARE_HOOK(android_vh_blk_alloc_rqs,
TP_PROTO(size_t *rq_size, struct blk_mq_tag_set *set, TP_PROTO(size_t *rq_size, struct blk_mq_tag_set *set,

View File

@@ -7,6 +7,8 @@
#define _TRACE_HOOK_CGROUP_H #define _TRACE_HOOK_CGROUP_H
#include <trace/hooks/vendor_hooks.h> #include <trace/hooks/vendor_hooks.h>
/* struct cgroup_taskset */
#include <../kernel/cgroup/cgroup-internal.h>
/* struct cgroup_subsys */ /* struct cgroup_subsys */
#include <linux/cgroup-defs.h> #include <linux/cgroup-defs.h>
/* struct task_struct */ /* struct task_struct */
@@ -15,8 +17,6 @@ DECLARE_HOOK(android_vh_cgroup_set_task,
TP_PROTO(int ret, struct task_struct *task), TP_PROTO(int ret, struct task_struct *task),
TP_ARGS(ret, task)); TP_ARGS(ret, task));
struct cgroup_taskset;
struct cgroup;
DECLARE_HOOK(android_vh_cgroup_attach, DECLARE_HOOK(android_vh_cgroup_attach,
TP_PROTO(struct cgroup_subsys *ss, struct cgroup_taskset *tset), TP_PROTO(struct cgroup_subsys *ss, struct cgroup_taskset *tset),
TP_ARGS(ss, tset)) TP_ARGS(ss, tset))

View File

@@ -10,7 +10,8 @@
#include <trace/hooks/vendor_hooks.h> #include <trace/hooks/vendor_hooks.h>
#if defined(CONFIG_TRACEPOINTS) && defined(CONFIG_ANDROID_VENDOR_HOOKS) #if defined(CONFIG_TRACEPOINTS) && defined(CONFIG_ANDROID_VENDOR_HOOKS)
struct pt_regs; /* struct pt_regs */
#include <asm/ptrace.h>
DECLARE_HOOK(android_vh_ipi_stop, DECLARE_HOOK(android_vh_ipi_stop,
TP_PROTO(struct pt_regs *regs), TP_PROTO(struct pt_regs *regs),

View File

@@ -7,7 +7,8 @@
#define _TRACE_HOOK_FAULT_H #define _TRACE_HOOK_FAULT_H
#include <trace/hooks/vendor_hooks.h> #include <trace/hooks/vendor_hooks.h>
struct pt_regs; /* struct pt_regs */
#include <asm/ptrace.h>
DECLARE_RESTRICTED_HOOK(android_rvh_die_kernel_fault, DECLARE_RESTRICTED_HOOK(android_rvh_die_kernel_fault,
TP_PROTO(const char *msg, unsigned long addr, unsigned int esr, struct pt_regs *regs), TP_PROTO(const char *msg, unsigned long addr, unsigned int esr, struct pt_regs *regs),
TP_ARGS(msg, addr, esr, regs), 1); TP_ARGS(msg, addr, esr, regs), 1);

View File

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

View File

@@ -13,6 +13,8 @@
#include <linux/oom.h> #include <linux/oom.h>
#include <trace/hooks/vendor_hooks.h> #include <trace/hooks/vendor_hooks.h>
/* struct slabinfo */
#include <../mm/slab.h>
DECLARE_RESTRICTED_HOOK(android_rvh_set_skip_swapcache_flags, DECLARE_RESTRICTED_HOOK(android_rvh_set_skip_swapcache_flags,
TP_PROTO(gfp_t *flags), TP_PROTO(gfp_t *flags),
TP_ARGS(flags), 1); TP_ARGS(flags), 1);
@@ -37,7 +39,6 @@ DECLARE_HOOK(android_vh_alloc_pages_slowpath,
DECLARE_HOOK(android_vh_print_slabinfo_header, DECLARE_HOOK(android_vh_print_slabinfo_header,
TP_PROTO(struct seq_file *m), TP_PROTO(struct seq_file *m),
TP_ARGS(m)); TP_ARGS(m));
struct slabinfo;
DECLARE_HOOK(android_vh_cache_show, DECLARE_HOOK(android_vh_cache_show,
TP_PROTO(struct seq_file *m, struct slabinfo *sinfo, struct kmem_cache *s), TP_PROTO(struct seq_file *m, struct slabinfo *sinfo, struct kmem_cache *s),
TP_ARGS(m, sinfo, s)); TP_ARGS(m, sinfo, s));

View File

@@ -8,9 +8,10 @@
#define _TRACE_HOOK_REGMAP_H #define _TRACE_HOOK_REGMAP_H
#include <trace/hooks/vendor_hooks.h> #include <trace/hooks/vendor_hooks.h>
/* struct regmap */
#include <../drivers/base/regmap/internal.h>
/* struct regmap_config */ /* struct regmap_config */
#include <linux/regmap.h> #include <linux/regmap.h>
struct regmap;
/* /*
* Following tracepoints are not exported in tracefs and provide a * Following tracepoints are not exported in tracefs and provide a

View File

@@ -9,6 +9,8 @@
* Following tracepoints are not exported in tracefs and provide a * Following tracepoints are not exported in tracefs and provide a
* mechanism for vendor modules to hook and extend functionality * mechanism for vendor modules to hook and extend functionality
*/ */
/* struct cgroup_taskset */
#include <../kernel/cgroup/cgroup-internal.h>
/* struct cgroup_subsys_state */ /* struct cgroup_subsys_state */
#include <linux/cgroup-defs.h> #include <linux/cgroup-defs.h>
/* struct em_perf_domain */ /* struct em_perf_domain */
@@ -233,7 +235,6 @@ DECLARE_RESTRICTED_HOOK(android_rvh_update_misfit_status,
TP_PROTO(struct task_struct *p, struct rq *rq, bool *need_update), TP_PROTO(struct task_struct *p, struct rq *rq, bool *need_update),
TP_ARGS(p, rq, need_update), 1); TP_ARGS(p, rq, need_update), 1);
struct cgroup_taskset;
DECLARE_RESTRICTED_HOOK(android_rvh_cpu_cgroup_attach, DECLARE_RESTRICTED_HOOK(android_rvh_cpu_cgroup_attach,
TP_PROTO(struct cgroup_taskset *tset), TP_PROTO(struct cgroup_taskset *tset),
TP_ARGS(tset), 1); TP_ARGS(tset), 1);

View File

@@ -7,7 +7,8 @@
#define _TRACE_HOOK_SOFTLOCKUP_H #define _TRACE_HOOK_SOFTLOCKUP_H
#include <trace/hooks/vendor_hooks.h> #include <trace/hooks/vendor_hooks.h>
struct pt_regs; /* struct pt_regs */
#include <asm/ptrace.h>
DECLARE_HOOK(android_vh_watchdog_timer_softlockup, DECLARE_HOOK(android_vh_watchdog_timer_softlockup,
TP_PROTO(int duration, struct pt_regs *regs, bool is_panic), TP_PROTO(int duration, struct pt_regs *regs, bool is_panic),
TP_ARGS(duration, regs, is_panic)); TP_ARGS(duration, regs, is_panic));

View File

@@ -7,7 +7,8 @@
#define _TRACE_HOOK_TRAPS_H #define _TRACE_HOOK_TRAPS_H
#include <trace/hooks/vendor_hooks.h> #include <trace/hooks/vendor_hooks.h>
struct pt_regs; /* struct pt_regs */
#include <asm/ptrace.h>
DECLARE_RESTRICTED_HOOK(android_rvh_do_undefinstr, DECLARE_RESTRICTED_HOOK(android_rvh_do_undefinstr,
TP_PROTO(struct pt_regs *regs), TP_PROTO(struct pt_regs *regs),
TP_ARGS(regs), TP_ARGS(regs),

View File

@@ -9,12 +9,12 @@
* Following tracepoints are not exported in tracefs and provide a * Following tracepoints are not exported in tracefs and provide a
* mechanism for vendor modules to hook and extend functionality * mechanism for vendor modules to hook and extend functionality
*/ */
/* struct ufs_hba, struct ufshcd_lrb, struct uic_command */
#include <ufs/ufshcd.h>
/* struct request */ /* struct request */
#include <linux/blkdev.h> #include <linux/blkdev.h>
/* struct scsi_device */ /* struct scsi_device */
#include <scsi/scsi_device.h> #include <scsi/scsi_device.h>
struct ufs_hba;
struct ufshcd_lrb;
DECLARE_HOOK(android_vh_ufs_fill_prdt, DECLARE_HOOK(android_vh_ufs_fill_prdt,
TP_PROTO(struct ufs_hba *hba, struct ufshcd_lrb *lrbp, TP_PROTO(struct ufs_hba *hba, struct ufshcd_lrb *lrbp,
@@ -38,7 +38,6 @@ DECLARE_HOOK(android_vh_ufs_compl_command,
TP_PROTO(struct ufs_hba *hba, struct ufshcd_lrb *lrbp), TP_PROTO(struct ufs_hba *hba, struct ufshcd_lrb *lrbp),
TP_ARGS(hba, lrbp)); TP_ARGS(hba, lrbp));
struct uic_command;
DECLARE_HOOK(android_vh_ufs_send_uic_command, DECLARE_HOOK(android_vh_ufs_send_uic_command,
TP_PROTO(struct ufs_hba *hba, struct uic_command *ucmd, int str_t), TP_PROTO(struct ufs_hba *hba, struct uic_command *ucmd, int str_t),
TP_ARGS(hba, ucmd, str_t)); TP_ARGS(hba, ucmd, str_t));