提交 fe56c942 编写于 作者: J Jialin Zhang 提交者: Zheng Zengkai

vendor_hooks: make android vendor hooks feature generic.

hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I4RCS8
CVE: NA

Reference: https://android.googlesource.com/kernel/common/

---------------------------

Make android vendor hooks feature generic.
Signed-off-by: NJialin Zhang <zhangjialin11@huawei.com>
Reviewed-by: NWei Li <liwei391@huawei.com>
Reviewed-by: NXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 00971a21
......@@ -204,6 +204,8 @@ source "drivers/thunderbolt/Kconfig"
source "drivers/android/Kconfig"
source "drivers/hooks/Kconfig"
source "drivers/gpu/trace/Kconfig"
source "drivers/nvdimm/Kconfig"
......
......@@ -178,6 +178,7 @@ obj-$(CONFIG_CORESIGHT) += hwtracing/coresight/
obj-y += hwtracing/intel_th/
obj-$(CONFIG_STM) += hwtracing/stm/
obj-$(CONFIG_ANDROID) += android/
obj-$(CONFIG_VENDOR_HOOKS) += hooks/
obj-$(CONFIG_NVMEM) += nvmem/
obj-$(CONFIG_FPGA) += fpga/
obj-$(CONFIG_FSI) += fsi/
......
......@@ -54,15 +54,6 @@ config ANDROID_BINDER_IPC_SELFTEST
exhaustively with combinations of various buffer sizes and
alignments.
config ANDROID_VENDOR_HOOKS
bool "Android Vendor Hooks"
depends on TRACEPOINTS
help
Enable vendor hooks implemented as tracepoints
Allow vendor modules to attach to tracepoint "hooks" defined via
DECLARE_HOOK or DECLARE_RESTRICTED_HOOK.
endif # if ANDROID
endmenu
......@@ -4,4 +4,3 @@ ccflags-y += -I$(src) # needed for trace events
obj-$(CONFIG_ANDROID_BINDERFS) += binderfs.o
obj-$(CONFIG_ANDROID_BINDER_IPC) += binder.o binder_alloc.o
obj-$(CONFIG_ANDROID_BINDER_IPC_SELFTEST) += binder_alloc_selftest.o
obj-$(CONFIG_ANDROID_VENDOR_HOOKS) += vendor_hooks.o
# SPDX-License-Identifier: GPL-2.0
menu "Vendor Hooks"
config VENDOR_HOOKS
bool "Vendor Hooks"
depends on TRACEPOINTS
help
Enable vendor hooks implemented as tracepoints
Allow vendor modules to attach to tracepoint "hooks" defined via
DECLARE_HOOK or DECLARE_RESTRICTED_HOOK.
endmenu
# SPDX-License-Identifier: GPL-2.0-only
ccflags-y += -I$(src) # needed for trace events
obj-$(CONFIG_VENDOR_HOOKS) += vendor_hooks.o
// SPDX-License-Identifier: GPL-2.0-only
/* vendor_hook.c
*
* Android Vendor Hook Support
* Vendor Hook Support
*
* Copyright (C) 2020 Google, Inc.
*/
......
......@@ -9,7 +9,7 @@
#include <linux/tracepoint.h>
#if defined(CONFIG_TRACEPOINTS) && defined(CONFIG_ANDROID_VENDOR_HOOKS)
#if defined(CONFIG_TRACEPOINTS) && defined(CONFIG_VENDOR_HOOKS)
#define DECLARE_HOOK DECLARE_TRACE
......@@ -111,7 +111,7 @@
#endif /* TRACE_HEADER_MULTI_READ */
#else /* !CONFIG_TRACEPOINTS || !CONFIG_ANDROID_VENDOR_HOOKS */
#else /* !CONFIG_TRACEPOINTS || !CONFIG_VENDOR_HOOKS */
/* suppress trace hooks */
#define DECLARE_HOOK DECLARE_EVENT_NOP
#define DECLARE_RESTRICTED_HOOK(name, proto, args, cond) \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册