| From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
| From: Saravana Kannan <saravanak@google.com> |
| Date: Wed, 30 Mar 2022 14:58:30 -0700 |
| Subject: REVISIT: ANDROID: vendor_hooks: Reduce pointless modversions CRC |
| churn |
| |
| When vendor hooks are added to a file that previously didn't have any |
| vendor hooks, we end up indirectly including linux/tracepoint.h. This |
| causes some data types that used to be opaque (forward declared) to the |
| code to become visible to the code. |
| |
| Modversions correctly catches this change in visibility, but we don't |
| really care about the data types made visible when linux/tracepoint.h is |
| included. So, hide this from modversions in the central vendor_hooks.h file |
| instead of having to fix this on a case by case basis. |
| |
| This change itself will cause a one time CRC breakage/churn because it's |
| fixing the existing vendor hook headers, but should reduce unnecessary CRC |
| churns in the future. |
| |
| To avoid future pointless CRC churn, vendor hook header files that include |
| vendor_hooks.h should not include linux/tracepoint.h directly. |
| |
| [CPNOTE: 14/04/22] Lee: This needs splitting and fixing-up into the correct commits |
| |
| Bug: 227513263 |
| Bug: 226140073 |
| Signed-off-by: Saravana Kannan <saravanak@google.com> |
| Change-Id: Ia88e6af11dd94fe475c464eb30a6e5e1e24c938b |
| Signed-off-by: Lee Jones <joneslee@google.com> |
| --- |
| include/trace/hooks/avc.h | 1 - |
| include/trace/hooks/binder.h | 1 - |
| include/trace/hooks/cgroup.h | 1 - |
| include/trace/hooks/cpufreq.h | 1 - |
| include/trace/hooks/cpuidle.h | 1 - |
| include/trace/hooks/cpuidle_psci.h | 1 - |
| include/trace/hooks/creds.h | 1 - |
| include/trace/hooks/debug.h | 1 - |
| include/trace/hooks/epoch.h | 1 - |
| include/trace/hooks/ftrace_dump.h | 1 - |
| include/trace/hooks/iommu.h | 1 - |
| include/trace/hooks/mm.h | 1 - |
| include/trace/hooks/mpam.h | 1 - |
| include/trace/hooks/net.h | 1 - |
| include/trace/hooks/pm_domain.h | 1 - |
| include/trace/hooks/preemptirq.h | 1 - |
| include/trace/hooks/printk.h | 1 - |
| include/trace/hooks/sched.h | 1 - |
| include/trace/hooks/selinux.h | 1 - |
| include/trace/hooks/sys.h | 1 - |
| include/trace/hooks/syscall_check.h | 1 - |
| include/trace/hooks/sysrqcrash.h | 1 - |
| include/trace/hooks/ufshcd.h | 1 - |
| include/trace/hooks/vendor_hooks.h | 2 ++ |
| include/trace/hooks/vmscan.h | 1 - |
| include/trace/hooks/wqlockup.h | 1 - |
| 26 files changed, 2 insertions(+), 25 deletions(-) |
| |
| diff --git a/include/trace/hooks/avc.h b/include/trace/hooks/avc.h |
| --- a/include/trace/hooks/avc.h |
| +++ b/include/trace/hooks/avc.h |
| @@ -5,7 +5,6 @@ |
| #define TRACE_INCLUDE_PATH trace/hooks |
| #if !defined(_TRACE_HOOK_AVC_H) || defined(TRACE_HEADER_MULTI_READ) |
| #define _TRACE_HOOK_AVC_H |
| -#include <linux/tracepoint.h> |
| #include <trace/hooks/vendor_hooks.h> |
| /* |
| * Following tracepoints are not exported in tracefs and provide a |
| diff --git a/include/trace/hooks/binder.h b/include/trace/hooks/binder.h |
| --- a/include/trace/hooks/binder.h |
| +++ b/include/trace/hooks/binder.h |
| @@ -5,7 +5,6 @@ |
| #define TRACE_INCLUDE_PATH trace/hooks |
| #if !defined(_TRACE_HOOK_BINDER_H) || defined(TRACE_HEADER_MULTI_READ) |
| #define _TRACE_HOOK_BINDER_H |
| -#include <linux/tracepoint.h> |
| #include <trace/hooks/vendor_hooks.h> |
| /* |
| * Following tracepoints are not exported in tracefs and provide a |
| diff --git a/include/trace/hooks/cgroup.h b/include/trace/hooks/cgroup.h |
| --- a/include/trace/hooks/cgroup.h |
| +++ b/include/trace/hooks/cgroup.h |
| @@ -5,7 +5,6 @@ |
| #define TRACE_INCLUDE_PATH trace/hooks |
| #if !defined(_TRACE_HOOK_CGROUP_H) || defined(TRACE_HEADER_MULTI_READ) |
| #define _TRACE_HOOK_CGROUP_H |
| -#include <linux/tracepoint.h> |
| #include <trace/hooks/vendor_hooks.h> |
| |
| struct task_struct; |
| diff --git a/include/trace/hooks/cpufreq.h b/include/trace/hooks/cpufreq.h |
| --- a/include/trace/hooks/cpufreq.h |
| +++ b/include/trace/hooks/cpufreq.h |
| @@ -7,7 +7,6 @@ |
| #if !defined(_TRACE_HOOK_CPUFREQ_H) || defined(TRACE_HEADER_MULTI_READ) |
| #define _TRACE_HOOK_CPUFREQ_H |
| |
| -#include <linux/tracepoint.h> |
| #include <trace/hooks/vendor_hooks.h> |
| |
| struct cpufreq_policy; |
| diff --git a/include/trace/hooks/cpuidle.h b/include/trace/hooks/cpuidle.h |
| --- a/include/trace/hooks/cpuidle.h |
| +++ b/include/trace/hooks/cpuidle.h |
| @@ -7,7 +7,6 @@ |
| #if !defined(_TRACE_HOOK_CPUIDLE_H) || defined(TRACE_HEADER_MULTI_READ) |
| #define _TRACE_HOOK_CPUIDLE_H |
| |
| -#include <linux/tracepoint.h> |
| #include <trace/hooks/vendor_hooks.h> |
| |
| struct cpuidle_device; |
| diff --git a/include/trace/hooks/cpuidle_psci.h b/include/trace/hooks/cpuidle_psci.h |
| --- a/include/trace/hooks/cpuidle_psci.h |
| +++ b/include/trace/hooks/cpuidle_psci.h |
| @@ -4,7 +4,6 @@ |
| #define TRACE_INCLUDE_PATH trace/hooks |
| #if !defined(_TRACE_HOOK_CPUIDLE_PSCI_H) || defined(TRACE_HEADER_MULTI_READ) |
| #define _TRACE_HOOK_CPUIDLE_PSCI_H |
| -#include <linux/tracepoint.h> |
| #include <trace/hooks/vendor_hooks.h> |
| /* |
| * Following tracepoints are not exported in tracefs and provide a |
| diff --git a/include/trace/hooks/creds.h b/include/trace/hooks/creds.h |
| --- a/include/trace/hooks/creds.h |
| +++ b/include/trace/hooks/creds.h |
| @@ -5,7 +5,6 @@ |
| #define TRACE_INCLUDE_PATH trace/hooks |
| #if !defined(_TRACE_HOOK_CREDS_H) || defined(TRACE_HEADER_MULTI_READ) |
| #define _TRACE_HOOK_CREDS_H |
| -#include <linux/tracepoint.h> |
| #include <trace/hooks/vendor_hooks.h> |
| /* |
| * Following tracepoints are not exported in tracefs and provide a |
| diff --git a/include/trace/hooks/debug.h b/include/trace/hooks/debug.h |
| --- a/include/trace/hooks/debug.h |
| +++ b/include/trace/hooks/debug.h |
| @@ -7,7 +7,6 @@ |
| #if !defined(_TRACE_HOOK_DEBUG_H) || defined(TRACE_HEADER_MULTI_READ) |
| #define _TRACE_HOOK_DEBUG_H |
| |
| -#include <linux/tracepoint.h> |
| #include <trace/hooks/vendor_hooks.h> |
| |
| struct pt_regs; |
| diff --git a/include/trace/hooks/epoch.h b/include/trace/hooks/epoch.h |
| --- a/include/trace/hooks/epoch.h |
| +++ b/include/trace/hooks/epoch.h |
| @@ -7,7 +7,6 @@ |
| #if !defined(_TRACE_HOOK_EPOCH_H) || defined(TRACE_HEADER_MULTI_READ) |
| #define _TRACE_HOOK_EPOCH_H |
| |
| -#include <linux/tracepoint.h> |
| #include <trace/hooks/vendor_hooks.h> |
| |
| DECLARE_HOOK(android_vh_show_suspend_epoch_val, |
| diff --git a/include/trace/hooks/ftrace_dump.h b/include/trace/hooks/ftrace_dump.h |
| --- a/include/trace/hooks/ftrace_dump.h |
| +++ b/include/trace/hooks/ftrace_dump.h |
| @@ -7,7 +7,6 @@ |
| #if !defined(_TRACE_HOOK_FTRACE_DUMP_H) || defined(TRACE_HEADER_MULTI_READ) |
| #define _TRACE_HOOK_FTRACE_DUMP_H |
| |
| -#include <linux/tracepoint.h> |
| #include <trace/hooks/vendor_hooks.h> |
| |
| struct trace_seq; |
| diff --git a/include/trace/hooks/iommu.h b/include/trace/hooks/iommu.h |
| --- a/include/trace/hooks/iommu.h |
| +++ b/include/trace/hooks/iommu.h |
| @@ -7,7 +7,6 @@ |
| #if !defined(_TRACE_HOOK_IOMMU_H) || defined(TRACE_HEADER_MULTI_READ) |
| #define _TRACE_HOOK_IOMMU_H |
| |
| -#include <linux/tracepoint.h> |
| #include <trace/hooks/vendor_hooks.h> |
| |
| DECLARE_RESTRICTED_HOOK(android_rvh_iommu_setup_dma_ops, |
| diff --git a/include/trace/hooks/mm.h b/include/trace/hooks/mm.h |
| --- a/include/trace/hooks/mm.h |
| +++ b/include/trace/hooks/mm.h |
| @@ -7,7 +7,6 @@ |
| #if !defined(_TRACE_HOOK_MM_H) || defined(TRACE_HEADER_MULTI_READ) |
| #define _TRACE_HOOK_MM_H |
| |
| -#include <linux/tracepoint.h> |
| #include <trace/hooks/vendor_hooks.h> |
| /* |
| |
| diff --git a/include/trace/hooks/mpam.h b/include/trace/hooks/mpam.h |
| --- a/include/trace/hooks/mpam.h |
| +++ b/include/trace/hooks/mpam.h |
| @@ -5,7 +5,6 @@ |
| #define TRACE_INCLUDE_PATH trace/hooks |
| #if !defined(_TRACE_HOOK_MPAM_H) || defined(TRACE_HEADER_MULTI_READ) |
| #define _TRACE_HOOK_MPAM_H |
| -#include <linux/tracepoint.h> |
| #include <trace/hooks/vendor_hooks.h> |
| /* |
| * Following tracepoints are not exported in tracefs and provide a |
| diff --git a/include/trace/hooks/net.h b/include/trace/hooks/net.h |
| --- a/include/trace/hooks/net.h |
| +++ b/include/trace/hooks/net.h |
| @@ -6,7 +6,6 @@ |
| |
| #if !defined(_TRACE_HOOK_NET_VH_H) || defined(TRACE_HEADER_MULTI_READ) |
| #define _TRACE_HOOK_NET_VH_H |
| -#include <linux/tracepoint.h> |
| #include <trace/hooks/vendor_hooks.h> |
| |
| struct packet_type; |
| diff --git a/include/trace/hooks/pm_domain.h b/include/trace/hooks/pm_domain.h |
| --- a/include/trace/hooks/pm_domain.h |
| +++ b/include/trace/hooks/pm_domain.h |
| @@ -8,7 +8,6 @@ |
| #if !defined(_TRACE_HOOK_PM_DOMAIN_H) || defined(TRACE_HEADER_MULTI_READ) |
| #define _TRACE_HOOK_PM_DOMAIN_H |
| |
| -#include <linux/tracepoint.h> |
| #include <trace/hooks/vendor_hooks.h> |
| |
| struct generic_pm_domain; |
| diff --git a/include/trace/hooks/preemptirq.h b/include/trace/hooks/preemptirq.h |
| --- a/include/trace/hooks/preemptirq.h |
| +++ b/include/trace/hooks/preemptirq.h |
| @@ -8,7 +8,6 @@ |
| #if !defined(_TRACE_HOOK_PREEMPTIRQ_H) || defined(TRACE_HEADER_MULTI_READ) |
| #define _TRACE_HOOK_PREEMPTIRQ_H |
| |
| -#include <linux/tracepoint.h> |
| #include <trace/hooks/vendor_hooks.h> |
| |
| DECLARE_RESTRICTED_HOOK(android_rvh_preempt_disable, |
| diff --git a/include/trace/hooks/printk.h b/include/trace/hooks/printk.h |
| --- a/include/trace/hooks/printk.h |
| +++ b/include/trace/hooks/printk.h |
| @@ -7,7 +7,6 @@ |
| #if !defined(_TRACE_HOOK_PRINTK_H) || defined(TRACE_HEADER_MULTI_READ) |
| #define _TRACE_HOOK_PRINTK_H |
| |
| -#include <linux/tracepoint.h> |
| #include <trace/hooks/vendor_hooks.h> |
| |
| DECLARE_HOOK(android_vh_printk_hotplug, |
| diff --git a/include/trace/hooks/sched.h b/include/trace/hooks/sched.h |
| --- a/include/trace/hooks/sched.h |
| +++ b/include/trace/hooks/sched.h |
| @@ -4,7 +4,6 @@ |
| #define TRACE_INCLUDE_PATH trace/hooks |
| #if !defined(_TRACE_HOOK_SCHED_H) || defined(TRACE_HEADER_MULTI_READ) |
| #define _TRACE_HOOK_SCHED_H |
| -#include <linux/tracepoint.h> |
| #include <trace/hooks/vendor_hooks.h> |
| /* |
| * Following tracepoints are not exported in tracefs and provide a |
| diff --git a/include/trace/hooks/selinux.h b/include/trace/hooks/selinux.h |
| --- a/include/trace/hooks/selinux.h |
| +++ b/include/trace/hooks/selinux.h |
| @@ -5,7 +5,6 @@ |
| #define TRACE_INCLUDE_PATH trace/hooks |
| #if !defined(_TRACE_HOOK_SELINUX_H) || defined(TRACE_HEADER_MULTI_READ) |
| #define _TRACE_HOOK_SELINUX_H |
| -#include <linux/tracepoint.h> |
| #include <trace/hooks/vendor_hooks.h> |
| /* |
| * Following tracepoints are not exported in tracefs and provide a |
| diff --git a/include/trace/hooks/sys.h b/include/trace/hooks/sys.h |
| --- a/include/trace/hooks/sys.h |
| +++ b/include/trace/hooks/sys.h |
| @@ -5,7 +5,6 @@ |
| #define TRACE_INCLUDE_PATH trace/hooks |
| #if !defined(_TRACE_HOOK_SYS_H) || defined(TRACE_HEADER_MULTI_READ) |
| #define _TRACE_HOOK_SYS_H |
| -#include <linux/tracepoint.h> |
| #include <trace/hooks/vendor_hooks.h> |
| |
| struct task_struct; |
| diff --git a/include/trace/hooks/syscall_check.h b/include/trace/hooks/syscall_check.h |
| --- a/include/trace/hooks/syscall_check.h |
| +++ b/include/trace/hooks/syscall_check.h |
| @@ -5,7 +5,6 @@ |
| #define TRACE_INCLUDE_PATH trace/hooks |
| #if !defined(_TRACE_HOOK_SYSCALL_CHECK_H) || defined(TRACE_HEADER_MULTI_READ) |
| #define _TRACE_HOOK_SYSCALL_CHECK_H |
| -#include <linux/tracepoint.h> |
| #include <trace/hooks/vendor_hooks.h> |
| /* |
| * Following tracepoints are not exported in tracefs and provide a |
| diff --git a/include/trace/hooks/sysrqcrash.h b/include/trace/hooks/sysrqcrash.h |
| --- a/include/trace/hooks/sysrqcrash.h |
| +++ b/include/trace/hooks/sysrqcrash.h |
| @@ -5,7 +5,6 @@ |
| |
| #if !defined(_TRACE_HOOK_SYSRQCRASH_H) || defined(TRACE_HEADER_MULTI_READ) |
| #define _TRACE_HOOK_SYSRQCRASH_H |
| -#include <linux/tracepoint.h> |
| #include <trace/hooks/vendor_hooks.h> |
| /* |
| * Following tracepoints are not exported in tracefs and provide a |
| diff --git a/include/trace/hooks/ufshcd.h b/include/trace/hooks/ufshcd.h |
| --- a/include/trace/hooks/ufshcd.h |
| +++ b/include/trace/hooks/ufshcd.h |
| @@ -4,7 +4,6 @@ |
| #define TRACE_INCLUDE_PATH trace/hooks |
| #if !defined(_TRACE_HOOK_UFSHCD_H) || defined(TRACE_HEADER_MULTI_READ) |
| #define _TRACE_HOOK_UFSHCD_H |
| -#include <linux/tracepoint.h> |
| #include <trace/hooks/vendor_hooks.h> |
| /* |
| * Following tracepoints are not exported in tracefs and provide a |
| diff --git a/include/trace/hooks/vendor_hooks.h b/include/trace/hooks/vendor_hooks.h |
| --- a/include/trace/hooks/vendor_hooks.h |
| +++ b/include/trace/hooks/vendor_hooks.h |
| @@ -7,7 +7,9 @@ |
| * will override the DECLARE_RESTRICTED_HOOK and break the second include. |
| */ |
| |
| +#ifndef __GENKSYMS__ |
| #include <linux/tracepoint.h> |
| +#endif |
| |
| #if defined(CONFIG_TRACEPOINTS) && defined(CONFIG_ANDROID_VENDOR_HOOKS) |
| |
| diff --git a/include/trace/hooks/vmscan.h b/include/trace/hooks/vmscan.h |
| --- a/include/trace/hooks/vmscan.h |
| +++ b/include/trace/hooks/vmscan.h |
| @@ -7,7 +7,6 @@ |
| #if !defined(_TRACE_HOOK_VMSCAN_H) || defined(TRACE_HEADER_MULTI_READ) |
| #define _TRACE_HOOK_VMSCAN_H |
| |
| -#include <linux/tracepoint.h> |
| #include <trace/hooks/vendor_hooks.h> |
| |
| DECLARE_RESTRICTED_HOOK(android_rvh_set_balance_anon_file_reclaim, |
| diff --git a/include/trace/hooks/wqlockup.h b/include/trace/hooks/wqlockup.h |
| --- a/include/trace/hooks/wqlockup.h |
| +++ b/include/trace/hooks/wqlockup.h |
| @@ -5,7 +5,6 @@ |
| |
| #if !defined(_TRACE_HOOK_WQLOCKUP_H) || defined(TRACE_HEADER_MULTI_READ) |
| #define _TRACE_HOOK_WQLOCKUP_H |
| -#include <linux/tracepoint.h> |
| #include <trace/hooks/vendor_hooks.h> |
| /* |
| * Following tracepoints are not exported in tracefs and provide a |