From e6ceb1881c7a8b4bd186f64e714e4fc2f7a1815b Mon Sep 17 00:00:00 2001 From: Michael Specter Date: Mon, 22 Feb 2021 20:16:25 -0500 Subject: [PATCH] ANDROID: Adding kprobes build configs for Cuttlefish Bug: 181054145 Change-Id: Ibb1362479469eae9c294f71a483e500db05b04e1 Signed-off-by: Michael Specter --- build.config.gki_kprobes | 20 ++++++++++++++++++++ build.config.gki_kprobes.aarch64 | 4 ++++ build.config.gki_kprobes.x86_64 | 4 ++++ 3 files changed, 28 insertions(+) create mode 100644 build.config.gki_kprobes create mode 100644 build.config.gki_kprobes.aarch64 create mode 100644 build.config.gki_kprobes.x86_64 diff --git a/build.config.gki_kprobes b/build.config.gki_kprobes new file mode 100644 index 00000000000000..d4a7e7ae9cd48c --- /dev/null +++ b/build.config.gki_kprobes @@ -0,0 +1,20 @@ +DEFCONFIG=gki_defconfig +POST_DEFCONFIG_CMDS="check_defconfig && update_kprobes_config" +function update_kprobes_config() { + ${KERNEL_DIR}/scripts/config --file ${OUT_DIR}/.config \ + -d LTO \ + -d LTO_CLANG_THIN \ + -d CFI \ + -d CFI_PERMISSIVE \ + -d CFI_CLANG \ + -e CONFIG_DYNAMIC_FTRACE \ + -e CONFIG_FUNCTION_TRACER \ + -e CONFIG_IRQSOFF_TRACER \ + -e CONFIG_FUNCTION_PROFILER \ + -e CONFIG_PREEMPT_TRACER \ + -e CONFIG_CHECKPOINT_RESTORE \ + -d CONFIG_RANDOMIZE_BASE + (cd ${OUT_DIR} && \ + make ${CC_LD_ARG} O=${OUT_DIR} olddefconfig) +} + diff --git a/build.config.gki_kprobes.aarch64 b/build.config.gki_kprobes.aarch64 new file mode 100644 index 00000000000000..627c2176f97168 --- /dev/null +++ b/build.config.gki_kprobes.aarch64 @@ -0,0 +1,4 @@ +. ${ROOT_DIR}/${KERNEL_DIR}/build.config.common +. ${ROOT_DIR}/${KERNEL_DIR}/build.config.aarch64 +. ${ROOT_DIR}/${KERNEL_DIR}/build.config.gki_kprobes + diff --git a/build.config.gki_kprobes.x86_64 b/build.config.gki_kprobes.x86_64 new file mode 100644 index 00000000000000..a1d3da740b3683 --- /dev/null +++ b/build.config.gki_kprobes.x86_64 @@ -0,0 +1,4 @@ +. ${ROOT_DIR}/${KERNEL_DIR}/build.config.common +. ${ROOT_DIR}/${KERNEL_DIR}/build.config.x86_64 +. ${ROOT_DIR}/${KERNEL_DIR}/build.config.gki_kprobes +