From 0db25f14f1f36414f356ba58930d7a80377e2096 Mon Sep 17 00:00:00 2001 From: ShirkNeko <109797057+ShirkNeko@users.noreply.github.com> Date: Sun, 30 Mar 2025 19:45:10 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20KPM=20=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E4=BF=A1=E6=81=AF=E8=BE=93=E5=87=BA=EF=BC=8C=E5=B9=B6?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=94=AF=E6=8C=81=E7=9A=84=E9=9D=9E=E5=AE=98?= =?UTF-8?q?=E6=96=B9=E7=AE=A1=E7=90=86=E5=99=A8=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/Makefile | 8 +++++++- kernel/core_hook.c | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/kernel/Makefile b/kernel/Makefile index dbfbcc79..8f36392c 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -18,6 +18,12 @@ obj-$(CONFIG_KSU) += kernelsu.o obj-$(CONFIG_KPM) += kpm/ +ifeq ($(CONFIG_KPM),y) +$(info -- KPM is enabled) +else +$(info -- KPM is disabled) +endif + # .git is a text file while the module is imported by 'git submodule add'. ifeq ($(shell test -e $(srctree)/$(src)/../.git; echo $$?),0) @@ -47,7 +53,7 @@ endif $(info -- KernelSU Manager signature size: $(KSU_EXPECTED_SIZE)) $(info -- KernelSU Manager signature hash: $(KSU_EXPECTED_HASH)) -$(info -- Supported Unofficial Manager: ShirkNeko (GKI) (Non-GKI)) +$(info -- Supported Unofficial Manager: 5ec1cff (GKI) ShirkNeko (GKI and KPM)) KERNEL_VERSION := $(VERSION).$(PATCHLEVEL) $(info -- KERNEL_VERSION: $(KERNEL_VERSION)) diff --git a/kernel/core_hook.c b/kernel/core_hook.c index ce4d6f12..d6a696d4 100644 --- a/kernel/core_hook.c +++ b/kernel/core_hook.c @@ -687,6 +687,7 @@ __maybe_unused int ksu_kprobe_init(void) pr_info("renameat kp: %d\n", rc); #ifdef CONFIG_KPM + // KPM初始化状态 kpm_cfi_bypass_init(); // kpm_stack_init(); #endif @@ -699,6 +700,7 @@ __maybe_unused int ksu_kprobe_exit(void) unregister_kprobe(&prctl_kp); unregister_kprobe(&renameat_kp); #ifdef CONFIG_KPM + // KPM取消状态 kpm_cfi_bypass_exit(); // kpm_stack_exit(); #endif From 074903a299492a27f2d29b748a2e8fedf6c20f8d Mon Sep 17 00:00:00 2001 From: ShirkNeko <109797057+ShirkNeko@users.noreply.github.com> Date: Sun, 30 Mar 2025 19:50:14 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E7=9A=84=E9=9D=9E=E5=AE=98=E6=96=B9=E7=AE=A1=E7=90=86=E5=99=A8?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=EF=BC=8C=E6=B7=BB=E5=8A=A0=20udochina?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/Makefile b/kernel/Makefile index 8f36392c..e5ab794c 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -53,7 +53,7 @@ endif $(info -- KernelSU Manager signature size: $(KSU_EXPECTED_SIZE)) $(info -- KernelSU Manager signature hash: $(KSU_EXPECTED_HASH)) -$(info -- Supported Unofficial Manager: 5ec1cff (GKI) ShirkNeko (GKI and KPM)) +$(info -- Supported Unofficial Manager: 5ec1cff (GKI) ShirkNeko udochina (GKI and KPM)) KERNEL_VERSION := $(VERSION).$(PATCHLEVEL) $(info -- KERNEL_VERSION: $(KERNEL_VERSION))