From 2fc0935f585528382fec10eef4520f25ed16a1ef Mon Sep 17 00:00:00 2001 From: ShirkNeko <109797057+ShirkNeko@users.noreply.github.com> Date: Mon, 31 Mar 2025 19:40:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20KPM=20=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E6=94=B9=E4=B8=BA=20SukiSU=20KPM=EF=BC=8C?= =?UTF-8?q?=E5=B9=B6=E6=B7=BB=E5=8A=A0=E5=90=AF=E7=94=A8=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/Kconfig | 7 ++++--- kernel/Makefile | 8 +++++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/kernel/Kconfig b/kernel/Kconfig index ccdc9383..a50a38d6 100644 --- a/kernel/Kconfig +++ b/kernel/Kconfig @@ -17,11 +17,12 @@ config KSU_DEBUG Enable KernelSU debug mode. config KPM - bool "Enable KernelSU KPM" + bool "Enable SukiSU KPM" default n help - This option enables the KernelSU KPM feature. If enabled, it will - override the kernel version check and enable the hook functionality. + Enabling this option will activate the KPM feature of SukiSU. + This option is suitable for scenarios where you need to force KPM to be enabled. + but it may affect system stability. config KSU_ALLOWLIST_WORKAROUND bool "KernelSU Session Keyring Init workaround" diff --git a/kernel/Makefile b/kernel/Makefile index 1e5883ff..a10c2da0 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -16,6 +16,12 @@ ccflags-y += -I$(objtree)/security/selinux -include $(srctree)/include/uapi/asm- obj-$(CONFIG_KPM) += kpm/ +ifeq ($(CONFIG_KPM),y) +$(info -- KPM is enabled) +else +$(info -- KPM is disabled) +endif + # Do checks before compile ifneq ($(shell grep -q "int path_umount" $(srctree)/fs/namespace.c; echo $$?),0) $(error -- Backporting path_umount is mandatory !! Read: https://kernelsu.org/guide/how-to-integrate-for-non-gki.html#how-to-backport-path-umount) @@ -122,7 +128,7 @@ endif $(info -- KernelSU Manager signature size: $(KSU_EXPECTED_SIZE)) $(info -- KernelSU Manager signature hash: $(KSU_EXPECTED_HASH)) -$(info -- Supported Unofficial Manager: 5ec1cff (GKI) rsuntk (Non-GKI) ShirkNeko (GKI and non-GKI)) +$(info -- Supported Unofficial Manager: 5ec1cff (GKI) rsuntk (Non-GKI) ShirkNeko udochina (GKI and non-GKI and KPM)) KERNEL_VERSION := $(VERSION).$(PATCHLEVEL) $(info -- KERNEL_VERSION: $(KERNEL_VERSION))